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

Add date headers in timeline (second stab) #938

Merged
merged 16 commits into from
Nov 25, 2022

Conversation

bwindels
Copy link
Contributor

@bwindels bwindels commented Nov 21, 2022

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

@bwindels bwindels changed the title Add date headers in timeline Add date headers in timeline (second stab) Nov 21, 2022
@bwindels bwindels mentioned this pull request Nov 21, 2022
4 tasks
@bwindels bwindels marked this pull request as ready for review November 25, 2022 15:51
@bwindels bwindels merged commit 23a325b into master Nov 25, 2022
private otherYearFormatter: Intl.DateTimeFormat;
private timeFormatter: Intl.DateTimeFormat;

constructor(private clock: Clock) {
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like this clock is never used

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)
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.

Add date separator in timeline
2 participants