Skip to content
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

Editor topbar: reorder the actions on the right #65163

Merged
merged 3 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/edit-widgets/src/components/header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ function Header() {
) }
</div>
<div className="edit-widgets-header__actions">
<SaveButton />
<PinnedItems.Slot scope="core/edit-widgets" />
<SaveButton />
<MoreMenu />
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/components/editor/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ function Editor( {
<EditorInterface { ...props }>
{ extraContent }
</EditorInterface>
{ children }
Copy link
Contributor Author

@talldan talldan Sep 9, 2024

Choose a reason for hiding this comment

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

<Sidebar> is the settings sidebar, which renders the settings toggle in the topbar.

The global styles toggle is rendered through the children, so moving the children to render first should reorder the items.

My main concern though is that it might still allow plugins to render toggles before/after the items inconsistently. I need to do some more testing around that.

<Sidebar
onActionPerformed={ onActionPerformed }
extraPanels={ extraSidebarPanels }
/>
{ children }
</ExperimentalEditorProvider>
) }
</>
Expand Down
6 changes: 3 additions & 3 deletions packages/editor/src/components/header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@ function Header( {
forceIsAutosaveable={ forceIsDirty }
/>
<PostViewLink />
{ ( isWideViewport || ! showIconLabels ) && (
<PinnedItems.Slot scope="core" />
) }
{ ! customSaveButton && (
<PostPublishButtonOrToggle
forceIsDirty={ forceIsDirty }
Expand All @@ -151,9 +154,6 @@ function Header( {
/>
) }
{ customSaveButton }
{ ( isWideViewport || ! showIconLabels ) && (
<PinnedItems.Slot scope="core" />
) }
<MoreMenu />
</motion.div>
</div>
Expand Down
Loading