element-hq / element-hq/element-web

Deep link date in room

Open
#24,914 4 comments 15 reactions 0 assignees View on GitHub
A-Jump-To-Date T-Enhancement X-Needs-Product Z-Gitter
Dominant language
TypeScript
Stars
13.5k
Forks
2.8k
PR merge metrics
PR metrics pending

Description

### Your use case

#### What would you like to do?

*Originally proposed by @pdurbin in https://github.com/vector-im/element-web/issues/7677,*

Add a way to navigate by URL to a point in time (date/time) of the room.

Examples from other platforms:

- https://gitter.im/gitter/gitter/archives/2018/11/09
- https://mozilla.logbot.info/firefox/20181109

Jump to date exists in Element under a feature flag but that requires first loading the room, then manually using the date picker to get to where you want. It's much more convenient to be able to link directly to that point in the room. You can already link people to a given event in the room, ex. `https://app.element.io/#/room/#matrix-public-archive:matrix.org/$iVgFrFNtRWAoCALNo1-uLATWSirw27S1XunPUgPoCFM`

And this issue is proposing to also be able to link to a point in the room but by date and time. ex.

- `https://app.element.io/#/room/#matrix-public-archive:matrix.org/2023-03-24`
- `https://app.element.io/#/room/#matrix-public-archive:matrix.org/2023-03-24T06:20:30`
- These examples are just using the `new Date().toISOString()` format without the timezone.

#### Why would you like to do it?

For my own specific use case, I'd like to use it for Gitter in order to setup redirects from the old Gitter URL scheme to the new world at `app.gitter.im` (Gitter branded Element), see https://gitlab.com/gitterHQ/gitter.im/-/issues/9

#### How would you like to achieve it?

The jump can be facilitated with [MSC3030](https://github.com/matrix-org/matrix-spec-proposals/pull/3030)'s `/timestamp_to_event` (also known as jump to date) API.

Should the dates be in UTC or the users local timezome? It kinda makes most sense to keep them in UTC so anyone visiting the same link will end up in the same place.

### Have you considered any alternatives?

_No response_

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.