-
Notifications
You must be signed in to change notification settings - Fork 270
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
refactor!(all the things): fuse SyncTimelineEvent
into TimelineEvent
#4568
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4568 +/- ##
==========================================
- Coverage 85.42% 85.41% -0.01%
==========================================
Files 285 285
Lines 32222 32211 -11
==========================================
- Hits 27525 27513 -12
- Misses 4697 4698 +1 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this makes sense and looks good as well. Please just add the missing PR links to the changelog entries.
@@ -11,6 +11,9 @@ All notable changes to this project will be documented in this file. | |||
- Replaced `Room::compute_display_name` with the reintroduced `Room::display_name()`. The new | |||
method computes a display name, or return a cached value from the previous successful computation. | |||
If you need a sync variant, consider using `Room::cached_display_name()`. | |||
- [**breaking**]: The reexported types `SyncTimelineEvent` and `TimelineEvent` have been fused into a single type | |||
`TimelineEvent`, and its field `push_actions` has been made `Option`al (it is set to `None` when | |||
we couldn't compute the push actions, because we lacked some information). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a link to the PR introducing this change.
@@ -11,6 +11,9 @@ All notable changes to this project will be documented in this file. | |||
- Replaced `Room::compute_display_name` with the reintroduced `Room::display_name()`. The new | |||
method computes a display name, or return a cached value from the previous successful computation. | |||
If you need a sync variant, consider using `Room::cached_display_name()`. | |||
- [**breaking**]: The reexported types `SyncTimelineEvent` and `TimelineEvent` have been fused into a single type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- [**breaking**]: The reexported types `SyncTimelineEvent` and `TimelineEvent` have been fused into a single type | |
- [**breaking**]: The reexported types `SyncTimelineEvent` and `TimelineEvent` have been fused into a single type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not against this change, but can I ask why we should do it like this? This will break the list into two lists, now, which seems counter to the point of having a list of changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't particularly care, but if you prefer the rendering without the extra newlines, then we shouldn't have them in the other changelog either.
@@ -6,6 +6,10 @@ All notable changes to this project will be documented in this file. | |||
|
|||
## [Unreleased] - ReleaseDate | |||
|
|||
- [**breaking**]: `SyncTimelineEvent` and `TimelineEvent` have been fused into a single type | |||
`TimelineEvent`, and its field `push_actions` has been made `Option`al (it is set to `None` when | |||
we couldn't compute the push actions, because we lacked some information). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same, PR link please.
@@ -25,6 +25,10 @@ All notable changes to this project will be documented in this file. | |||
|
|||
### Refactor | |||
|
|||
- [**breaking**]: The reexported types `SyncTimelineEvent` and `TimelineEvent` have been fused into a single type | |||
`TimelineEvent`, and its field `push_actions` has been made `Option`al (it is set to `None` when | |||
we couldn't compute the push actions, because we lacked some information). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another one.
Eh, not so sure, we already have another |
As the comment noted, they're essentially doing the same thing. A `TimelineEvent` may not have computed push actions, and in that regard it seemed more correct than `SyncTimelineEvent`, so another commit will make the field optional.
7fc8246
to
914f274
Compare
Had to rebase for the new |
914f274
to
a66fa24
Compare
The breakiest of breaking changes:
SyncTimelineEvent
took aRaw<AnySyncTimelineEvent>
, andTimelineEvent
took aRaw<AnyTimelineEvent>
that it immediately cast intoRaw<AnySyncTimelineEvent>
, so we can use both.TimelineEvent
had itspush_actions
optional, which is the right call; another commit makes that change, partially reverting some changes of the first commit, sorry!SyncTimelineEvent
is eventually renamed toTimelineEvent
, but as the last commit suggests… maybe this could be plain calledEvent
? (Would likely break some serialization formats that rely on type names)