Skip to content

Commit

Permalink
DocumentBar: Fix browser warning error when entering edit mode (#59193)
Browse files Browse the repository at this point in the history
Co-authored-by: t-hamano <[email protected]>
Co-authored-by: ramonjd <[email protected]>
  • Loading branch information
3 people authored Feb 20, 2024
1 parent e6b93dc commit 5851fd5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/editor/src/components/document-bar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import { useSelect, useDispatch } from '@wordpress/data';
import {
Button,
__experimentalText as Text,
__experimentalHStack as HStack,
__unstableMotion as motion,
__unstableAnimatePresence as AnimatePresence,
} from '@wordpress/components';
Expand Down Expand Up @@ -155,11 +154,8 @@ export default function DocumentBar() {
onClick={ () => openCommandCenter() }
size="compact"
>
<HStack
as={ motion.div }
<motion.div
className="editor-document-bar__title"
spacing={ 1 }
justify="center"
// Force entry animation when the back button is added or removed.
key={ hasBackButton }
initial={
Expand Down Expand Up @@ -193,7 +189,7 @@ export default function DocumentBar() {
>
{ title }
</Text>
</HStack>
</motion.div>
<span className="editor-document-bar__shortcut">
{ displayShortcut.primary( 'k' ) }
</span>
Expand Down
4 changes: 4 additions & 0 deletions packages/editor/src/components/document-bar/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
flex-grow: 1;
overflow: hidden;
color: $gray-800;
gap: $grid-unit-05;
display: flex;
justify-content: center;
align-items: center;

// Offset the layout based on the width of the ⌘K label. This ensures the title is centrally aligned.
@include break-small() {
Expand Down

1 comment on commit 5851fd5

@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 5851fd5.
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/7972831897
📝 Reported issues:

Please sign in to comment.