Skip to content

Add "Back to Top" Block to Site Editor#69911

Closed
vk17-starlord wants to merge 5 commits intoWordPress:trunkfrom
vk17-starlord:add/back-to-top-block
Closed

Add "Back to Top" Block to Site Editor#69911
vk17-starlord wants to merge 5 commits intoWordPress:trunkfrom
vk17-starlord:add/back-to-top-block

Conversation

@vk17-starlord
Copy link
Copy Markdown
Contributor

This pull request implements a Back to Top block for the WordPress Block Editor, addressing Issue #50433. The block allows users to easily add a highly customizable button to their pages, enabling quick navigation back to the top of the page.

Features:

  • Customizable colors, typography, and background.
  • Sticky and non-sticky options for better placement control.
  • Designed to enhance user experience on long, single-column pages.

How to use

https://www.loom.com/share/508f6232ff2d48488978a95481063322?sid=091509b4-686c-48c0-b480-c95325dbfd17

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 16, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: vk17-starlord <vineet2003@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: carolinan <poena@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@fabiankaegy fabiankaegy added [Type] Enhancement A suggestion for improvement. New Block Suggestion for a new block labels Apr 16, 2025
@vk17-starlord
Copy link
Copy Markdown
Contributor Author

vk17-starlord commented Apr 16, 2025

@Mamaduka @fabiankaegy – I have created this PR to demonstrate how the "Back to Top" component can be integrated into our core blocks library. You can view the Loom video to see it in action and get a better understanding of its behavior and functionality.

I’d like to start a discussion around what improvements we can make to this component. The current code might not be fully optimized or formatted to match the standards of our other core blocks, but these aspects can be refined later.

My main focus is on the UX of this "Back to Top" component. What do you think could be improved? Also, what customization options should we offer to users?

@Mamaduka
Copy link
Copy Markdown
Member

As I remember, this has been tried before - #50600, but the PR was closed as not planned. IMO, niche blocks like these seem like plugin teritory.

@t-hamano
Copy link
Copy Markdown
Contributor

I also think this block is in the plugin territory. User preferences for how this block works vary widely, and I think it may be difficult to abstract or generalize as a core block.

@carolinan
Copy link
Copy Markdown
Contributor

carolinan commented Apr 17, 2025

I think if there is a final decision, the issue should be closed too. I mean otherwise someone will pick it up again in a few months and they will spend all that time on it.

If you want to turn this into a plugin, please read about the impact on accessibility, in the earlier PR.

@Mamaduka
Copy link
Copy Markdown
Member

I think if there is a final decision, the issue should be closed too. I mean otherwise someone will pick it up again in a few months and they will spend all that time on it.

100%. I think both can be closed as "maybe later".

It would be great to finalize the core blocks proposal #58773.

@carolinan
Copy link
Copy Markdown
Contributor

If there is an intentional focus on "canonical plugins" between 6.8 and 7.0, then yes that proposal could be revisited.

@Mamaduka
Copy link
Copy Markdown
Member

Closing based on recent discussions. See: #50433 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

New Block Suggestion for a new block [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants