-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 <sirreal@users.noreply.github.com> Date: Wed May 8 18:55:56 2024 +0200 Patch react-autosize-textarea for updated types commit 69cf754 Author: Jon Surrell <sirreal@users.noreply.github.com> Date: Wed May 8 18:48:37 2024 +0200 upgrade framer-motion commit b383044 Author: Jon Surrell <sirreal@users.noreply.github.com> Date: Wed May 8 18:34:44 2024 +0200 Upgrade @use-gesture/react commit fdf93ae Author: Jon Surrell <sirreal@users.noreply.github.com> Date: Wed May 8 18:32:11 2024 +0200 Go bonkers on the global vars commit cc43b8c Author: Jon Surrell <sirreal@users.noreply.github.com> Date: Wed May 8 16:46:39 2024 +0200 Fix the process problem commit 548145e Author: Jon Surrell <sirreal@users.noreply.github.com> Date: Wed May 8 13:33:23 2024 +0200 No more skipLibCheck commit 1eb7644 Author: Miguel Fonseca <150562+mcsf@users.noreply.github.com> 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] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: desrosj <desrosj@git.wordpress.org> commit e899475 Author: Marin Atanasov <8436925+tyxla@users.noreply.github.com> Date: Wed May 8 16:48:50 2024 +0300 RadioControl: Fix shrinking radio controls (#61476) Co-authored-by: tyxla <tyxla@git.wordpress.org> Co-authored-by: jameskoster <jameskoster@git.wordpress.org> commit 839c17d Author: Riad Benguella <benguella@gmail.com> Date: Wed May 8 14:39:34 2024 +0100 Editor: Unify Header component. (#61273) Co-authored-by: youknowriad <youknowriad@git.wordpress.org> Co-authored-by: Mamaduka <mamaduka@git.wordpress.org> Co-authored-by: jeryj <jeryj@git.wordpress.org> Co-authored-by: jasmussen <joen@git.wordpress.org> commit 2c2f899 Author: Ella <4710635+ellatrix@users.noreply.github.com> Date: Wed May 8 20:30:44 2024 +0900 Revert "useBlockSync: remove isControlled effect" (#61480) Co-authored-by: ellatrix <ellatrix@git.wordpress.org> Co-authored-by: youknowriad <youknowriad@git.wordpress.org>
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.