New Component Request: Back to Top button
Maintainers usually reply within 7 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by reviewing the existing Neutral button styling linked in the issue and the design-system patterns for reusable components. Define the Back to Top behavior from the requirements: fixed lower-right positioning, delayed appearance after scrolling, responsive use, and light styling on both backgrounds. Done means the component meets these behaviors and remains unobtrusive on short pages.
Written by the indexing model from the issue text.
Description
Please describe the use case(s) for this component
On a long page it is useful to have a quick navigate to top option. (see original bedrock issue: https://github.com/mozilla/bedrock/issues/9910)
The button should not appear on pages that are not long enough to need this option
Please provide any designs or previous implementations of the proposed component
potential to use Neutral button styling: https://protocol.mozilla.org/components/detail/button--neutral.html
Please describe what this component does in the following conditions
- Dark or light background, stays light background and dark arrow up icon
- When viewed in a mobile/responsive viewport: same positioning as desktop, about 1em from bottom right corner, position fixed & sticky (appears after user scrolls down about 1.5x viewport size)
Please provide examples of this type of component in use in non-Mozilla web properties
Image examples and general best practices here:
https://www.nngroup.com/articles/back-to-top/
- Use a Back to Top button for pages that are longer than 4 screens.
- Place a persistent Back to Top button in the lower right side of the page.
- Label the button Back to Top.
- Have one sticky Back to Top link per page instead of including multiple links in every section of the page.
- Keep the button small so it doesn’t cover important page elements.
- Make the button stand out visually on the page rather than blend in.
- Consider delaying the appearance of a Back to Top option until after users scroll a few pages AND indicate that they want to scroll up
- Make the button stationary.
- Let users control scrolling.
Is the development of this component a blocking dependency for other work? Please explain if so
Protocol team has come to consensus on need after discussion on longstanding bedrock issue. It is not blocking but would be a good UX improvement on pages such as https://www.mozilla.org/en-US/firefox/privacy/book/
- Dominant language
- SCSS
- Stars
- 298
- Forks
- 83
- Avg merge
- 9d 7h
- Merged PRs (30d)
- 7
Getting set up
We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from mozilla/protocol
-
A11y ♿️
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 7 days
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
Maintainers usually reply within 7 days
-
Bug :beetle: Size: XS
Difficulty 2/5 Under an hour Newbie friendliness 65/100
Maintainers usually reply within 7 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
Maintainers usually reply within 7 days
-
Dev ready ⚙️ P1 Size: XS
Difficulty 5/5 Over a week Newbie friendliness 35/100
mozilla/protocol#1119 · 2 comments ·
Maintainers usually reply within 7 days
All issues in mozilla/protocol
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
hyprwm/hyprshutdown#36 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
hfg-gmuend/openmoji#673 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
area:jobads-cv FE mvp P3
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
klasolsson81/jobbliggaren#1878 ·
Maintainers usually reply within 1 day
-
area:goals area:ui beginner friendly community contributions-welcome difficulty:beginner difficulty:easy good first issue hacktoberfest help wanted open-source up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
Maintainers usually reply within 1 day