Skip to content

Conversation

@Mayank-Tripathi32
Copy link
Contributor

work in progress from #49266

What?

This adds an extra display option to the Query Pagination block which allows users to hide the text for the pagination links. This then unlocks several display options for the pagination links:

  • Text only
  • Icon only
  • Text + Icon

Why?

Closes #49266.

How?

This adds a new boolean attribute, showLabel, to the Post navigation link block. The default value is true, and when set to false, it will hide the text labels.

  • showLabel is controlled by a toggle control which is only displayed when an arrow icon type is selected. The attribute cannot be set to false if there is no paginationArrow set, to prevent the pagination link from being empty when no arrow or label is set.

Testing Instructions

  • In the editor, insert a Post Navigation Link block (Next post)
  • Go to the block settings and toggle through the different arrow options
  • Toggle between chevron and arrow, you will see an option to hide the label.
  • Repeat with "none" and option should disappear and set to true.

@Mayank-Tripathi32 Mayank-Tripathi32 changed the title [post navigation links block]: Allow Next / Previous Page blocks to entertain an icon-only or text-only display [post navigation link block]: Allow Next / Previous Page blocks to entertain an icon-only or text-only display Apr 29, 2025
@Mayank-Tripathi32 Mayank-Tripathi32 changed the title [post navigation link block]: Allow Next / Previous Page blocks to entertain an icon-only or text-only display [Post Navigation Link Block]: Allow Next / Previous Page blocks to entertain an icon-only or text-only display Apr 29, 2025
@t-hamano t-hamano added [Type] Enhancement A suggestion for improvement. Needs Design Feedback Needs general design feedback. [Block] Post Navigation Link Affects the Post Navigation Link Block labels Apr 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Post Navigation Link Affects the Post Navigation Link Block Needs Design Feedback Needs general design feedback. [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow Next / Previous Page blocks to entertain an icon-only or text-only display

2 participants