-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Template Part: Better handling of "missing" parts #49331
Comments
Perhaps "could not be found" instead? That would be more universal, thinking about situations where you paste a template from one site into another. Should there be a 'Start blank' or 'Create new' option, to cover situations in which there are no pre-existing template parts or relevant patterns? |
True, good point.
I don't feel that would be a likely course of action—more likely to remove probably—though I'm fine either way. |
Perhaps 'Start blank' is only an option when no existing template parts / relevant patterns can be found? Otherwise the whole thing feels a bit pointless with only a 'Remove' action. It might be good to list the different scenarios to ensure we have a design / actions that works for all? Off the top of my head we need to consider: Specified template part not found, and:
In the last two cases, the 'Choose another template part...' sentence in the design above wouldn't make sense, so that might need to be dynamic. |
We'd still have "Choose" though, right? I think the two routes are "Yes, I deleted that template part, why is this still here" or "yikes, I don't know what happened to that template part, let me pick another one." |
I guess this is an edge case now that core bundles header / footer patterns, but what would happen when you click "Choose" if there are no template parts or patterns? |
If there are none, then yea "Choose" shouldn't be an option. |
Right, and in that case don't you think it's reasonable to offer a shortcut to create a new template part? I don't have a strong feeling btw, just thinking: if there's intent to insert a template part, and that template part cannot be found, then it's fairly likely folks would want to create a new one in its place. |
What problem does this address?
When a template part block references a part that is missing, you see the following error on the canvas:
It's okay for theme developers, but when an end-user encounters this it's not super helpful. It's not something folks are likely to encounter now, but as we enrich the template creation flow, and the pattern directory expands to include template-specific patterns, it might start to crop up more often.
It might be nice to explore some actionable items we could add to the message, and in some circumstances avoid showing the message at all.
What is your proposed solution?
A couple of ideas off the top of my head
The text was updated successfully, but these errors were encountered: