WIP: Permalink to parent message opens thread message feed at the top
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.
chat-internal
putspermalinkId
on the context-
chatCollectionView
triggers highlight regardless of whether the chat collection subscribed to the bayeux channel and whether thesync
withmessageMap
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