matrix-org / matrix-org/matrix-viewer

Add warning when permalink event ID is not found on page

Open
#124 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

A-archive-room-view T-Enhancement
Dominant language
JavaScript
Stars
84
Forks
10
PR merge metrics
No merged PRs in 30d

Description

Follow-up to https://github.com/matrix-org/matrix-public-archive/issues/4

Considerations

What happens if the eventId isn't found on that given day?

  • 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

Potential language: "It looks like we lost your position or you were given an incorrect link"

Could we tell our fault from someone giving a wrong link? Maybe by looking if the referrer is the /jump endpoint.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing permalink handling for /:roomIdOrAlias/event/:eventId and the page's event lookup. When the event is absent from the displayed day, add the warning under the room header with a link to the event route; account for the /jump referrer question described in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.