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

Post Template block: 'List view' display setting should be selected by default #61569

Open
afercia opened this issue May 10, 2024 · 1 comment · May be fixed by #61574
Open

Post Template block: 'List view' display setting should be selected by default #61569

afercia opened this issue May 10, 2024 · 1 comment · May be fixed by #61574
Labels
[Block] Post Template Affects the Post Template Block [Type] Bug An existing feature does not function as intended

Comments

@afercia
Copy link
Contributor

afercia commented May 10, 2024

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:

Screenshot 2024-05-10 at 09 22 16

Screenshot 2024-05-10 at 09 22 55

The Post Template doesn't. Screenshot:

Screenshot 2024-05-10 at 09 23 35

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 a is-pressed CSS 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 a is-pressed CSS 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

@afercia afercia added [Type] Bug An existing feature does not function as intended [Block] Post Template Affects the Post Template Block labels May 10, 2024
@hbhalodia
Copy link
Contributor

Hi @afercia, I have raised the PR for the issue - #61574, Once this PR get's merged, it would list view default selection on the post template as suggested.

Thank You.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Post Template Affects the Post Template Block [Type] Bug An existing feature does not function as intended
Projects
None yet
2 participants