Skip to content
This repository has been archived by the owner on Aug 21, 2023. It is now read-only.

ActionSelect: Add component #621

Merged
merged 14 commits into from
May 14, 2019
Merged

ActionSelect: Add component #621

merged 14 commits into from
May 14, 2019

Conversation

ItsJonQ
Copy link
Contributor

@ItsJonQ ItsJonQ commented May 13, 2019

ActionSelect: Add component

Screen Recording 2019-05-14 at 11 59 AM

This update adds a new ActionSelect component to HSDS: React! This component renders extends the UI of a SelectDropdown, allowing it to render contextual content within, based on the selected item.

Bonus! Improved accessibility support (for Dropdowns as a whole).
Added an announcer to declare when the menu is opened/closed (with ability to provide custom label). And also for screen reader to be aware of option count (e.g. Open Beacon (2/3))

Screen Recording 2019-05-14 at 09 18 AM

For additional context, check out this screencast!

https://www.loom.com/share/bb315900af704b94844bf850ca833c32

@netlify
Copy link

netlify bot commented May 13, 2019

Deploy preview for hsds-react ready!

Built with commit 011f92d

https://deploy-preview-621--hsds-react.netlify.com

@ItsJonQ
Copy link
Contributor Author

ItsJonQ commented May 13, 2019

@coveralls
Copy link

coveralls commented May 13, 2019

Pull Request Test Coverage Report for Build 2173

  • 171 of 171 (100.0%) changed or added relevant lines in 16 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 2165: 0.0%
Covered Lines: 10770
Relevant Lines: 10770

💛 - Coveralls

Copy link

@digitaldesigner digitaldesigner left a comment

Choose a reason for hiding this comment

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

This is really nice attention to detail, thanks @ItsJonQ

Separate to this, I had a general animation principle which would apply to this component, but also pretty much anywhere else we do expand/collapse elements like accordions, menu children etc:

When an expand or collapse shows or hides new elements, can those elements be queued to fade in or out once the height animation is complete, so that we avoid cropping (see http://c.hlp.sc/212767232da6). I think that'd lead to a much cleaner overall animation :)

Copy link
Contributor

@tjbo tjbo left a comment

Choose a reason for hiding this comment

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

LGTM for the implementation. Looks straight forward.

Like a rocket ship. 🚀😄

@ItsJonQ
Copy link
Contributor Author

ItsJonQ commented May 14, 2019

@digitaldesigner You bet!! Thanks for the suggestion! Check it out:

The fade animation timing syncs with the resizing timing. Both can be controlled BTW.

Example of it being slowed down to 3000 (ms)

Screen Recording 2019-05-14 at 09 50 AM

Actual speed (160)

Screen Recording 2019-05-14 at 09 51 AM

Bonus! Improved accessibility support (for Dropdowns as a whole).
Added an announcer to declare when the menu is opened/closed (with ability to provide custom label). And also for screen reader to be aware of option count (e.g. Open Beacon (2/3))

Screen Recording 2019-05-14 at 09 18 AM

@ItsJonQ ItsJonQ added the minor ✌️ To indicate minor version bumps label May 14, 2019
@ItsJonQ
Copy link
Contributor Author

ItsJonQ commented May 14, 2019

🍐 'ed with @ryan-mulrooney . Discussed some UX improvements for this component. The main one being visual clarity for when the Select is open. We tried this idea, where we fade the content a bit when it's open.

Screen Recording 2019-05-14 at 11 59 AM

Screen Shot 2019-05-14 at 12 30 23 PM

@ItsJonQ
Copy link
Contributor Author

ItsJonQ commented May 14, 2019

From @ryan-mulrooney

👏
beautiful homie

@ItsJonQ
Copy link
Contributor Author

ItsJonQ commented May 14, 2019

Will merge this up and release!! We can definitely iterate if needed 💪

@ItsJonQ ItsJonQ merged commit 13f85b8 into master May 14, 2019
@digitaldesigner
Copy link

Oh wow yeah these are great enhancements. Thanks @ItsJonQ and @ryan-mulrooney

@plbabin plbabin deleted the action-select branch April 27, 2020 14:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature 💅 minor ✌️ To indicate minor version bumps refactor ♻️
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants