Skip to content

Query Block: Make it easier to switch initial pattern #30925

Closed

Description

@annezazu

What problem does this address?

Right now, after choosing a pattern for the query block, the only way to choose a different pattern is to hit undo. This isn't terribly intuitive and, if you wanted to switch mid-way through with the query block, it makes it so you have to start from scratch. This came up during the fifth call for testing for the FSE Outreach Program:

I wanted to go back and change the size selection to the query loop. I think there was large, medium, small. Is there a way to change that layout after you’ve customized that query block? Seems like it should be part of “Display Settings” in the block controls.

What is your proposed solution?

Enable a way either through Block Settings or the Block Toolbar to switch which pattern you're using for the Query Block. cc @kjellr since you've been working on query patterns and might have some thoughts! For example, I'm not quite sure if this is intentional.

Activity

  1. kjellr commented on Apr 16, 2021

    @kjellr
    Contributor

    This should get better with contextual pattern transforms, as described in #28736. This was enabled for simple blocks in #30469, but it's not available yet for the Query block.

    Here's a GIF of the currently-merged feature to illustrate the idea. There's new UI that lets you transform a standard Quote block into a related block pattern that uses centered text and a photo:

    transform

    The same thing should be possible with Query blocks eventually, but I also would see the benefit to having a larger, dedicated view to choose which pattern you'd like to switch to.

  2. annezazu commented on Apr 16, 2021

    @annezazu
    ContributorAuthor

    Ah ha amazing! Thanks for connecting those dots. I'll leave this open for now but let's see how this evolves and whether it can be closed as patterns get integrated.

  3. ntsekouras commented on Apr 17, 2021

    @ntsekouras
    Contributor

    Hey @annezazu - what would be the ideal handling for you and/or proposed by the feedback?

    In Query and similar 'grouping' blocks (Group, Columns, etc..) a user could have inserted anything, after the initial pattern/variation selection. The most logical (and simpler and performant 😄 ) solution IMO, would be to change all the Query inner blocks. What this means is that possible changes/insertions that happened so far would go away.

    What are your thoughts?

  4. annezazu commented on Apr 18, 2021

    @annezazu
    ContributorAuthor

    I think what Kjell described above makes sense for this approach to start!

    What this means is that possible changes/insertions that happened so far would go away.

    This concerns me too. The only idea that comes to mind is to encourage a user to 1) know there are various options for the query block at the start 2) encourage them to swap between before moving on 3) understand that there might be lost changes if they do change later (as long as one can undo I imagine that'll be okay). I think this same problem will need to be solved when it comes to swapping around template parts too so I'd expect a similar approach perhaps similar to the designs shared in this issue: #28737

  5. annezazu commented on Apr 22, 2021

    @annezazu
    ContributorAuthor

    Just noting that 3 people out of 30 folks who tested this from the Japanese WordPress community all were confused by this. Here are translations of the feedback they gave:

    "After you add a query block, it does I can change the size (I wonder if possible?)"

    Query block size option, do not be changed after you add the block?

    I don't know how to change query block size from "large" to "medium". Can't I be changed once I decide?

  6. ntsekouras commented on Apr 26, 2021

    @ntsekouras
    Contributor

    I can see that the pattern names are causing a bit of confusion here though (medium, large, etc..). It seems that people perceive the patterns as some kind of attribute or block variation..

  7. kjellr commented on Apr 26, 2021

    @kjellr
    Contributor

    Yeah — we've renamed those to be more descriptive. they're now called:

    • Standard
    • Image at left
    • Small image and title
  8. annezazu commented on Apr 28, 2021

    @annezazu
    ContributorAuthor

    This seems to be a big area of feedback as I have thoughts from another person about this current experience to pass along:

    Is there a way to change the layout of the query after you choose it? For example, if I chose one and then customized some things – can I can change layouts later on or do I have re-make the whole query block? I couldn’t figure this out

  9. annezazu commented on Oct 6, 2021

    @annezazu
    ContributorAuthor

    More feedback to pass along from the tenth call for testing for the FSE Outreach Program:

    For the Query Block specifically, I’m not sure if this is expected, but I didn’t find a way to get back to the initial layout options if I wanted to change. In other words, I selected my layout but wanted to change it afterwards and couldn’t really find a smooth way to do that unless I deleted the block and added it again so the selection screen appeared.

  10. ntsekouras commented on May 19, 2022

    @ntsekouras
    Contributor

    I'm closing this one since this has landed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions