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

Implement month separator for the Gallery, and improve date rendering. #4026

Merged
merged 10 commits into from
Dec 12, 2024

Conversation

bmarty
Copy link
Member

@bmarty bmarty commented Dec 11, 2024

Content

Implement month separator for the Gallery.
Improve day separator rendering in the timeline.
Use Today, Yesterday, and the name of the day if less than 7 days and do not render the year for the current year. Improve date format for the media viewer.
Rework how date and time are computed.
ActionListView: Time can take more space, so update the layout.

Motivation and context

Part of the work on the media gallery + Closes #2238

Screenshots / GIFs

Tests

  • Run the app in your current locale and check that all the date across the application look good.
  • Change the language of the phone / of the app and observe that the app uses the new languages (especially to render date and time).

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

  • Changes have been tested on an Android device or Android emulator with API 23
  • UI change has been tested on both light and dark themes
  • Accessibility has been taken into account. See https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
  • Pull request is based on the develop branch
  • Pull request title will be used in the release note, it clearly define what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • Pull request includes a sign off
  • You've made a self review of your PR

Improve day separator rendering in the timeline.
Use Today, Yesterday, and the name of the day if less than 7 days and do not render the year for the current year.
Improve date format for the media viewer.
Rework how date and time are computed.
ActionListView: Time can take more space, so update the layout.
@bmarty bmarty requested a review from a team as a code owner December 11, 2024 23:01
@bmarty bmarty requested review from ganfra and removed request for a team December 11, 2024 23:01
@bmarty bmarty added the PR-Misc For other changes label Dec 11, 2024
Copy link
Contributor

github-actions bot commented Dec 11, 2024

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/eH8Un2

Copy link

codecov bot commented Dec 11, 2024

Codecov Report

Attention: Patch coverage is 91.59892% with 31 lines in your changes missing coverage. Please review.

Project coverage is 83.07%. Comparing base (5515c93) to head (a99eecd).
Report is 30 commits behind head on develop.

Files with missing lines Patch % Lines
...braries/dateformatter/impl/LocaleChangeObserver.kt 0.00% 13 Missing ⚠️
...ctories/virtual/TimelineItemDaySeparatorFactory.kt 33.33% 4 Missing ⚠️
...ies/mediaviewer/impl/gallery/VirtualItemFactory.kt 20.00% 4 Missing ⚠️
...oid/libraries/dateformatter/impl/DateFormatters.kt 78.57% 2 Missing and 1 partial ⚠️
...libraries/dateformatter/impl/DateTimeFormatters.kt 90.90% 0 Missing and 2 partials ⚠️
...tter/impl/previews/DateFormatterModeViewPreview.kt 98.48% 0 Missing and 1 partial ⚠️
...teformatter/impl/previews/PreviewStringProvider.kt 80.00% 1 Missing ⚠️
...s/mediaviewer/impl/DefaultMediaViewerEntryPoint.kt 0.00% 1 Missing ⚠️
...ediaviewer/impl/details/MediaDetailsBottomSheet.kt 0.00% 0 Missing and 1 partial ⚠️
...mediaviewer/impl/local/AndroidLocalMediaFactory.kt 66.66% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4026      +/-   ##
===========================================
+ Coverage    83.01%   83.07%   +0.06%     
===========================================
  Files         1845     1856      +11     
  Lines        47699    47997     +298     
  Branches      5632     5642      +10     
===========================================
+ Hits         39595    39875     +280     
- Misses        6108     6125      +17     
- Partials      1996     1997       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bmarty bmarty added the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Dec 12, 2024
@github-actions github-actions bot removed the Record-Screenshots Runs the 'Record Screenshots' CI job and adds a commit with any new screenshots found. label Dec 12, 2024
Copy link
Member

@ganfra ganfra left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@bmarty bmarty added the Run-Maestro Starts a Maestro Cloud session to run integration tests label Dec 12, 2024
@bmarty bmarty enabled auto-merge December 12, 2024 11:44
@github-actions github-actions bot removed the Run-Maestro Starts a Maestro Cloud session to run integration tests label Dec 12, 2024
@bmarty bmarty added the Run-Maestro Starts a Maestro Cloud session to run integration tests label Dec 12, 2024
@bmarty bmarty disabled auto-merge December 12, 2024 16:48
@bmarty bmarty merged commit d5b3eea into develop Dec 12, 2024
22 checks passed
@bmarty bmarty deleted the feature/bma/monthSeparators branch December 12, 2024 16:48
@github-actions github-actions bot removed the Run-Maestro Starts a Maestro Cloud session to run integration tests label Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Misc For other changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Iterate on date rendering
3 participants