-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DS-541 Floating Action Buttons #2423
Conversation
# Conflicts: # docs-site/.incache # packages/base-starter-kit/.boltrc.js # packages/base-starter-kit/package.json
# Conflicts: # docs-site/.incache
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cjwhitedev This is a good first pass. First, let's keep this simple and just name this Floating Action Buttons rather than a fancy term that doesn't resonate.
Secondly, let's go over some visual enhancements and semantics fixes.
Visual
Let's create some information hierarchy here. If the more button toggles on additional buttons, these would be considered secondary. Rough sketch below:
Additionally, it'd be great to smooth out the transition with some motion effects like this.
Semantics
This is a list of buttons, let's apply the correct semantics in the markup.
<ul>
<li>
<button type="button">more</button>
<ul>
<li>
<a href="">
rocket
</a>
</li>
<li>
<a href="">
rocket
</a>
</li>
<li>
<a href="">
rocket
</a>
</li>
</ul>
</li>
<li>
<a href="">share</a>
</li>
<li>
<a href="">scroll to top</a>
</li>
</ul>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cjwhitedev left a few inline requests. Please also update demo titles and description to reflect the new prop name (still see examples of "show-on-scroll-position"), and remember to prefix commit messages with the ticket number 🙏
packages/components/bolt-floating-action-buttons/floating-action-buttons-li.schema.js
Outdated
Show resolved
Hide resolved
packages/components/bolt-floating-action-buttons/src/floating-action-buttons.twig
Outdated
Show resolved
Hide resolved
packages/components/bolt-floating-action-buttons/src/floating-action-buttons.js
Outdated
Show resolved
Hide resolved
packages/components/bolt-floating-action-buttons/src/floating-action-buttons.js
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cjwhitedev approved! 🎉 Thanks for sticking with this one. I think it turned out great.
I made two last tweaks. One is a very minor JS style thing - I tend to skip brackets for single-line if
statement. It's totally fine to include brackets (some prefer that), but for consistency I removed them (see commit). Second, I removed the remaining scroll-position demos (see commit).
Before merging I just want to double-check this has @mikemai2awesome's approval. I think he approved before many recent changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@danielamorse @cjwhitedev I fixed some docs and tested with screen readers. Good to go.
Jira
Summary
Create a component for floating action buttons.
Details
How to test
Release notes
New component named Floating Action Buttons added.
Visual changes
Icon-only button with size set to
small
renders smaller icon now. Overall button size is not affected.