-
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
Group: Fix click-first state #43513
Group: Fix click-first state #43513
Conversation
Size Change: -71 B (0%) Total Size: 1.24 MB
ℹ️ View Unchanged
|
fb21371
to
c96acce
Compare
@tellthemachines The tests seem to keep failing here, do you have any insights why that might be? |
I see the styles changed don't specifically target Group blocks. Could there be side effects we're not aware of? |
Sorry the tests were re-running while I pinged you. They failed again, and it looks like there are a few timeouts that seem flaky, but there was a
Good observation. It does bring the click-state also to the Columns block, like so: I suppose the code should be moved to the Appender component if we want this, or should we start by scoping it better? I tend to think that it's useful to highlight empty containers with the dashed lines, rather than with the appender. Let me know if you see anything else related (a dashed box where it shouldn't be) |
50fbbcc
to
3f96c2b
Compare
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.
I tend to think that it's useful to highlight empty containers with the dashed lines, rather than with the appender
Agreed, it does look better!
I suppose the code should be moved to the Appender component if we want this, or should we start by scoping it better?
If we want to apply this globally to any empty container with layout, it makes more sense in the Appender, yes. Otherwise, if for some reason the Group block isn't there (or if we ever change the CSS loading logic to only load styles for blocks that exist on the page), the styles won't apply to Column.
I pushed a fix for the inserting blocks tests, because they were failing as a result of this change, and rebased so hopefully the tests all pass now!
3f96c2b
to
b26ff02
Compare
Thank you for fixing the tests! From this point, we can do two things. We can scope the rules to just the group block. Columns then doesn't get the click state. TT2 uses columns for the main index template, it'll look like old times: Or we can move the code. I rebased and did that in b26ff02. That makes the column keep the click state: I like the latter. What do you think? |
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.
Yeah, I think this is better! Code looks good, and works as expected ✅
What?
#40664 added a clickable state for an empty group. Recent architecture changes made that code break, so there isn't a clickable state anymore:
This PR fixes it:
Testing Instructions
Insert an empty group block and verify it has a clickable state.