gutenberg
gutenberg copied to clipboard
Post Template block: 'List view' display setting should be selected by default
Description
A few blocks have a setting to display their content in a list or grid view:
- Latest Posts
- RSS
- Post Template
The default setting is 'List view'.
When adding a Latest Posts or RSS blocks, their block toolbar does show the 'List view' button selected by default. Screenshots:
The Post Template doesn't. Screenshot:
Step-by-step reproduction instructions
- Add a Latest Posts block and an RSS block.
- Observe the block toolbar of both blocks shows the 'List view' button selected by default.
- Technically, the 'selected' buttons have an
aria-pressed="true"attribute and ais-pressedCSS class. - Add a Query Loop block, click 'Choose' and then 'Standard'.
- Select the Post Template block within the Standard Query Loop.
- Observe the block toolbar shows the 'List view' button as not selected.
- Observe the button has an
aria-pressed="false"attribute and does not have ais-pressedCSS class.
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
Hi @afercia, I have raised the PR for the issue - https://github.com/WordPress/gutenberg/pull/61574, Once this PR get's merged, it would list view default selection on the post template as suggested.
Thank You.