- Open revision slider
- Hover a revision and click on the grey circle next to the username
- Result: All revisions of this user will stay highlighted
- Click on "> (newer revisions)" or "< (oder revisions)" to scroll left or right in revision slider.
- Sometimes revisions, made by the same user that was highlighted before, that were not visible are now also highlightend (as expected) and sometimes not.
Change 472422 abandoned by Aklapper:
Bug: "T207781 Revisionslider: highlighting of users sometimes doesn't apply to out of ares revisions"
Patch against the wrong code repository (RevisionSlider is not MediaWiki core), hence abandoning. Feel free to provide a correct patch against the correct code repository.
I just tried out playing with the code, debugging a bit, I found the that highlightSameTagRevisions and highlightSameUserRevisions are almost using the similar code ( revs = this.revisionList.getRevisions() ) but this issues is not in the case of tags. I'm just wondering, Any insights please?
For me the issues is on tags and on users. I would try replacing revs = this.revisionList.getRevisions() with something more generic. That could at least solve one part of the problem. Another part is probably, that when new revisions are added to the DOM they also need to be colored. So every addition to the revision list should trigger a re-marking.
This patch is just a first naive implementation for the first problem described above. There's a general issue that remains though:
- The highlighting of the revisions is done from the RevisionList(View) objects related to chunk of loaded revisions.
- If the user moves the slider using the arrows on the edges of the visible history, new chunks will be loaded.
- These new chunks will result in new RevisionList(View)s to be created from the revisions loaded via the API.
- The Slider(View) knows of these different list objects and has mechanism to merge them so you can operate on the full list ( from inside the slider ).
- But: The individual list object themselves ( that handle the highlighting and 'hold' the selected users ) do not have that knowledge. So they all handle the highlight only for their chunk.
- This can partly be solved by moving the highlighting step to the DOM level, so we do not need the object knowledge of the lists.
- But: There must also be a mechanism that holds then knowledge of the currently marked user/tag that is also independent of the list objects.
The above pretty much describes what is needed to solve this task. Thanks @Gopavasanth for sitting together with me to explorer these depths. The ticket is free to be approach by whoever wants to work on this.