-
Notifications
You must be signed in to change notification settings - Fork 249
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
Tweak dark theme #1213
base: main
Are you sure you want to change the base?
Tweak dark theme #1213
Conversation
Please clean up your commit history and post again to request a review. See here for guidelines. |
525b063
to
3af0d2e
Compare
I’ve cleaned up the commit history by removing unnecessary merge commits into the This is my first time using Apologies for any confusion. Please review the updated PR. |
The |
Thanks! I'll let other folks take a look at this one. |
Hi! Please read through the commit style guide (also previously linked by Alya) linked in our README and fix the commit message: https://github.com/zulip/zulip-flutter?tab=readme-ov-file#submitting-a-pull-request |
076d0de
to
139d4e5
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.
Thanks for the PR! I noted the differences between this revision and the Figma design after going through lib/widgets/message_list.dart
and some part of lib/widgets/compose_box.dart
for colors used in the widgets.
Some of the comments are just about different colors being used, and others request the addition/removal of variables. It should be fine to include color adjustments all in a single commit, but for adding/removing variables, let's try to have separate commits for the ones added, so it is easier to see which variables they replace. Consider using the NFC tag if a commit is a pure refactor.
I think there are also changes to the autocomplete window, but that should be addressed in #995,
Adjusted the colors for `foreground` in `DesignVariables` and `dateSeparator` in `MessageListTheme` as asked. `foreground`: zulip#1213 (comment) `dateSeparator`: zulip#1213 (comment)
Added `labelTime` variable in `MessageListTheme` that replaces the `dateSeparatorText` and `messageTimestamp` variable according to the latest design. `labelTime`: zulip#1213 (comment)
9c71065
to
139d4e5
Compare
Adjusted the colors for `foreground` in `DesignVariables` and `dateSeparator` in `MessageListTheme` as asked. `foreground`: zulip#1213 (comment) `dateSeparator`: zulip#1213 (comment)
Added `labelTime` variable in `MessageListTheme` that replaces the `dateSeparatorText` and `messageTimestamp` variable according to the latest design. `labelTime`: zulip#1213 (comment)
Adjusted the colors for `foreground` in `DesignVariables` and `dateSeparator` in `MessageListTheme` as asked. `foreground`: zulip#1213 (comment) `dateSeparator`: zulip#1213 (comment)
Added `labelTime` variable in `MessageListTheme` that replaces the `dateSeparatorText` and `messageTimestamp` variable according to the latest design. `labelTime`: zulip#1213 (comment)
56f8fdb
to
2a11a43
Compare
Added `labelTime` variable in `MessageListTheme` that replaces the `dateSeparatorText` and `messageTimestamp` variable according to the latest design. `labelTime`: zulip#1213 (comment)
2a11a43
to
ce64ca5
Compare
Adjusted the colors for `foreground` in `DesignVariables` and `dateSeparator` in `MessageListTheme` as asked. `foreground`: zulip#1213 (comment) `dateSeparator`: zulip#1213 (comment)
Added `labelTime` variable in `MessageListTheme` that replaces the `dateSeparatorText` and `messageTimestamp` variable according to the latest design. `labelTime`: zulip#1213 (comment)
ce64ca5
to
c6aca86
Compare
Removed `colorMessageHeaderIconInteractive` from `DesignVariables` and used `title` in place of it as per the design guidelines. discussion: zulip#1213 (comment)
Removed `senderName` & `recipientHeaderText` from `MessageListTheme` and used `title` in place of it as per the design guidelines. discussion: zulip#1213 (comment)
Adjusted the colors for `foreground` in `DesignVariables` and `dateSeparator` in `MessageListTheme` as asked. `foreground`: zulip#1213 (comment) `dateSeparator`: zulip#1213 (comment)
Added `labelTime` variable in `MessageListTheme` that replaces the `dateSeparatorText` and `messageTimestamp` variable according to the latest design. `labelTime`: zulip#1213 (comment)
Removed `colorMessageHeaderIconInteractive` from `DesignVariables` and used `title` in place of it as per the design guidelines. discussion: zulip#1213 (comment)
Removed `senderName` & `recipientHeaderText` from `MessageListTheme` and used `title` in place of it as per the design guidelines. discussion: zulip#1213 (comment)
2f4089e
to
4b5405d
Compare
Hi @PIG208,
Have a review of these changes and tell if anything else is required regarding this issue. |
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.
Thanks for the update! The changes mostly look good to me, except for the first commit that adjusts a bunch of colors. It turned out that "[nfc]" is not applicable for the commits, and that's fine. They are useful to mark commits that are meant to incur no behavioral changes, so the reviewer can focus on the non-nfc commits.
The final commit of the PR needs a line to fix the issue:
...(other stuff)...
Fixes: #973
lib/widgets/message_list.dart
Outdated
recipientHeaderText: const HSLColor.fromAHSL(0.8, 0, 0, 1).toColor(), | ||
dateSeparator: Colors.white.withValues(alpha: 51), | ||
dateSeparatorText: const HSLColor.fromAHSL(0.5, 0, 0, 1).toColor(), | ||
dmRecipientHeaderBg: const HSLColor.fromAHSL(1, 0, 0, 0.14).toColor(), |
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.
Could you identify where this color (dmRecipientHeaderBg
) comes from? I looked at https://www.figma.com/design/1JTNtYo9memgW7vV6d0ygq/Zulip-Mobile?node-id=3702-28206&p=f&t=dBCq6jmgNML8Joly-0 but couldn't find it.
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.
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.
Do you have a link the the design? Selecting the frame and then copying the URL should do. For new colors or adjustments the Figma link should also be included in the commit messages.
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.
- This is design link for
dmRecipientHeaderBg
. - As I have mentioned above, it is represented using
bg-top-bar
in the figma design file with valueHSLColor.fromAHSL(1, 0, 0, 0.14).toColor()
.
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.
Thanks for the link!
As I have mentioned above, it is represented using bg-top-bar in the figma design file with value HSLColor.fromAHSL(1, 0, 0, 0.14).toColor().
It looks like the Figma design doesn't have the recipient header (it has the app/top bar, though). If we are using bg-top-bar for the recipient headers. It might be a good idea to just use that same variable and remove dmRecipientHeaderBg
.
However, given that the Figma design doesn't actually show bg-top-bar being used for that specific message list item, I think we should be fine holding off from updating dmRecipientHeaderBg
, unless such a change is necessary for it to not look odd. Asking for clarification on this in #mobile-design should help.
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.
-
Raised a query in the #mobile-design channel.
-
Reverted changes in
dmRecipientHeaderBg
. If there comes any further decisions on this issue on the chat, the PR will be updated accordingly.
Thanks @PIG208 for the review. |
Removed `colorMessageHeaderIconInteractive` from `DesignVariables` and used `title` in place of it as per the design guidelines. discussion: zulip#1213 (comment)
Removed `senderName` & `recipientHeaderText` from `MessageListTheme` and used `title` in place of it as per the design guidelines. discussion: zulip#1213 (comment) Fixes: zulip#973
4b5405d
to
df8438c
Compare
Removed `colorMessageHeaderIconInteractive` from `DesignVariables` and used `title` in place of it as per the design guidelines. discussion: zulip#1213 (comment)
…Time` Removed `dateSeparatorText` & `messageTimestamp` from `MessageListTheme` and introduced `labelTime` in place of it as per the design guidelines. discussion: zulip#1213 (comment) Fixes: zulip#973
Removed `senderName` & `recipientHeaderText` from `MessageListTheme` and used `title` from `DesignVariables` as per the design guidelines. discussion: zulip#1213 (comment) Fixes: zulip#973
df8438c
to
82859ad
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.
Thanks for the update! Left some more comments.
@@ -29,9 +29,8 @@ import 'theme.dart'; | |||
class MessageListTheme extends ThemeExtension<MessageListTheme> { |
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.
theme: Replace dateSeparatorText and messageTimestamp with `labelTime`
Removed `dateSeparatorText` & `messageTimestamp` from
`MessageListTheme` and introduced `labelTime` in place of it
as per the design guidelines.
discussion: https://github.com/zulip/zulip-flutter/pull/1213#discussion_r1908359783
Fixes: #973
Because the commit message repeats the summary and the actual diff, we can remove most of it:
theme: Replace dateSeparatorText and messageTimestamp with `labelTime`
discussion: https://github.com/zulip/zulip-flutter/pull/1213#discussion_r1908359783
Fixes: #973
We should remove the "Fixes" line because this is not that final commit that resolves the issue.
Let's also add a link to the Figma design.
@@ -369,8 +369,7 @@ class MessageListAppBarTitle extends StatelessWidget { | |||
Padding( |
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.
theme: Replace colorMessageHeaderIconInteractive with title
Removed `colorMessageHeaderIconInteractive` from
`DesignVariables` and used `title` in place of it
as per the design guidelines.
discussion: https://github.com/zulip/zulip-flutter/pull/1213#discussion_r1908343739
We can remove most of the commit message as it repeats the title and the diff, similar to other commits.
Let's also add a link to the Figma design.
@@ -31,9 +31,7 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> { | |||
dateSeparator: Colors.black, |
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.
theme: Replace senderName & recipientHeaderText with title
Removed `senderName` & `recipientHeaderText` from
`MessageListTheme` and used `title` from `DesignVariables`
as per the design guidelines.
discussion: https://github.com/zulip/zulip-flutter/pull/1213#discussion_r1908349307
Fixes: #973
Because the commit message repeats the title and the actual diff, we can remove most of it.
theme: Replace senderName & recipientHeaderText with title
discussion: https://github.com/zulip/zulip-flutter/pull/1213#discussion_r1908349307
Fixes: #973
Similarly, we should link to the Figma design.
dmRecipientHeaderBg: Color.lerp(streamMessageBgDefault, other.dmRecipientHeaderBg, t)!, | ||
messageTimestamp: Color.lerp(messageTimestamp, other.messageTimestamp, t)!, | ||
labelTime: Color.lerp(streamMessageBgDefault, other.labelTime, t)!, |
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.
Hmm. This doesn't seem right.
senderBotIcon: const HSLColor.fromAHSL(1, 180, 0.05, 0.5).toColor(), | ||
senderName: const HSLColor.fromAHSL(0.85, 0, 0, 1).toColor(), | ||
streamMessageBgDefault: const HSLColor.fromAHSL(1, 0, 0, 0.15).toColor(), |
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.
Ah, I missed this earlier. Here, streamMessageBgDefault
does not match the color in the Figma design. The variable corresponding to this appears to be bg-message-regular
. We should rename this variable and update the color.
@@ -29,12 +29,9 @@ import 'theme.dart'; | |||
class MessageListTheme extends ThemeExtension<MessageListTheme> { | |||
static final light = MessageListTheme._( | |||
dateSeparator: Colors.black, |
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 probably have missed this one too, or maybe it was added — dateSeparator
doesn't exist as a variable in Figma, instead the color of the separators is just DesignVariables.foreground
. Let's remove this variable and update the references.
About Changes
This PR updates the color variables in
DesignVariables
andMessageListTheme
for a slightly higher contrast in dark theme according to the values in the figma file.Fixes: #973
Screenshots