-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Polish Custom HTML block #21711
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
Polish Custom HTML block #21711
Conversation
|
Size Change: +2.34 kB (0%) Total Size: 1.05 MB
ℹ️ View Unchanged
|
a56040c to
a592b2a
Compare
b0de19b to
ae1b693
Compare
fa9d1e2 to
4de241c
Compare
4de241c to
068f6d3
Compare
|
Thanks for iterating here @ZebulanStanphill. My main wonder is about the unselected state. It feels a little strong and I wonder if the border is needed? |
|
@karmatosed Since the Custom HTML block in non-preview mode isn't representative of the front-end, I figured I should make it stand out using the same borders as the block toolbar and placeholders, to make it clear that it's part of the block UI, not the content. |
7e4037e to
c16ca14
Compare
Could this add some confusion by making it look like the 'Edit as HTML' mode? I feel these two are different things, one is a block, the other is an editing mode and should look different, no? |
|
@enriquesanchez Functionally, they're exactly the same. In both cases, you're editing the HTML of the block. I see no reason to style them differently. |
c16ca14 to
f550b64
Compare
c0864b7 to
8059cd6
Compare
|
Changed styles again to match the latest "Edit as HTML" style introduced in #25539. |
8059cd6 to
e9a83b6
Compare
75ac705 to
6d7fa5b
Compare
|
Rebased after the changes in #26055. |
6d7fa5b to
3722db3
Compare
3722db3 to
edefa6c
Compare
edefa6c to
1c73c3d
Compare
1c73c3d to
d7e5080
Compare
|
Several of the changes in this PR have already made it into |
Description
This PR polishes the Custom HTML block. Notable changes:
PlainTextv1 to usingTextareaAutosizedirectly.defaultStylesinto a constant defined outside of the component, so it doesn't get recreated every time theuseSelectcallback runs.wp-block-htmlCSS class toblock-library-html.components-tab-buttonCSS class that appears to have no visible effect or purpose.margin-bottomeditor style.Screenshots
Unselected
Before
After
Selected; textarea NOT focused
Before
After
Selected; textarea focused
Before
After
Navigation mode AKA select tool
Before
After
Checklist: