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

Investigate default attributes not saving for blocks. #2789

Closed
nerrad opened this issue Jun 26, 2020 · 2 comments
Closed

Investigate default attributes not saving for blocks. #2789

nerrad opened this issue Jun 26, 2020 · 2 comments
Assignees

Comments

@nerrad
Copy link
Contributor

nerrad commented Jun 26, 2020

While working on and testing #2787, I noticed that default attributes are not saving for SSR grid blocks (All Products default attributes are saving) as expected from work done in #1613. Defaults are being used on initially added a block to content however.

I confirmed this was happening in master before merging #2787.

I don't know if this is a regression or if it is known based on changes between when #1613 was done and now (I may have missed something) but just creating this issue for tracking and potentially addressing if needed.

@mikejolley I'm just assigning to you for initial review since the two of us worked on #1613 initially. What are your thoughts?

@mikejolley
Copy link
Member

@nerrad completely expected - the defaults and filter was added to the all products block only (seen here https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/1613/files#diff-500e1ea4e3573fafb7e29b070d9641e8R40). SSR blocks did not receive this treatment, so as per how gutenberg works, defaults are never saved to the block attributes.

I don't think it's worth rolling this change out for SSR and requiring more deprecation handling if we're moving away from SSR to Product Elements in the near future.

@nerrad
Copy link
Contributor Author

nerrad commented Jul 1, 2020

Ahh makes sense, I wondered if it was something like that.

@nerrad nerrad closed this as completed Jul 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants