Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Update the archive templates to replace woocommerce/legacy-template by Products block #8067

Closed
Tracked by #8059
dinhtungdu opened this issue Jan 2, 2023 · 6 comments · Fixed by #8308
Closed
Tracked by #8059
Assignees
Labels
focus: FSE Work related to prepare WooCommerce for FSE. focus: template Related to API powering block template functionality in the Site Editor

Comments

@dinhtungdu
Copy link
Member

dinhtungdu commented Jan 2, 2023

After creating missing blocks and implementing the compatibility layer, we want to update the archive templates to replace the woocommerce/legacy-template block with an equivalent design powered by:

  • Breadcrumb block.
  • Products block.
  • Product Results Count block.
  • Catalog Sorting block.
  • Store Notices block.

Update: thanks to the work in #6538 by @albarin and @gigitux, instead of replacing the current templates, we should update the blockified templates inside ./templates/templates/blockified/.

@dinhtungdu dinhtungdu added focus: template Related to API powering block template functionality in the Site Editor focus: FSE Work related to prepare WooCommerce for FSE. labels Jan 2, 2023
@dinhtungdu dinhtungdu changed the title Make the archive templates use blockified templates by default. Update the archive templates to replace woocommerce/legacy-template by Products block Jan 18, 2023
@kmanijak kmanijak self-assigned this Jan 25, 2023
@kmanijak
Copy link
Contributor

I'd like to clarify my understanding of this task.

I see the following scenarios in which I think we should act accordingly:

flowchart TD;
    Start-->New{New store?};
    New-->|Yes| R1[Load New Blockified Template];
    New-->|No| Changed{Changed template?};
    Changed-->|No| R3[Display Old Template with Convert Button];
    Changed-->|Yes| R2[Load Local Version with Convert Button];
Loading

In other words, I think we shouldn't replace the content of existing stores without merchant's acknowledgment or specific action. What do you think?

cc: @dinhtungdu, @albarin, @Aljullu

@dinhtungdu
Copy link
Member Author

In other words, I think we shouldn't replace the content of existing stores without merchant's acknowledgment or specific action.

To me, it's fine to replace the unmodified archive templates of existing stores without merchants' acknowledgment. We're providing the same default layout but powered by blocks, so templates that haven't been modified should continue working as expected after we update the template file. By doing so, we also simplify the upgrade path quite a bit.

@kmanijak
Copy link
Contributor

To me, it's fine to replace the unmodified archive templates of existing stores without merchants' acknowledgment. We're providing the same default layout but powered by blocks

I like that and I'd like to go this way. But I see one problem:

image

This is what we agreed to display in a placeholder of Classic Template. I'd like to highlight "Don't worry, you can always revert back." Allowing to go back to Classic Template block is contrary to template auto-upgrade: user can choose to go back to Classic Template on purpose and we would replace it at first occasion which is bad UX (we told them they can go back).

Seems like it's the bigger decision: should we still allow to use Classic Template?

  • if YES:
    • I think we cannot replace product archive without user's action
    • This option seems more user friendly and calmer
  • if NO:
    • Placeholder description has to be updated
    • What do you think about displaying a one-time notice, like: "Hey! We've upgraded your Classic Template to the new, better Products block. Now, you have more features to edit your products visually!" or something among those lines?
    • Product Archive template would have to be disabled from inserter (which would be a part of this issue)
    • I think I prefer this way, since it accelerates the migration

@Aljullu
Copy link
Contributor

Aljullu commented Jan 26, 2023

AFAIK the latest decision was to not update the template for stores which are already using a block theme, but use the updated template for any new stores or any existing stores switching from a classic theme to a block theme. Some more context: pdnLyh-1ne-p2.

If I'm not wrong, however, I think that was decided when the plan was to add Filter blocks by default in the template, and the rationale was that we didn't want to force a layout change to existing stores. But since we are no longer planning to add Filter blocks by default to those templates, I think it's ok to revisit that decision.

@kmanijak kmanijak removed their assignment Jan 26, 2023
@dinhtungdu dinhtungdu self-assigned this Jan 26, 2023
@dinhtungdu
Copy link
Member Author

As we already have a migration strategy in #6538, we can just follow that strategy by updating templates inside ./templates/templates/blockified/.

Seems like it's the bigger decision: should we still allow to use Classic Template?

As @vivialice mentioned in the P2 discussion, as the Products block is still in the beta phase, we should continue allowing merchants to use the classic template in case there is any issue with our blockified template that we haven't fixed.

Don't worry, you can always revert back.

It's not very clear to me from the merchant's POV how to revert back. Merchants can revert using the Clear customizations function, or they can also manually revert it by adding the Classic Template block from the inserter. Should we inform merchants about this anywhere?

@kmanijak
Copy link
Contributor

As @vivialice mentioned in the P2 discussion, as the Products block is still in the beta phase, we should continue allowing merchants to use the classic template in case there is any issue with our blockified template that we haven't fixed.

Makes sense, thanks for reminding! 👍

It's not very clear to me from the merchant's POV how to revert back. Merchants can revert using the Clear customizations function, or they can also manually revert it by adding the Classic Template block from the inserter. Should we inform merchants about this anywhere?

Good catch 🤔 I think I would include that information on a Classic Template placeholder. Let me try it out within #8248 and let's see how that looks 🙌

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
focus: FSE Work related to prepare WooCommerce for FSE. focus: template Related to API powering block template functionality in the Site Editor
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants