Skip to content
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

Site Editor: inconsistent undo/redo behavior with navigation block #38970

Closed
annezazu opened this issue Feb 21, 2022 · 8 comments
Closed

Site Editor: inconsistent undo/redo behavior with navigation block #38970

annezazu opened this issue Feb 21, 2022 · 8 comments
Assignees
Labels
[Block] Navigation Affects the Navigation Block [Feature] History History, undo, redo, revisions, autosave. [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Type] Bug An existing feature does not function as intended

Comments

@annezazu
Copy link
Contributor

Description

This came up as part of the FSE Outreach Program's All Things Media exploration. Of note, there are some similar issues here: #37171 #37170 Across the board, there seems to be some inconsistencies here for folks to dig into but trying to open specific use cases for now. There may need to be a tracking issue depending.

Step-by-step reproduction instructions

  1. Open Site Editor
  2. Add a navigation block and select a menu.
  3. Switching which menu the nav block is using.
  4. Try to use undo/redo options. Notice that if you had switched nav menus, it doesn't switch back and there's some visual glitching.

Screenshots, screen recording, code snippet

undo.redo.in.site.editor.mov

Environment info

  • WordPress 5.9
  • Gutenberg 12.6.0
  • TT2
  • Chrome
  • MacOS

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@annezazu annezazu added [Type] Bug An existing feature does not function as intended [Feature] History History, undo, redo, revisions, autosave. [Block] Navigation Affects the Navigation Block [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") labels Feb 21, 2022
@talldan
Copy link
Contributor

talldan commented Feb 22, 2022

Notice that if you had switched nav menus, it doesn't switch back

Hi @annezazu 👋 I think I could reproduce this. From what I can tell, pressing undo works the first time to change the menu back. But then pressing redo doesn't seem to work. I think that's what happens in the video too.

there's some visual glitching.

Does one of the menus have a Page List inside of it? It's hard to tell but it looks like the Page List loading spinner might be momentarily being shown when clicking undo.

This bit I couldn't reproduce, but there might be something more specific needed. Or it may have been fixed in trunk—I know @getdave and @jasmussen have been doing quite a bit of work on improving parts of the nav block.

@annezazu
Copy link
Contributor Author

That's correct! It seems to break on undo and the page list block is what was being used in the video.

Does one of the menus have a Page List inside of it? It's hard to tell but it looks like the Page List loading spinner might be momentarily being shown when clicking undo.

Yes, I'm seeing that "flashing" too. Thanks for digging in.

@jasmussen
Copy link
Contributor

@getdave and I just confirmed that the Page List comes with a Placeholder that has its own spinner in it. So that could be related.

But from what I can tell, the visual glitching is the new dashed-line placeholder design that very briefly appears in between loads. That issue should very probably be fixed by #38907. I've on my todo a small followup to avoid layout shifts in that loading state, which should polish up the last part of that.

@mrfoxtalbot
Copy link

mrfoxtalbot commented Oct 10, 2022

I can still reproduce this using Version 14.2.0

The undo seems to work just fine, it is the re-do that's getting stuck, and only if you edit a different block in between.

Screen.Capture.on.2022-10-10.at.17-53-17.mp4

@getdave
Copy link
Contributor

getdave commented Oct 12, 2022

it is the re-do that's getting stuck

@mrfoxtalbot Thank you for taking the time to test this.

Would it be possible to expand on the problem a little in written form?

  • What exactly is the "getting stuck"
  • How does this impact the user and how severe to you think it is?
  • What are the production steps?

This will really help when contributors start to look into the problem.

@mrfoxtalbot
Copy link

mrfoxtalbot commented Oct 17, 2022

Sure @getdave!

These are the steps:

  1. Add a navigation block and make some changes to it.
  2. Edit some other block in between editing the navigation menu
  3. Undo the changes
  4. Try to redo some of the changes to the nav block

I noticed that undoing works fine, but the "redo" option seems to stop working altogether if you mix changes to other blocks.

I do not think this is particularly severe, but something is not working as expected and it could have other ramifications.

Thank you!

@priethor priethor added this to Polish Apr 28, 2023
@priethor priethor moved this to 💻 Needs development in Polish Apr 28, 2023
@Mamaduka
Copy link
Member

I think this was fixed by #50911. I can't reproduce the issue when following the steps from @mrfoxtalbot - #38970 (comment).

@mrfoxtalbot
Copy link

Yup! I just tested this with 15.8.1 and undo/redo works fine now. Thank you @Mamaduka!

@priethor priethor moved this from Needs development to Done in Polish May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Navigation Affects the Navigation Block [Feature] History History, undo, redo, revisions, autosave. [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Type] Bug An existing feature does not function as intended
Projects
Status: Done
Development

No branches or pull requests

7 participants