Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

Add an alternative that just styles a native button #82

Merged
merged 2 commits into from
Apr 12, 2016

Conversation

notwaldorf
Copy link
Contributor

Apart from the API differences (buttons don't have IronButtonState etc.), styling is a bit different -- the mixins don't work, and you have to use the style directly: (i.e. .paper-item.fancy:focus {...} vs .paper-item.fancy { --paper-item-focused: {...} }. @sorvell confirms this is a shim limitation, so I think I should document it.

WDYT?

item.addEventListener('click', clickHandler);
});

// Button also natively fires click after pressing space and enter.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MockInteractions doesn't fire click on pressing space/enter (which the native button internally does), so testing that enter triggers a click event like we do in paper-item would literally involve us calling click, which I feel defeats the purpose of the test. However, I am trusting that native buttons get activated on space/enter, which I think is ok. ✨platform magic✨

@cdata
Copy link
Contributor

cdata commented Apr 12, 2016

One small issue, otherwise LGTM 👍

@notwaldorf
Copy link
Contributor Author

Baleted the useless tests! Thanks! 🍬

@notwaldorf notwaldorf merged commit ffcc205 into master Apr 12, 2016
@notwaldorf notwaldorf deleted the add-a-button-alternative branch April 12, 2016 17:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants