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

Fix star icon position in message list (#616) #625

Closed
wants to merge 3 commits into from

Conversation

Syrineladeb02
Copy link

This pull request addresses issue #616, where the star icon appeared too high relative to the message text in the message list. The issue was resolved by adjusting the position of the star icon so that its "shoulders" align with the x-height of the first line of text, ensuring better visual alignment with the message content. Additionally, the distance between the right edge of the message and the star icon has been adjusted for consistency with the adjacent time text.
I added padding to adjust the position of the star icon so that its "shoulders" are aligned with the x-height of the first line of text. This ensures better visual alignment with the message content, while also maintaining consistent spacing between the star icon and the right edge of the message.

Before :

Screenshot_20240329-085443

After:

2024-04-22 (15)

2024-04-22 (17)

Fixes: #616

@sm-sayedi
Copy link
Collaborator

Thanks, @Syrineladeb02! The maintainers will have a thorough look at this PR but before that, some work needs to be done from your side.

  • Only include the files related to the changes of the issue, in this case, it's just lib/widgets/message_list.dart.
  • Please read the zulip commit guide about structuring your commits.
  • Include tests for your changes and make sure all of the existing tests are passing.
  • You may also need to have a look at zulip git guide, specifically fixing commits.

Comment on lines +83 to +96
appBar: AppBar(title: MessageListAppBarTitle(narrow: widget.narrow),
backgroundColor: backgroundColor,
shape: removeAppBarBottomBorder
? const Border()
: null, // i.e., inherit
),
// TODO question for Vlad: for a stream view, should we set
// [backgroundColor] based on stream color, as in this frame:
// https://www.figma.com/file/1JTNtYo9memgW7vV6d0ygq/Zulip-Mobile?node-id=132%3A9684&mode=dev
// That's not obviously preferred over the default background that
// we matched to the Figma in 21dbae120. See another frame, which uses that:
// https://www.figma.com/file/1JTNtYo9memgW7vV6d0ygq/Zulip-Mobile?node-id=147%3A9088&mode=dev
body: Builder(
builder: (BuildContext context) => Center(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Use two-space indentation on each level in here and other places. I think this happened because your IDE auto-formatted the code. This project does not use dart auto-format as mentioned in here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the feedback, @sm-sayedi! I appreciate your guidance and will address your points accordingly.

@gnprice
Copy link
Member

gnprice commented Apr 26, 2024

In addition to @sm-sayedi's feedback above, a quick update from the chat thread:

Additionally, the distance between the right edge of the message and the star icon has been adjusted

We don't actually want to make this change — the current horizontal alignment, where the star touches the right edge of the screen, is the intended design.

@Syrineladeb02
Copy link
Author

Got it, @gnprice. I'll revert the changes related to the distance between the star icon and the right edge of the message to align with the intended design. However, I found that the update provided a more structured appearance, which was my intention.

@Syrineladeb02 Syrineladeb02 closed this by deleting the head repository May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Star icon too high on messages
3 participants