Skip to content

Commit

Permalink
Avoid animating global styles NavigatorScreen on initial render
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Apr 10, 2024
1 parent 04c68f8 commit 73fd919
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- `ExternalLink`: Use unicode arrow instead of svg icon ([#60255](https://github.com/WordPress/gutenberg/pull/60255)).
- `ProgressBar`: Move the indicator width styles from emotion to a CSS variable ([#60388](https://github.com/WordPress/gutenberg/pull/60388)).
- `Text`: Add `text-wrap: pretty;` to improve wrapping. ([#60164](https://github.com/WordPress/gutenberg/pull/60164)).
- `Navigator`: Navigation to the active path doesn't create a new location history. ([#60561](https://github.com/WordPress/gutenberg/pull/60561))

## 27.3.0 (2024-04-03)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ function routerReducer(
action: RouterAction
): RouterState {
let { screens, locationHistory, matchedPath } = state;

switch ( action.type ) {
case 'add':
screens = addScreen( state, action.screen );
Expand All @@ -158,6 +157,13 @@ function routerReducer(
locationHistory = goBack( state );
break;
case 'goto':
if (
locationHistory.length &&
action.path ===
locationHistory[ locationHistory.length - 1 ].path
) {
break;
}
locationHistory = goTo( state, action.path, action.options );
break;
case 'gotoparent':
Expand Down

0 comments on commit 73fd919

Please sign in to comment.