Repository navigation
Fix the navigation issue inside cover blocks #66093
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
Merged
aaronrobertshaw
merged 8 commits into
WordPress:trunk
from
renatho:fix/navigation-inside-cover-solution-2
Oct 17, 2024
Merged
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
eb4dc79
Implement a simple solution for the navigation open inside the cover
renatho 64c14d3
Add the has-modal-open to the editor reproducing the same behavior of…
renatho b6f62e2
Add test
renatho 10e1007
Remove not necessary comment
renatho 0a244ec
Update check to see if second cover inner blocks container is clickable
renatho 0850938
Add useEffect cleanup to remove modal class
renatho efe0a9e
Refactor html element selector
renatho eaabc88
Make sure element exists before trying to remove the class
renatho File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Refactor html element selector
- Loading branch information
commit efe0a9ea417413c76635ba1e0fda5c52ff551ec9
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does feel a bit odd for a block to be manipulating the root node but if this brings it inline with the frontend perhaps it's already been decided this is ok?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does feel unusual. Is there any precedent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this actually needed? I used the testing instructions against
trunkand was able to replicate the issue but only on the front of the site and not in the Editor.Screen.Capture.on.2024-10-15.at.13-07-37.mp4
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, it's really needed because also happens in the editor.
Since it's the behavior in the frontend, I think it would be fine to have the same behavior replicated in the editor.
I noticed sometimes some kind of cache. I didn't dig into to figure out, but sometimes when it delayed I restarted the build and restarted the browser, also marking the "Disable cache" in my network tab.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are there specific steps to replicate that state? I tried following the PR instructions but it didn't manifest. Maybe it was prior to the rebase?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I raised this PR. I'd appreciate if someone could review it to improve the solution.
I also tried to update the fixtures through
npm run fixtures:regenerate, but I received some errors. If someone could explain me what is happening and how I could fix, it would also be very helpful to save some time. =)Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, the only real sign within the editor should be a console message stating the block was migrated.
This PR says it should be in the 19.6 release. So if we do go with the alternative solution soon I don't think there'll be any need to keep the
.has-modal-openclass styles around for BC. The change introducing it won't have been released in other words.I'll comment to that effect when I get to review the alternate PR.
Without looking I can't say if this is the reason or not but another misconception about deprecations is that they are chained together to migrate one deprecated version to the next, all the way to the latest version.
Instead, all deprecations need to be updated (if required) to migrate that deprecated version to the latest. We can continue the discussion over on #66249 as needed.
Thanks for spinning it up 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's good to have that anyway, so it's fixed everywhere not needing a manual save in all the broken posts/templates. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wasn't the original issue only in the editor? If that's the case, the deprecation will migrate and fix that display without needing further styles.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Connecting the points, I sent an answer here: #66249 (comment)