Skip to content

Add permalink highlighting - Highlight tile that matches ?at=$xxx #4

@MadLittleMods

Description

@MadLittleMods

Similar to the permalink highlighting in the Gitter archives:

https://gitter.im/webpack/webpack/archives/2021/04/12?at=6074b67bd79539186153c59a

We can do the same in the Matrix public archives when adding ?at=$xxx to highlight the event tile in Hydrogen.

ex. http://localhost:3050/!HBehERstyQBxyJDLfR:my.synapse.server/date/2022/02/08?at=$xtyFUuYaHb63XsvEsdPAvQraCkimLCRPoZB6a6Cvy40

Considerations

What happens if the eventId isn't found on that given day? -> Split out to #124

  • With Gitter, we can easily lookup the eventId and redirect people to the correct day. But I don't think I want to do all of those round-trips to the homeserver to do this sort of thing.
  • In the Matrix public archives, I think I am just going to see if the event is in the given date displayed and if not, put a little warning overlay under the room header which says "Event wasn't found on this day" and link to /:roomIdOrAlias/event/:eventId which will actually do redirection work. This way, it's a choice by the user to take the action to jump to the correct day and it's explained what happened.

Dev notes

Related to #73 because of the different scroll behavior needed to center the message in the viewport.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-archive-room-viewThe view to look at a room day by day in the archiveT-EnhancementNew feature or requesthydrogenIssues which involve https://github.com/vector-im/hydrogen-web

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions