Skip to content

Commit

Permalink
Global styles: do not navigate twice to home screen when opening the …
Browse files Browse the repository at this point in the history
…sidebar (#65523)

* Global styles: do not navigate twice to home screen on sidebar load

* Remove whole default block

Co-authored-by: ciampo <mciampini@git.wordpress.org>
Co-authored-by: ramonjd <ramonopoly@git.wordpress.org>
Co-authored-by: andrewserong <andrewserong@git.wordpress.org>
  • Loading branch information
4 people authored and gutenbergplugin committed Oct 2, 2024
1 parent 2fc00b8 commit 7d60169
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions packages/edit-site/src/components/global-styles/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,19 +271,6 @@ function GlobalStylesEditorCanvasContainerLink() {
goTo( '/' );
}
break;
default:
/*
* Example: the user has navigated to "Browse styles" or elsewhere
* and changes the editorCanvasContainerView, e.g., closes the style book.
* The panel should not be affected.
* Exclude revisions panel from this behavior,
* as it should close when the editorCanvasContainerView doesn't correspond.
*/
if ( path !== '/' && ! isRevisionsOpen ) {
return;
}
goTo( '/' );
break;
}
}, [ editorCanvasContainerView, isRevisionsOpen, goTo ] );
}
Expand Down

1 comment on commit 7d60169

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 7d60169.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/11140503834
📝 Reported issues:

Please sign in to comment.