-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
css: Redesign message source textarea and close / cancel buttons. #29397
Conversation
Hello @zulip/design members, this pull request was labeled with the "redesign" label, so you may want to check it out! |
@alya This should be quick to test out |
ca83d1c
to
c25bcf6
Compare
Thanks! The text color looks darker to me than in the screenshot in the issue, but I don't know if that's an illusion or we changed plans since the design was posted? |
The button also needs to be restyled, so this change wouldn't close out #28701. |
@alya The demo has a more intense default text color (so it's for sent / rendered messages too) than we currently do, and the color here is the same as the current message text color. Thanks for pointing out the different button styling, I'll soon fix that in another commit |
@alya We use common styles for the message source close button (which the issue #28701 specifies) and other Close / Cancel buttons, specifically the Cancel buttons when editing a message and those in modals (screenshots added in PR description) and on billing pages. So this PR changes those too, to the style specified for the message source Close button. The border is only removed for message edit / source buttons though, not the modal ones. Do let me know if any of this needs to change! |
49b74ed
to
7f268ab
Compare
Hm, @terpimost , did you intend for this to apply to modals as well, or are you taking a separate pass there? |
Disabled Primary button shouldn't be grey. It should just be 0.5 transparent and cursor is default |
Related work: #29527 |
Any next steps needed here? Do we want to redesign the primary button in this same PR? @alya |
I think we should apply the primary button change on the same PR as this change, yeah. @sahil839 would it make sense for @N-Shar-ma to do that here, and then #29527 could be rebased on top of that? |
Yes, that would be fine. |
@alya Looked into this closer and I now see we use the same purple for all primary buttons: the Send button, the Save button when editing, and of course the main action button in modals. Do we want the disabled state of all of them to have |
I would imagine all of them, but I'll let @terpimost confirm. |
I suggest to approach disabled state as 0.5 by default in all cases and if in some case we have a negative feedback so a custom disabled state tines there |
@alya I've pushed changes making all modal buttons, and the message send / save buttons half opaque when disabled, and added screenshots in the PR description too. Please take a look! |
Cool, looks good to me in manual testing! (I did some spot-checking of places that I could think of.) |
I'm not sure I like the borderless cancel buttons -- the low-contrast boundary may be a problem, at least on my screen. But we can test-deploy and get some experience with it. I think aside from that detail I'd probably have just merged rather than testing. |
@N-Shar-ma can you post somewhere in #design to just raise visibility for the new cancel button styling (etc.) so we can get more feedback on it? I think probably we can plan to merge and fix-forward in any case, I just don't want to lose track of that as a thing to get attention on. |
When viewing the source of a message when not editable, the opacity of the read-only textarea would be reduced to 0.5, like for any other read- only textarea in dark mode. This was unnecessary for viewing message source, so the opacity for this case is now set to 1. Fixes: zulip#28701.
We change the background colors for the close / cancel / exit buttons in modals and messages (when editing them or viewing their source). The border is also removed for those buttons in messages.
So far, the Send buttons area would turn grey when the message could not be sent. The Save button when editing a message would also turn grey when the message could not be edited anymore. Now we simply make the buttons half opaque instead of turning them grey in a disabled state.
Earlier, the primary modal button always turned grey on being disabled, while other modal buttons remained as is in light mode, and grey in dark mode. Now the styling is made consistent across all modal buttons, by giving them all 50% opacity when disabled.
OK. I'm going to go ahead and merge and we can continue the discussion there; it's basically about one line of remaining code under discussion, and not something so visible that it'd feel bad to flip-flop on users a bit. |
css: Make all modal buttons half opaque when disabled, instead of grey.
Earlier, the primary modal button always turned grey on being disabled, while other modal buttons remained as is in light mode, and grey in dark mode. Now the styling is made consistent across all modal buttons, by giving them all 50% opacity when disabled.
css: Make message send / save buttons half opaque when disabled.
So far, the Send buttons area would turn grey when the message could not be sent. The Save button when editing a message would also turn grey when the message could not be edited anymore. Now we simply make the buttons half opaque instead of turning them grey in a disabled state.
css: Redesign exit / close buttons.
We change the background colors for the close / cancel / exit buttons in modals and messages (when editing them or viewing their source). The border is also removed for those buttons in messages.
message_edit: Show message source in full opacity.
When viewing the source of a message when not editable, the opacity of the read-only textarea would be reduced to 0.5, like for any other read- only textarea. This was unnecessary for viewing message source, so the opacity for this case is now set to 1.
Fixes: #28701.
Screenshots and screen captures:
Light:
Message edit / source
Modal (both enabled buttons)
Modal (both disabled buttons)
Disabled Send button
Dark:
Message edit / source
Modal (both enabled buttons)
Modal (both disabled buttons)
Disabled Send button
Self-review checklist
(variable names, code reuse, readability, etc.).
Communicate decisions, questions, and potential concerns.
Individual commits are ready for review (see commit discipline).
Completed manual review and testing of the following: