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

chore(ui): Rename TimelineEnd to TimelineNewItemPosition #4328

Merged
merged 1 commit into from
Nov 26, 2024

Conversation

Hywan
Copy link
Member

@Hywan Hywan commented Nov 26, 2024

(Extracted from #3512)

This patch renames TimelineEnd into TimelineNewItemPosition for 2 reasons:

  1. In the following patches, we will introduce a new variant to insert at a specific index, so the suffix End would no longer make sense.

  2. It's exactly like TimelineItemPosition except that it's used only and strictly only to add new items, which is why we can't use TimelineItemPosition because it contains the UpdateDecrypted variant. This renaming reflects it's only about new items.

This patch takes the opportunity to move the RemoteEventOrigin inside TimelineNewItemPosition to simplify method signatures. They always go together.


This patch renames `TimelineEnd` into `TimelineNewItemPosition` for
2 reasons:

1. In the following patches, we will introduce a new variant to insert
   at a specific index, so the suffix `End` would no longer make sense.

2. It's exactly like `TimelineItemPosition` except that it's used
   only and strictly only to add **new** items, which is why we can't use
   `TimelineItemPosition` because it contains the `UpdateDecrypted`
   variant. This renaming reflects it's only about **new** items.

This patch takes the opportunity to move the `RemoteEventOrigin` inside
`TimelineNewItemPosition` to simplify method signatures. They always
go together.
@Hywan Hywan force-pushed the chore-ui-timeline-end-renaming branch from c8a341f to 49f88c2 Compare November 26, 2024 16:04
@Hywan Hywan marked this pull request as ready for review November 26, 2024 16:10
@Hywan Hywan requested a review from a team as a code owner November 26, 2024 16:10
@Hywan Hywan requested review from poljar and removed request for a team November 26, 2024 16:10
Copy link

codecov bot commented Nov 26, 2024

Codecov Report

Attention: Patch coverage is 94.44444% with 1 line in your changes missing coverage. Please review.

Project coverage is 85.09%. Comparing base (75d7d07) to head (49f88c2).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
...tes/matrix-sdk-ui/src/timeline/controller/state.rs 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4328      +/-   ##
==========================================
+ Coverage   85.05%   85.09%   +0.03%     
==========================================
  Files         275      275              
  Lines       30309    30307       -2     
==========================================
+ Hits        25780    25789       +9     
+ Misses       4529     4518      -11     

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

@Hywan Hywan merged commit 3e7d7e8 into matrix-org:main Nov 26, 2024
71 of 76 checks passed
@Hywan Hywan mentioned this pull request Nov 28, 2024
34 tasks
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