Skip to content

Add date separators #469

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

Merged
merged 3 commits into from
Jan 5, 2024
Merged

Add date separators #469

merged 3 commits into from
Jan 5, 2024

Conversation

gnprice
Copy link
Member

@gnprice gnprice commented Dec 29, 2023

Fixes: #173

This is a draft because it needs tests and also some cleanups in the code. But from a user perspective it already works great — so I'm sharing this in order to get feedback on the visual design. As mentioned at #173 (comment) , I don't see an existing design for this in Figma, so for a first draft I've taken what's in web and adapted it.

Design questions

  • In web the dates have color hsl(0deg 0% 15% / 75%), which is the same as the dates in the recipient headers. Here, our dates in recipient headers are lighter than that: they're black with 40% alpha. So I used that color for these, though it makes the dates lighter than in web. @terpimost do you think this is the color we want?
  • In web the dates are slightly smaller in the date separators than they are in the recipient headers. But the CSS that results in this on the recipient headers side looks like a bug: there's both a calc(12em / 14) and a calc(15em / 14) applying multiplicatively. (This bug illustrates why in the CSS for zulip-mobile's webview, we use rem and not em.) So I'm not sure that difference is intended, and in this draft I've made the size the same as in the recipient headers.
  • The vertical alignment here is just that everything's centered. But that seems to get the dividers a bit too high compared to the text. I'll have to fiddle with this (perhaps by adjusting the text's line-height). I fixed this by adding some bottom padding to the text.

Other adjustments from web

  • In web the dates and timestamps are 10px from the right, but in the current design they're 16px in. So I put this at 16px to match.
  • In web there's 2px horizontal padding before and after each divider line (though web's implementation of that is a bit complex). I copied that.
  • I made the dividers one physical pixel tall (not one logical pixel, which would typically be several physical pixels).
  • I made the dividers black, like in web.

Screenshot

Here's a screenshot of the current revision:

Screenshot_1703883619

@gnprice gnprice added a-msglist The message-list screen, except what's label:a-content a-design Visual and UX design labels Dec 29, 2023
@gnprice
Copy link
Member Author

gnprice commented Dec 29, 2023

I've pushed a revision that adjusts the vertical alignment between the text and the divider lines.

I also edited the PR description with another design question, one I'd forgotten about when I first posted the PR, about the font size for the dates compared to the dates in recipient headers.

@gnprice gnprice marked this pull request as ready for review January 4, 2024 23:12
@gnprice gnprice marked this pull request as draft January 4, 2024 23:13
@gnprice
Copy link
Member Author

gnprice commented Jan 4, 2024

I un-marked this as draft too hastily before re-reading what I'd said above about why it's a draft 🙂. I'll do those cleanups and tests now.

@gnprice gnprice marked this pull request as ready for review January 4, 2024 23:59
@gnprice
Copy link
Member Author

gnprice commented Jan 5, 2024

OK, now actually ready.

There are still a couple of design questions open (mentioned above in the PR description), but they're pretty subtle — so I think the best thing is to go ahead and merge without worrying about those, and we can always adjust later if @terpimost has comments once he's back.

@gnprice gnprice requested a review from chrisbobbe January 5, 2024 00:00
@chrisbobbe chrisbobbe merged commit fe4655f into zulip:main Jan 5, 2024
@chrisbobbe
Copy link
Collaborator

Thanks, LGTM! Merged.

@gnprice gnprice deleted the pr-dates branch January 5, 2024 23:09
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this pull request May 18, 2024
I removed the TODO(design), because now this element's color matches
the corresponding element in the web app, and that seems like a fine
way to settle the question. I didn't find a date-separator example
in the Figma (and Greg didn't either, when implementing them
in zulip#469.)
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this pull request May 18, 2024
…arator

In zulip#469 implementing date separators, Greg highlighted that the date
separator's deviation from web wasn't settled yet:
  zulip#469 (comment)
  zulip#469 (comment)
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this pull request May 18, 2024
I removed the TODO(design), because now this element's color matches
the corresponding element in the web app, and that seems like a fine
way to settle the question. I didn't find a date-separator example
in the Figma (and Greg didn't either, when implementing them
in zulip#469.)
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this pull request May 18, 2024
…arator

In zulip#469 implementing date separators, Greg highlighted that the date
separator's deviation from web wasn't settled yet:
  zulip#469 (comment)
  zulip#469 (comment)
chrisbobbe added a commit to chrisbobbe/zulip-flutter that referenced this pull request May 20, 2024
I removed the TODO(design), because now this element's color matches
the corresponding element in the web app, and that seems like a fine
way to settle the question. I didn't find a date-separator example
in the Figma (and Greg didn't either, when implementing them
in zulip#469.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-design Visual and UX design a-msglist The message-list screen, except what's label:a-content
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Date separators
2 participants