-
Notifications
You must be signed in to change notification settings - Fork 219
Switch to correct view if parent block is selected #5427
Comments
Thank you for reporting the bug @nielslange. I followed the described steps above to reproduce the bug, but the view did change after clicking on the parent blocks. I made the tests using the latest trunk (Version 6.8.0-dev) both locally and using Pressable (i.e. Created a plugin package in ZIP format for this one). Screenshots
On the other hand, the current version that can be installed from the plugins menu (i.e. Version: 6.7.1) does indeed have this bug. The view changes only when clicking on the inner blocks. If you did use the latest trunk for your tests maybe testing on a fresh WordPress install can give us more insight. |
I still see this problem, @tarhi-saad. When selecting the inner blocks, the view switches as expected. However, when selecting the parent blocks |
Hi @nielslange! I've dug deeper into this issue: TL;DR: This bug was fixed in #5446. It was merged into the trunk branch 11 days ago.
As to why the view switch for the parent blocks wasn't working in the PR you've provided (i.e. #5358): On the other hand, it was fixed in #5446 by comparing the selected block name with the currently displayed view name (see line #51). This means if the element is This last fix (#5446) is only available in the last release (6.8.0). That's why the bug is still occurring on the public version of the Woo Block plugin (i.e. v6.7.1). A simple test I've done to make sure that this last PR #5446 is indeed fixing this bug:
|
Great investigation, @tarhi-saad! 👏 Thank you so much for investigate the cause of this problem. I can confirm that the problem is solved with 6.8.0, based on the PR you mentioned. As this issue is solved, I'll close this PR. |
Describe the bug
When adding the cart block to a page and opening the list view, the view between the
Filled Cart
and theEmpty Cart
can only be switched by clicking on an inner block within these blocks, e.g. theCart Items block
or theImage block
. When clicking on the parent blocks itself (Filled Cart
orEmpty Cart
) within the list view, the view does not change.To reproduce
Filled Cart
andEmpty Cart
.Expected behavior
The view should not only change when clicking on one of the inner blocks, but also when clicking on one of the parent blocks.
Screenshots
Additional context
In #5358, we fixed the view switch for inner blocks. This issue aims to fix the view switch for the parent blocks as well.
The text was updated successfully, but these errors were encountered: