Skip to content
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

Patterns Explorer: Improve pagination layout when 'Show button text labels' preference is enabled #61754

Closed
afercia opened this issue May 17, 2024 · 1 comment · Fixed by #61776
Labels
[Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced [Feature] Show button text labels A preference in the Post and Site Editor that makes buttons show text instead of icons [Package] Block editor /packages/block-editor [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@afercia
Copy link
Contributor

afercia commented May 17, 2024

Description

When the preference 'Show button text labels' is eneabled, the Patterns Explorer pagination items are stacked vertically because of a CSS flex-direction: column;. Screenshot:

Screenshot 2024-05-17 at 09 34 45

Not sure this is ideal.

I'm not sure what the reasoning behind this layout was. It appears to be new CSS introduced in #53835 and seems intentional.

While on small screns laying out these items vertically would make sense, on large screens there is space to lay out them horizontally, no differently from their layout when 'Show button text labels` is disabled. Screenshot:

Screenshot 2024-05-17 at 09 42 17

I'd like to propose to stack them vertically only udner a certain viewport width.

Step-by-step reproduction instructions

  • Go to the post editor > Options > Preferences > Accessibility
  • Enable the 'Show button text labels' preference.
  • CLose the preferences modal dialog and open the main inserter > Patterns
  • Click 'Explore all patterns'
  • Sctoll the modal dialog at the bottom.
  • Observe the pagination items are unexpectedly stacked vertically.

Screenshots, screen recording, code snippet

No response

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@afercia afercia added [Type] Bug An existing feature does not function as intended [Package] Block editor /packages/block-editor [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced [Feature] Show button text labels A preference in the Post and Site Editor that makes buttons show text instead of icons labels May 17, 2024
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label May 18, 2024
@amitraj2203
Copy link
Contributor

Hi @afercia, I have raised a PR for this issue. Please let me know if it needs improvement.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced [Feature] Show button text labels A preference in the Post and Site Editor that makes buttons show text instead of icons [Package] Block editor /packages/block-editor [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
2 participants