Skip to content

WIP: Permalink to parent message opens thread message feed at the top

Tomas Vik requested to merge permalink-to-parent-message into develop

Kapture_2020-01-16_at_13.38.55

Outstanding issues

messageMap being empty at the time of TMF initialization

The permalinkId comes from the URL (?at=<message-id>). This means that the frontend logic has immediate access to the variable and reacts before the messageMap gets populated.

  1. chat-internal puts permalinkId on the context
  2. chatCollectionView triggers highlight regardless of whether the chat collection subscribed to the bayeux channel and whether the sync with messageMap happend

This issue causes that sometimes there is no parent message to highlight at the time the permalink highlight logic gets executed.

Intersect not triggering fetch actions

The intersect component at each end of the TMF should trigger fetchOlder/NewerChildMesages action every time they enter the view, but the bottom intersect sometimes doesn't do that. Implementing https://gitlab.com/gitlab-org/gitter/webapp/issues/2289 would probably at least give users alternative when the infinite scrolling fails.

If I add some content inside the <intersect> <span>'s, then it works as expected. We should just add some styles and make them 1px tall.

@MadLittleMods 's suggestion from https://gitlab.com/gitlab-org/gitter/webapp/merge_requests/1732#note_273329596

Testing strategy

  • have a thread with more than 50 child messages

  • generate permalink to a parent message and observe that after opening the permalink, you can see TMF opening and parent message being highlighted

  • scrolling down will fetch more messages

  • opening thread through the parent message indicator still works as usual

Edited by Tomas Vik

Merge request reports