-
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
Fix button toggles. #18860
Fix button toggles. #18860
Conversation
Fixes #18825.
@jasmussen I thought we discussed this and agreed that consistency is better there :) The problem here is that you'll notice that the dropdowns in the toolbar don't have the same styles. Also, this assumes that all toolbars are these small bordered rectangles which is not always the case, I don't think the default Toolbar component has these styles. For example, you can trigger the "Top Toolbar" mode and you'll see that these new styles are not great because they don't allign with the styles of the other buttons in the top toolbar. I see two options:
|
Oh I guess, this restores the toggled state as well. So yeah! let's restore just that part (and not the hover styles etc...), also it makes me wonder why the toggled styles are not by default in the Button component instead of the Toolbar one. It seems that the component already has an |
I opened PR which refactors code to stop using Maybe we should land it first and apply all those styles using |
I also opened #18817 which ensures that we don't use Putting those two together, it should help to make it much easier to style those buttons. |
Yes, absolutely. But it's a somewhat non-trivial refactor, because the toggled state requires the hover style to be slightly inset. I agree it's in need of a refactor, but it feels like this refactor might be better saved for exploring an implementation of the UI in #18667. |
To clarify a bit further, I don't have a strong visual attachment to how things look in master right now — consider this more of a "revert" PR for the toggle state. If @gziolo has a better refactor, definitely feel free to merge that instead of this one! |
When I was playing with it on Friday, I wasted 2 or 3 hours, the issue was that the toggled button had this additional outline coming which aligned with the rest of buttons but it looked ugly 😅
I tend to agree. Let's apply the minimal set of changes to move forward. |
What about the minimal change for me to avoid regressions being a isToggled style added to the Button component. |
I opened #18868 with an alternative fix proposed. |
Closing in favor of #18868. |
Fixes #18825.
This restores the rules necessary for the delicate formatting. I know it's not pretty code, but I think we should restore it for now. We can revisit and very probably improve it a great deal if we look at the improvements from #18667. But that should be separate.