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

Inserter: Consider a prompt when replacing semantic patterns #47223

Open
annezazu opened this issue Jan 17, 2023 · 2 comments
Open

Inserter: Consider a prompt when replacing semantic patterns #47223

annezazu opened this issue Jan 17, 2023 · 2 comments
Labels
[Feature] Inserter The main way to insert blocks using the + button in the editing interface [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced Needs Design Feedback Needs general design feedback. [Type] Enhancement A suggestion for improvement.

Comments

@annezazu
Copy link
Contributor

What problem does this address?

This feedback came in through the FSE Outreach Program. Essentially, when choosing a semantic pattern (aka related to template parts right now) from the Inserter, a few folks have expected that it would replace their current template part:

I thought is that clicking to add a Pattern and selecting a specific template part pattern that the current canvas/document template part will be replaced by the template part selected in the patterns. Example. I click Headers pattern and find a Header I want to use to replace the current canvas header. Clicking to add a new header I do not want two headers but I want to use the one I selected to replace the current one. OR atleast getting the option through a dialog modul which asks me if I want to replace the current header with the new I just selected.

What is your proposed solution?

Offer a prompt asking "do you want to insert this pattern or replace your current header?". This could perhaps only happen when clicking a pattern rather than drag & drop.

@annezazu annezazu added [Type] Enhancement A suggestion for improvement. [Feature] Inserter The main way to insert blocks using the + button in the editing interface Needs Design Feedback Needs general design feedback. [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced labels Jan 17, 2023
@talldan
Copy link
Contributor

talldan commented Feb 3, 2023

It used to work the other way, but it was changed in #44221 to create a new template part so that the user doesn't accidentally update all their templates. 😄

What are your thoughts on the idea of a prompt, @jameskoster?

@jameskoster
Copy link
Contributor

It's really tricky to design a UI that accounts for all the possible user intentions. Selecting a header from the Pattern Inserter may mean:

  1. You just want to insert the pattern as regular blocks (unlikely but possible)
  2. You want to insert the new pattern and create a new template part straight away
  3. You want to replace a semantically equivalent template part already in the document and create a new one based on the selected pattern
  4. You want to update a semantically equivalent template part already in the document

Imho the latter two flows feel a bit antithetical to the Inserter purpose, which is to add blocks to the existing document, not update or replace pre-existing ones.

The fourth option seems best served by something like #47507, and the third can be addressed by the on-going design work in #36667. Notably offering a way to swap headers / footers in the dark sidebar when you drill into a template:

Screenshot 2023-02-03 at 14 00 24

All that said, if we were to offer a prompt of any kind, I would suggest it's one that asks whether a template part should be created, or if the pattern should be inserted as regular blocks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Inserter The main way to insert blocks using the + button in the editing interface [Feature] Patterns A collection of blocks that can be synced (previously reusable blocks) or unsynced Needs Design Feedback Needs general design feedback. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

3 participants