Skip to content

Add an action to the newly introduced FloatingDateBadge that scrolls the timeline to that day.#5350

Open
stefanceriu wants to merge 2 commits intodevelopfrom
stefan/floatingDateBadgeAction
Open

Add an action to the newly introduced FloatingDateBadge that scrolls the timeline to that day.#5350
stefanceriu wants to merge 2 commits intodevelopfrom
stefan/floatingDateBadgeAction

Conversation

@stefanceriu
Copy link
Copy Markdown
Member

No description provided.

@stefanceriu stefanceriu requested a review from a team as a code owner April 3, 2026 10:50
@stefanceriu stefanceriu requested review from pixlwave and removed request for a team April 3, 2026 10:50
@stefanceriu stefanceriu added the pr-feature for a new feature label Apr 3, 2026
.padding(.horizontal, 16)
.padding(.vertical, 8)
.background(backgroundColor, in: .capsule)
.shadow(color: Color(red: 0.11, green: 0.11, blue: 0.13).opacity(0.1), radius: 12, x: 0, y: 4)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this needs to be moved outside the button

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Does it make a difference? 🤔

Copy link
Copy Markdown
Member

@Velin92 Velin92 left a comment

Choose a reason for hiding this comment

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

LGTM, just address my other small nit comments please 🙏

@ganfra
Copy link
Copy Markdown
Member

ganfra commented Apr 3, 2026

I think this should/could automatically back paginate, so you really are at the beginning of the day, wdyt?

@stefanceriu
Copy link
Copy Markdown
Member Author

I think this should/could automatically back paginate, so you really are at the beginning of the day, wdyt?

I thought about it but it would've complicated this PR significantly and I also don't know whether it would be good UX or not to have this thing randomly scroll in steps.

@Velin92
Copy link
Copy Markdown
Member

Velin92 commented Apr 3, 2026

I think this should/could automatically back paginate, so you really are at the beginning of the day, wdyt?

This could mean a lot of backpagination however... (in the context of big and spammy rooms) I like the idea a lot but maybe let's start small.

I imagine that if we had an API from the SDK that gave at least from the store, the timeline identifier of the matching date separator, we could instead use the focus event API to get there faster, but yeah just an idea.

@bmarty
Copy link
Copy Markdown
Member

bmarty commented Apr 3, 2026

Element Web has the /jumptodate slash command and each date separator has a popup like this:

image

So it may be possible to have the same thing?

Note: this is a FF on EleWeb:

image

@stefanceriu stefanceriu requested a review from Velin92 April 3, 2026 12:41
@ganfra
Copy link
Copy Markdown
Member

ganfra commented Apr 3, 2026

Element Web has the /jumptodate slash command and each date separator has a popup like this:

image So it may be possible to have the same thing?

Note: this is a FF on EleWeb:

image

This is not exactly the same thing, tapping the FloatingDate and the DateDivider.

Telegram is handling both scenarios :

  • Clicking FloatingDate do the same than what you did in this PR
  • Clicking the date divider opens a date picker where you can jump to any date

@bmarty
Copy link
Copy Markdown
Member

bmarty commented Apr 3, 2026

I know that this is not the same thing, but clicking on the floating date is just a particular case of focusing the timeline at a specific date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-feature for a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants