-
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
Editor: Unify Header component. #61273
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Size Change: -2.22 kB (-0.13%) Total Size: 1.74 MB
ℹ️ View Unchanged
|
@jasmussen Would you be able to track the style issues we have in trunk in an issue so we don't forget about it. (Small Panel header, double border)? I'll be looking at the issues that are specific to this PR. |
I was not actually able to reproduce the tiny global styles panel header, not sure what came up there. But yes, I tracked these two issues: |
@jasmussen for the global styles panel header, you need to be on a panel with a long scrollbar I think (like when opening the "blocks panel) |
Reported the collapsing heading: #61283 |
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.
Testing well for me. Love all the red!
6860edd
to
7ac66fa
Compare
This one should be ready for a final review. |
|
||
const { Header: EditorHeader } = unlock( editorPrivateApis ); | ||
|
||
function Header( { setEntitiesSavedStatesCallback } ) { | ||
const _isPreviewingTheme = isPreviewingTheme(); | ||
const hasDefaultEditorCanvasView = ! useHasEditorCanvasContainer(); |
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.
Maybe we should change the variable name and then drop the negations?
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.
The changes test well for me ✅
Some of the e2e tests will need to be adjusted to account for the design changes.
63efe53
to
a55a2ae
Compare
Ok I think I found a way to fix the mobile tests by not exposing the Header component in mobile. |
Flaky tests detected in aeb2f34. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/9002358831
|
The error seems similar to the one described here. We solved it by adding the mobile native version of the file to avoid importing the package
Yep, this solution should also work. |
Squashed commit of the following: commit 40c0fd7 Author: Jon Surrell <[email protected]> Date: Wed May 8 18:55:56 2024 +0200 Patch react-autosize-textarea for updated types commit 69cf754 Author: Jon Surrell <[email protected]> Date: Wed May 8 18:48:37 2024 +0200 upgrade framer-motion commit b383044 Author: Jon Surrell <[email protected]> Date: Wed May 8 18:34:44 2024 +0200 Upgrade @use-gesture/react commit fdf93ae Author: Jon Surrell <[email protected]> Date: Wed May 8 18:32:11 2024 +0200 Go bonkers on the global vars commit cc43b8c Author: Jon Surrell <[email protected]> Date: Wed May 8 16:46:39 2024 +0200 Fix the process problem commit 548145e Author: Jon Surrell <[email protected]> Date: Wed May 8 13:33:23 2024 +0200 No more skipLibCheck commit 1eb7644 Author: Miguel Fonseca <[email protected]> Date: Wed May 8 16:33:10 2024 +0100 build: Suggest workaround if `tsc --build` fails (#61501) Following the merge of #60796, developers may face build issues that require package types to be rebuilt. The problem is that `tsc --build` fails somewhat silently -- or rather, there is some output, but it's not clear in the console which stage of the `build:package-types` command failed, and hence what the workaround should be. This commit alleviates the issue by logging a helpful message in the console if `tsc --build` fails: tsc failed. Try cleaning up first: `npm run clean:package-types` commit 14ecb1d Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed May 8 09:49:20 2024 -0400 Bump actions/checkout from 4.1.4 to 4.1.5 in the github-actions group (#61449) Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 4.1.4 to 4.1.5 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@0ad4b8f...44c2b7a) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: desrosj <[email protected]> commit e899475 Author: Marin Atanasov <[email protected]> Date: Wed May 8 16:48:50 2024 +0300 RadioControl: Fix shrinking radio controls (#61476) Co-authored-by: tyxla <[email protected]> Co-authored-by: jameskoster <[email protected]> commit 839c17d Author: Riad Benguella <[email protected]> Date: Wed May 8 14:39:34 2024 +0100 Editor: Unify Header component. (#61273) Co-authored-by: youknowriad <[email protected]> Co-authored-by: Mamaduka <[email protected]> Co-authored-by: jeryj <[email protected]> Co-authored-by: jasmussen <[email protected]> commit 2c2f899 Author: Ella <[email protected]> Date: Wed May 8 20:30:44 2024 +0900 Revert "useBlockSync: remove isControlled effect" (#61480) Co-authored-by: ellatrix <[email protected]> Co-authored-by: youknowriad <[email protected]>
Related #52632
What?
We're in a middle of an effort to merge the post and site editors under the @wordpress/editor abstraction. As part of this, this PR unifies the Header component between both editors.
There are some small differences between the editors though:
Also the PR includes a lot of styles and classnames moved around, so let's make sure we test for any visual regressions in the header in the different modes.
Testing Instructions
Please test the headers of both post and site editors (especially site editors) and check any regressions.