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

css: Redesign message source textarea and close / cancel buttons. #29397

Merged
merged 4 commits into from
Apr 28, 2024

Conversation

N-Shar-ma
Copy link
Collaborator

@N-Shar-ma N-Shar-ma commented Mar 21, 2024

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
image
Modal (both enabled buttons)
image
Modal (both disabled buttons)
image
Disabled Send button
image

Dark:

Message edit / source
image
Modal (both enabled buttons)
image
Modal (both disabled buttons)
image
Disabled Send button
image

Self-review checklist
  • Self-reviewed the changes for clarity and maintainability
    (variable names, code reuse, readability, etc.).

Communicate decisions, questions, and potential concerns.

  • Explains differences from previous plans (e.g., issue description).
  • Highlights technical choices and bugs encountered.
  • Calls out remaining decisions and concerns.
  • Automated tests verify logic where appropriate.

Individual commits are ready for review (see commit discipline).

  • Each commit is a coherent idea.
  • Commit message(s) explain reasoning and motivation for changes.

Completed manual review and testing of the following:

  • Visual appearance of the changes.
  • Responsiveness and internationalization.
  • Strings and tooltips.
  • End-to-end functionality of buttons, interactions and flows.
  • Corner cases, error conditions, and easily imagined bugs.

@zulipbot zulipbot added size: S redesign Part of the webapp redesign project, including blockers. labels Mar 21, 2024
@zulipbot
Copy link
Member

Hello @zulip/design members, this pull request was labeled with the "redesign" label, so you may want to check it out!

@N-Shar-ma
Copy link
Collaborator Author

@alya This should be quick to test out

@N-Shar-ma N-Shar-ma force-pushed the edit-opacity branch 2 times, most recently from ca83d1c to c25bcf6 Compare March 21, 2024 17:53
@alya
Copy link
Contributor

alya commented Mar 25, 2024

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?

@alya
Copy link
Contributor

alya commented Mar 25, 2024

The button also needs to be restyled, so this change wouldn't close out #28701.

@N-Shar-ma
Copy link
Collaborator Author

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?

@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

@N-Shar-ma N-Shar-ma changed the title message_edit: Show message source in full opacity. css: Redesign message source textarea and close / cancel buttons. Apr 2, 2024
@N-Shar-ma
Copy link
Collaborator Author

@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!

@N-Shar-ma N-Shar-ma force-pushed the edit-opacity branch 2 times, most recently from 49b74ed to 7f268ab Compare April 2, 2024 16:17
@alya
Copy link
Contributor

alya commented Apr 3, 2024

Hm, @terpimost , did you intend for this to apply to modals as well, or are you taking a separate pass there?

@alya
Copy link
Contributor

alya commented Apr 3, 2024

Also, have we thought about how this button looks next to a disabled main action button? This might be OK, but I just want to make sure we explicitly consider it. It will come up a lot in modals.
CleanShot 2024-04-03 at 11 24 47

CleanShot 2024-04-03 at 11 25 06

@terpimost
Copy link
Collaborator

Disabled Primary button shouldn't be grey. It should just be 0.5 transparent and cursor is default

@alya
Copy link
Contributor

alya commented Apr 3, 2024

Related work: #29527

@N-Shar-ma
Copy link
Collaborator Author

N-Shar-ma commented Apr 5, 2024

Any next steps needed here? Do we want to redesign the primary button in this same PR? @alya

@alya
Copy link
Contributor

alya commented Apr 10, 2024

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?

@sahil839
Copy link
Collaborator

Yes, that would be fine.

@N-Shar-ma
Copy link
Collaborator Author

@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 opacity: 0.5 instead of grey? Or do we only want this change for a certain subset of primary buttons, like just the modal ones? FYI @terpimost

@alya
Copy link
Contributor

alya commented Apr 11, 2024

I would imagine all of them, but I'll let @terpimost confirm.

@terpimost
Copy link
Collaborator

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

@N-Shar-ma
Copy link
Collaborator Author

@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!

@alya
Copy link
Contributor

alya commented Apr 15, 2024

Cool, looks good to me in manual testing! (I did some spot-checking of places that I could think of.)

@alya alya added the chat.zulip.org review Added by maintainers when a PR requires chat.zulip.org testing to proceed. label Apr 15, 2024
@timabbott
Copy link
Sponsor Member

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.

@timabbott timabbott added the deployed on chat.zulip.org Added by maintainers when a PR is currently being tested on chat.zulip.org. label Apr 23, 2024
@timabbott
Copy link
Sponsor Member

@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.
@N-Shar-ma
Copy link
Collaborator Author

@timabbott timabbott merged commit 7104c06 into zulip:main Apr 28, 2024
7 checks passed
@timabbott
Copy link
Sponsor Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chat.zulip.org review Added by maintainers when a PR requires chat.zulip.org testing to proceed. deployed on chat.zulip.org Added by maintainers when a PR is currently being tested on chat.zulip.org. redesign Part of the webapp redesign project, including blockers. size: M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Redesign "View message source" UI
6 participants