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

Additional CSS field is no longer full-height in Site Editor #68928

Open
annezazu opened this issue Jan 29, 2025 · 6 comments · May be fixed by #68993
Open

Additional CSS field is no longer full-height in Site Editor #68928

annezazu opened this issue Jan 29, 2025 · 6 comments · May be fixed by #68993
Assignees
Labels
CSS Styling Related to editor and front end styles, CSS-specific issues. [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@annezazu
Copy link
Contributor

In WordPress 6.7, the following is shown for the additional CSS field:

Image

In WordPress 6.7 with GB 20.0, the following is shown which results in a much smaller field:

Image

Reporting as it's unclear to me if it's intentional or a regression :)

@annezazu annezazu added [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Type] Enhancement A suggestion for improvement. CSS Styling Related to editor and front end styles, CSS-specific issues. labels Jan 29, 2025
@Rishit30G
Copy link
Contributor

Rishit30G commented Jan 29, 2025

Thanks for sharing this,

I can confirm that the issue is present,

WP 6.7 and with Gutenberg Plugin ( 20.1.0 ) enabled:

Image

WP 6.7 and Gutenberg Plugin ( 20.1.0 ) disabled:

Image

Edit: A quick fix to this is by removing the flex: 1 1 auto as it's making the textarea occupy the remaining space

Screen.Recording.2025-01-29.at.9.21.19.AM.mov

@t-hamano
Copy link
Contributor

t-hamano commented Jan 29, 2025

As I recall, this has to do with refactoring the Navigator component.

Adding some CSS like below should solve the issue, but there may be a more ideal approach. cc @WordPress/gutenberg-components

diff --git a/packages/edit-site/src/components/global-styles/style.scss b/packages/edit-site/src/components/global-styles/style.scss
index 99b1c8c92b..dae6a9df73 100644
--- a/packages/edit-site/src/components/global-styles/style.scss
+++ b/packages/edit-site/src/components/global-styles/style.scss
@@ -228,9 +228,14 @@
        }
 }
 
+.edit-site-global-styles-sidebar__navigator-provider {
+       height: 100%;
+}
+
 .edit-site-global-styles-sidebar__navigator-screen {
        display: flex;
        flex-direction: column;
+       height: 100%;
 }
 
 .edit-site-global-styles-sidebar__navigator-screen .single-column {

Either way, I'll be adding this to the 6.8 project board.

@t-hamano t-hamano added [Type] Bug An existing feature does not function as intended and removed [Type] Enhancement A suggestion for improvement. labels Jan 29, 2025
@ciampo
Copy link
Contributor

ciampo commented Jan 29, 2025

@t-hamano 's suggestion seems correct in principle, although I recommend testing the sidebar thoroughly , especially paying attention to the in and out animations of each screen (and potential scrollbar flickers).

Apart from that, I noticed two potential additional bugs:

It looks like the "additional CSS" navigator screen can't be triggered a second time, suggesting that there may be a bug in how the global styles sidebar is navigating away from the screen:

Kapture.2025-01-29.at.10.54.49.mp4

Also, the generated classname for the navigator components seem weird, as if the same classnames is being concatenated more than once

Image

I didn't open a separate issue in case folks can't repro

@Rishit30G
Copy link
Contributor

@t-hamano Thank you for your suggestions! After implementing the changes you shared, I noticed that the style of the input extends to full height when the Gutenberg plugin is enabled, would that be the intended behaviour ?

Image

@ciampo I did try reproducing the "Additional CSS" button issue ( with Gutenberg Plugin disabled ), but for me it seems to be working fine
Please let me know if I'm missing something 🙇🏻

Screen.Recording.2025-01-29.at.4.46.34.PM.mov

@t-hamano
Copy link
Contributor

It looks like the "additional CSS" navigator screen can't be triggered a second time, suggesting that there may be a bug in how the global styles sidebar is navigating away from the screen:

I was able to reproduce this issue when the Gutenberg plugin was enabled. See #68949

@t-hamano
Copy link
Contributor

After further investigation, I found that this issue was caused by #65522. However, #65522 is a necessary change for the Navigator component's exit animation, so it cannot be reverted.

The approach I suggested in this comment should not affect the animation, since it simply changes the height.

@Rishit30G Want to try this approach?

@shail-mehta shail-mehta linked a pull request Feb 1, 2025 that will close this issue
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Feb 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CSS Styling Related to editor and front end styles, CSS-specific issues. [Feature] Site Editor Related to the overarching Site Editor (formerly "full site editing") [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
Development

Successfully merging a pull request may close this issue.

5 participants