-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Create a "Back to Top" Block #50433
Comments
I like it, I think it's useful and valid, and as combined with sticky positioning as a separate tool, it seems very feasible to do. Technically it seems a matter of adding |
+1. Thanks for opening the issue, @beafialho! |
I wanted to share another use case for the "Top" link: Example page from the WordPress developer portal: https://developer.wordpress.org/reference/functions/clean_user_cache/ While you could recreate it with the Group block that displays Heading and Top blocks displayed in sma row, it might be pretty inconvenient to repeat it with all headings on the page. Usually, this type of UI elements you see injected with a plugin that either filters HTML or injects HTML with JavaScript. Aside, there is a discussion about a new concept in #50029 - Block Behaviors. The scope is still not fully defined, but the idea is that not everything on the page needs to be a block. |
I like this idea. Seems like the assumption is pretty accurate! https://caniuse.com/?search=%23top If we wanted to get tricky we could have a smooth scroll option as well (might require a bit of JS). |
Another reason to allow users to upload svgs so that the icon can be customized... |
Awesome, thanks for all the feedback! I'm going to assume that the designs provided are sufficient for a dev to pick this one up. I'm thinking a first version can just be an editable rich text field that defaults to outputting "Back to top", with no inspector options and just regular rich text toolbar options. Any iconography can then be inserted as unicode glyphs (such as ↑) or emoji in the rich text, and hopefully through an "Icon" inline-block or other feature in the future. But if these do need more design, let me know and we'll put something together. |
This comment was marked as outdated.
This comment was marked as outdated.
I think this could be an interesting idea as a standalone block per #58773. |
What problem does this address?
The popularity of responsive web design has led to a proliferation of single-column, long-page designs both on mobile and desktop. A consequence of these designs has been the Back to Top button, which is a shortcut that allows users to quickly navigate to the top of the page.
What is your proposed solution?
I suggest adding this feature to the site editor, perhaps it makes sense for it to be a block, instead of a hidden feature in the Button block.
I expect it to be fully customisable (colors, typography, background, sticky vs non-sticky, etc) here are a few example designs:
cc: @iamarinoh @iamtakashi @jasmussen
The text was updated successfully, but these errors were encountered: