Add date headers in timeline (second stab)#938
Merged
Conversation
Co-authored-by: R Midhun Suresh <MidhunSureshR@users.noreply.github.com>
also clarify with comments how the current algorithm works
this has the limitation that it needs to have a fixed with and an opaque background, but that's better than not making it sticky for now.
| private otherYearFormatter: Intl.DateTimeFormat; | ||
| private timeFormatter: Intl.DateTimeFormat; | ||
|
|
||
| constructor(private clock: Clock) { |
Contributor
There was a problem hiding this comment.
It looks like this clock is never used
2 tasks
MadLittleMods
added a commit
to matrix-org/matrix-viewer
that referenced
this pull request
Apr 26, 2023
Of note: - Adds date headers, element-hq/hydrogen-web#938 - Add "Copy matrix.to permalink" message action, element-hq/hydrogen-web#921 - Removes `?v=3.13` query parameters from Inter font references in CSS, element-hq/hydrogen-web#961 - This is what we need to solve #187 (comment)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #489
This is the second stab at this, with proper support in the model for date separators. The first stab at it was #764 .
This approach looks more promising, as the code is cleaner and there don't seem to be any jumps in the timeline when scrolling. Needs cleanup and more testing (e.g. how it responds to local echo when sending a message).
The sticky part is just css, but to be able to have transparent and/or variable width date headers, we'll need a JS-based approach using intersectionobserver.
What it looks like for now:
Screencast.from.18-11-22.17.17.00.webm