Skip to content

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

@afercia

Description

@afercia

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Feature] PatternsA collection of blocks that can be synced (previously reusable blocks) or unsynced[Feature] Show button text labelsA preference in the Post and Site Editor that makes buttons show text instead of icons[Package] Block editor/packages/block-editor[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions