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

feat(timeline): Configurable timeline date dividers #4398

Merged
merged 4 commits into from
Dec 10, 2024

Conversation

stefanceriu
Copy link
Member

Expose a timeline configuration option to allow date separators to go in between different days or different months.
The only real logic change is in the first commit in DateDividerAdjuster::is_same_date_as where the configuration option is now taken into account.

This will work together with the newly added message_filtered_timeline to power the Element X media gallery and its sections.

This PR also renames all day dividers to date dividers in the last 2 commits.

@stefanceriu stefanceriu requested a review from a team as a code owner December 10, 2024 07:15
@stefanceriu stefanceriu requested review from andybalaam and removed request for a team December 10, 2024 07:15
Copy link

codecov bot commented Dec 10, 2024

Codecov Report

Attention: Patch coverage is 73.33333% with 28 lines in your changes missing coverage. Please review.

Project coverage is 85.24%. Comparing base (32e2070) to head (2f7a0f3).
Report is 9 commits behind head on main.

Files with missing lines Patch % Lines
crates/matrix-sdk-ui/src/timeline/date_dividers.rs 73.23% 19 Missing ⚠️
...tes/matrix-sdk-ui/src/timeline/controller/state.rs 73.33% 4 Missing ⚠️
crates/matrix-sdk-ui/src/timeline/builder.rs 0.00% 3 Missing ⚠️
...rates/matrix-sdk-ui/src/timeline/controller/mod.rs 81.81% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4398      +/-   ##
==========================================
- Coverage   85.27%   85.24%   -0.04%     
==========================================
  Files         282      282              
  Lines       31130    31149      +19     
==========================================
+ Hits        26546    26552       +6     
- Misses       4584     4597      +13     

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

Copy link
Member

@andybalaam andybalaam left a comment

Choose a reason for hiding this comment

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

Looks good; a couple of light suggestions.

Make sure this doesn't get squashed when you merge since the separation you have made between renames and functional changes is really helpful.

crates/matrix-sdk-ui/src/timeline/day_dividers.rs Outdated Show resolved Hide resolved
crates/matrix-sdk-ui/src/timeline/day_dividers.rs Outdated Show resolved Hide resolved
crates/matrix-sdk-ui/src/timeline/day_dividers.rs Outdated Show resolved Hide resolved
crates/matrix-sdk-ui/src/timeline/day_dividers.rs Outdated Show resolved Hide resolved
@bnjbvr bnjbvr changed the title Configurable timeline date dividers feat(timeline): Configurable timeline date dividers Dec 10, 2024
@stefanceriu stefanceriu force-pushed the stefan/configurableDateDividers branch from df1ca56 to 2f7a0f3 Compare December 10, 2024 11:54
@stefanceriu stefanceriu merged commit d5e7a9c into main Dec 10, 2024
40 checks passed
@stefanceriu stefanceriu deleted the stefan/configurableDateDividers branch December 10, 2024 12:11
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.

2 participants