Open Mamaduka opened 6 months ago
Indeed, this is currently tracked in the "navigate" metric. So improving that one would be the goal.
Do you think just wrapping with a transition would be enough?
Do you think just wrapping with a transition would be enough?
I did give it a try but didn't see any improvements.
When switching page selection, the UI can become unresponsive if the selected page has large content.
I think we need a way to mark
router
changes as transitions, which can be interrupted by the user's next action. React'suseTransition
has a similar example in the docs - https://react.dev/reference/react/useTransition#examplescc @youknowriad, @oandregal, @ntsekouras
Testing instructions
Screencast
You can see the "Large Page" content flashes before the selection is updated again.
https://github.com/WordPress/gutenberg/assets/240569/00253299-11f2-423e-9a04-aa76510a45b9