-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Try to navigate to section: /revisions from the revisions button #67660
base: trunk
Are you sure you want to change the base?
Conversation
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
Size Change: +132 B (+0.01%) Total Size: 1.83 MB
ℹ️ View Unchanged
|
a5017c3
to
3a01d40
Compare
Flaky tests detected in a1543d8. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/12226926868
|
@@ -138,19 +138,21 @@ function ScreenRevisions() { | |||
{ hasRevisions && | |||
( editorCanvasContainerView === | |||
'global-styles-revisions:style-book' ? ( | |||
<StyleBook | |||
<GlobalStylesStyleBook |
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.
As explanation: a shared component is required as revisions needs to send a global styles config to the style book.
setEditorCanvasContainerView( 'global-styles-revisions' ); | ||
}, [ openGlobalStyles, setEditorCanvasContainerView ] ); | ||
const openRevisions = useCallback( () => { | ||
if ( 'style-book' === editorCanvasContainerView ) { |
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.
Note: this PR has exposed the clunky way we're loading the editor canvas views. There are significant "flashes" when navigating between revisions and the main styles panel in view mode.
I'm not sure of an alternative that maintains current functionality, probably to create a bespoke stylebook component for the view mode, which is duplication of effort and maintenance.
Or better handling of transitions between editor views using CSS or something.
All this is keeping the pot simmering while a better presentation layer to load global-styles related editor views is worked out.
Exploratory stage.
What?
Why?
How?
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast