These are chat archives for angular/material

13th
Jan 2015
Ed Pelc
@epelc
Jan 13 2015 20:47
@marcysutton you here?
Marcos Pereira
@marcospgp
Jan 13 2015 20:55
@epelc
Ed Pelc
@epelc
Jan 13 2015 20:55
o hello
I just replied to your comment but I would say keep using it for now and perhaps open an issue about adding icon support to the radio groups
I think even though you and several other people may not care about accessibility it's a core aspect of the project and we need to respect that
Marcos Pereira
@marcospgp
Jan 13 2015 21:00
Yea I completely agree
I just don't really think those are reasons to make something private, just make it all available and let people choose what rules to follow, still of course encouraging the best practices
but making the ripple effect a documented feature wouldn't really be considered encouraging a bad practice aha
Ed Pelc
@epelc
Jan 13 2015 21:01
also I don't think its going away anytime soon so in the mean time you should be safe using it. It's just that formally documenting it is essentially like signing a contract which would be bad later down the line when we have no need for this
Marcos Pereira
@marcospgp
Jan 13 2015 21:01
still, not up to me. as long as the directive itself is not removed, I'll be fine aha
yep exactly that aha
Ed Pelc
@epelc
Jan 13 2015 21:02
The whole idea is that we would support all logical use cases which yours seems like a perfectly good one to extend the radio group for
Marcos Pereira
@marcospgp
Jan 13 2015 21:05
Yea I would expand on that radio group idea if it would bring me any advantages, but right now it'd just be wasting time since the divs work well for me
Ed Pelc
@epelc
Jan 13 2015 21:06
ok I'd suggest you just keep using it for now then. But I don't think it will be formally documented. I've also just asked for final consensus to close that issue.
Marcos Pereira
@marcospgp
Jan 13 2015 21:08
wait a second
here
another use case, spotify radio station buttons
how would an ink ripple effect be applied to something like this by a developer using the framework?
Marcos Pereira
@marcospgp
Jan 13 2015 21:14
@epelc
Ed Pelc
@epelc
Jan 13 2015 21:15
do you mean showing a ripple when you click on the picture or just having that bright circle in the middle?
Marcos Pereira
@marcospgp
Jan 13 2015 21:15
the ripple effect when pressing one of the buttons :)
Ed Pelc
@epelc
Jan 13 2015 21:16
I'd try to make that square an md-button and stick your image inside it. But your going to possibly need to override the border css to make it square and set the width/height property
Marcos Pereira
@marcospgp
Jan 13 2015 21:17
yea that doesn't seem so clean though
I mentioned this in the issue, marcy mentioned md-cards
go check there
Ed Pelc
@epelc
Jan 13 2015 21:18
o yes the card would work nice. I dont think it'll help you get the big ripple you want though
you could just center the play button in the middle and make just that have the ripple
then use the card for the rest of it
Marcos Pereira
@marcospgp
Jan 13 2015 21:22
but clicking anywhere on the card would trigger the play button, not only the button itself
so the ripple should be on all of the card
Ed Pelc
@epelc
Jan 13 2015 21:23
if you dont have a background on the button you can probably do a padding hack to make the click area fill the whole image area
Marcos Pereira
@marcospgp
Jan 13 2015 21:25
should we really have to use hacks for common use cases though :)
Ed Pelc
@epelc
Jan 13 2015 21:26
its not that hacky if anything the ripple is more hacky because its not accessible at all
but you have a point
I think adding some kind of card ripple would be good watch angular/material#457
Marcos Pereira
@marcospgp
Jan 13 2015 21:27
that's why I was defending its accessibility aha :) but the cards thing does do it I guess
Yea I have my eyes on that one
Ed Pelc
@epelc
Jan 13 2015 21:28
I'd argue on the above. I'd also like to see that could work nice for my app too
oho I just got an awesome layout idea thanks!
Marcos Pereira
@marcospgp
Jan 13 2015 21:29
aha layout idea on what? I'm curious :)
Ed Pelc
@epelc
Jan 13 2015 21:30
the app im working on. It lets you get shipping quotes really easily and that should work nice for showing them from 20 people
Marcos Pereira
@marcospgp
Jan 13 2015 21:32
aha nice!
Marcy Sutton
@marcysutton
Jan 13 2015 21:53
Sorry I missed the discussion!
Ed Pelc
@epelc
Jan 13 2015 21:54
No problem. It's all there if you'd like to read but essentially @MarcosPortugal agrees we should be looking at improving specific use cases instead
Marcy Sutton
@marcysutton
Jan 13 2015 21:54
Woot! Easier to support that way.
Marcos Pereira
@marcospgp
Jan 13 2015 21:56
Yes, specifically the md-cards being the general component for any use case involving clickable things with ripple effects, but that can't be replaced by buttons
having something like md-action-card
and md-static-card
Ed Pelc
@epelc
Jan 13 2015 21:57
or md-card-action and you just put it above md-card-content if you need it
Marcy Sutton
@marcysutton
Jan 13 2015 21:57
I don't know that we'll have to make that distinction, but you are correct that not all md-cards will have button elements nested inside of them.
Ed Pelc
@epelc
Jan 13 2015 21:58
I think googles play music app has a good example of it too
Marcy Sutton
@marcysutton
Jan 13 2015 21:58
A good precedent is how md-button will either become a link or a button element depending on if you add ng-href to it.
Marcos Pereira
@marcospgp
Jan 13 2015 21:58
no marcy, I meant cards that are all clickable. The whole thing, click anywhere
like a big button in a card shape :)
(see the spotify radio buttons example)
Marcy Sutton
@marcysutton
Jan 13 2015 21:58
Click = button
whether or not it uses md-button
Ed Pelc
@epelc
Jan 13 2015 21:59
@marcysutton I like that example
Marcos Pereira
@marcospgp
Jan 13 2015 21:59
then an md-custom button with other contents, i dont know
but md-button wont do
Marcy Sutton
@marcysutton
Jan 13 2015 21:59
I guess click could technically require a link instead of a button, but either way it is some kind of action that requires accessibility support.
Marcos Pereira
@marcospgp
Jan 13 2015 22:01
what are you referring to?
Marcy Sutton
@marcysutton
Jan 13 2015 22:01
I'm referring to making the "whole card clickable".
Marcos Pereira
@marcospgp
Jan 13 2015 22:05
but a link?
I'm referring to primary actions, not links
Ed Pelc
@epelc
Jan 13 2015 22:05
goodluck on solving this I have gtg
Marcos Pereira
@marcospgp
Jan 13 2015 22:05
farewell :)
Marcy Sutton
@marcysutton
Jan 13 2015 22:05
It's a subtle semantic difference: if the primary action takes you to a different page, it should be a link instead of a button.
I wouldn't worry about it too much, it will be considered in a refactor of md-card.
Marcos Pereira
@marcospgp
Jan 13 2015 22:06
I noticed, primary actions don't always take to different pages however
I guess they rarely do?
Marcy Sutton
@marcysutton
Jan 13 2015 22:07
I think that's up to whoever is implementing it. md-button handles this by changing the template on presence of ng-href.