element-hq / element-hq/element-web

Support ability to add events to both top and bottom of TimelinePanel

Open
#19,393 0 comments 0 reactions 0 assignees View on GitHub
A-Timeline O-Occasional T-Enhancement
Dominant language
TypeScript
Stars
13.5k
Forks
2.8k
PR merge metrics
PR metrics pending

Description

Currently if we try to add an event to the timeline, the scroll position properly updates to include the bottom event, as TimelinePanel's scroll position expect that the only way you can add new events is to the end of the current timeline, which will always be the bottom of the view.
In case of `ThreadPanel` we are still adding events to the end of the `Timeline`, but the rendering order is reversed in comparison to the Room Timeline.

We need to properly account for the reversed rendering, so that the scroll position won't jump around when new events are added to the top of the view, instead of the bottom of it.

Related https://github.com/vector-im/element-web/issues/18957
Follow-up to: https://github.com/matrix-org/matrix-react-sdk/pull/6904

Contributor guide

Open the contributing guide

Research direction

Start by reading the TimelinePanel and ThreadPanel handling for timeline updates and scroll position, comparing the normal and reversed rendering cases described in the issue. Confirm the behavior when an event is added at the top versus the bottom; done means adding events in either panel keeps the existing view anchored without a scroll jump.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.