mdb-ui-kit icon indicating copy to clipboard operation
mdb-ui-kit copied to clipboard

Dropdown point of origin - material should appear from touchpoint.

Open jtolla opened this issue 11 years ago • 8 comments

http://www.google.com/design/spec/animation/responsive-interaction.html#responsive-interaction-material-response

"When new material is generated as a result of direct user interaction, surface growth motion should originate from the point of input."

jtolla avatar Dec 10 '14 15:12 jtolla

Actually the Dropdown.js supports something like this, It could be improved.

FezVrasta avatar Dec 10 '14 16:12 FezVrasta

The point of input is not the same as the touchpoint. The material should essentially cover the related input. So origin point for material growth should be one of the four input corners to expand across the input (ex. top-left origin = grow down-right, bottom-right origin = grow top-left)

rcollette avatar Dec 11 '14 19:12 rcollette

I don't agree with this in the context of dropdowns, in the classic bootstrap sense. The point of origin example depicts a menu being launch from a button. That is not a dropdown. A better example to emulate for dropdowns is located on this page under the Edit Shipping Info example. It will still take a little doing to implement.

caseahr avatar Dec 11 '14 19:12 caseahr

@rcollette I would disagree that "the point of input is not the same as the touchpoint". I think that's exactly what it is in the context of this statement.

@caseahr The "cascading dropdown" video is a close example of what I'm suggesting.

jtolla avatar Dec 11 '14 20:12 jtolla

@caseahr I agree the movie that depicts the state "drop down" for the edit shipping example is the way it should be. My memory of the documentation was not accurate. I recalled the spec saying that the selected field should be overlayed but didn't recall it being as complex as the video shows. Sorry for my confusion.

rcollette avatar Dec 12 '14 20:12 rcollette

So, we are talking about this behavior:

http://material-design.storage.googleapis.com/publish/v_2/material_ext_publish/0B08MbvYZK1iNb3hiNjFBTUU4V0k/components-menus-menus-appbar_dropdown_spec_large_xhdpi.webm

FezVrasta avatar Dec 16 '14 10:12 FezVrasta

In my opinion, this might need to be a new issue. The title of this issue is "material should appear from touchpoint," but I don't believe that to be true. The current example on the demo page shows the dropdown options appearing from the left and growing to the right. This is not the desired animation. The end state however is perfect. It should just animate differently as seen here on a different material design framework site.

To answer your question @FezVrasta, no I think the behavior shown there is more akin to the bootstrap navbar elements which you already have working well on your bootstrap elements page. The only thing missing there is the animation. So basically, you just need a little animation work. No biggie, right? I would like to help... but I've never done the whole pull-request and everything before. perhaps I should give it a try.

caseahr avatar Dec 17 '14 15:12 caseahr

everything is automated by Grunt, you have just to edit the LESS files and run grunt material:less to compile CSS :)

FezVrasta avatar Dec 17 '14 15:12 FezVrasta