amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

Feature request: Hover over trigger for amp-bind

Open bjalford opened this issue 9 years ago • 5 comments

We are building a responsive site in AMP and would like to trigger a dropdown menu on mouse over which I guess would default to onclick on mobile? This is a feature request to add this to amp-bind

bjalford avatar Mar 02 '17 16:03 bjalford

/to @choumx

aghassemi avatar Mar 03 '17 17:03 aghassemi

/cc @ericlindley-g

dreamofabear avatar Mar 06 '17 19:03 dreamofabear

Thanks for the feature request, @bjalford !

I hesitate to support a dropdown on hover via amp-bind, because hover doesn't necessarily signal a high level of user intent, and just linking that to a particular bind state would open up a lot of undesirable interactions (ones that extend beyond hover triggering a dropdown)

A couple other options:

• Is there a reason you're not doing this with CSS :hover selector? I imagine it could be due to the CSS limit on pages, but would be curious if there's a functionality barrier (such as if you want both a hover action and a click action to trigger dropdowns—in this case, you could use the checkbox hack, but of course that would mean more CSS)

• We could think about enabling an "expand-on-hover" attribute just to amp-accordion (though I suspect that some of the same UX issues might be possible here, as well) @camelburrito , WDYT?

ericlindley-g avatar Mar 10 '17 16:03 ericlindley-g

Accordions should never expand on hover . They are not meant to be drop downs . We can build proper drop downs with amp-selector.

i was trying something like this couple of days ago

http://jsbin.com/falohu/57 (might not be fully presentable and needs tweaks.)

camelburrito avatar Mar 10 '17 17:03 camelburrito

@camelburrito — I'm curious: what's the reasoning behind not adding the hover functionality to amp-accordion? Is it that the technical implementation isn't conducive to hover, that there are UX issues, or is it more a question of semantics for the component itself?

@bjalford , since amp-bind is not the likely route for this feature, I've opened a new bug for a drop-down on hover here. Will close this bug, unless folks do think it's important to add hover support directly to amp-bind, rather than supporting another way.

ericlindley-g avatar Apr 07 '17 19:04 ericlindley-g