Repository navigation
[2.x] fix(deck): filter columns follow changes that move a discussion in or out of them - #5450
Merged
Merged
Conversation
… out of them Locking, stickying, re-tagging or restoring a discussion doesn't change its activity, so a column's check for activity since the newest item it shows never found it: a Filter column such as is:locked kept discussions that no longer matched and never gained ones that started to. Discussion columns now ask the server again about the discussions those events concern, with their own request narrowed to the ids by a new `id` filter for discussions, and add or remove them. Ids from a burst of events go in one request per column. Extensions register their own events with `new DeckColumns().membershipEvents(...)`. Fixes #5178
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #5178
Changes proposed in this pull request:
A Deck filter column such as
is:lockedortag:xkept discussions that stopped matching and never picked up ones that started to, because locking, stickying, re-tagging, hiding or restoring changes no activity, and a column only checks for activity since its newest item. Filtered discussion columns now ask the server about the discussion such an event concerns, using their own request narrowed by a newidfilter for discussions in core, then add it where the server would list it or take it out. A burst of events costs one request per column, and extensions register their own events withnew DeckColumns().membershipEvents('bestAnswerEvent').Reviewers should focus on:
Screenshot
Before: locking "Old forum archive", unlocking "Rules and guidelines" and stickying "Moving to the new server" (as a moderator, in another session) changes nothing in the columns.
After: each change shows in its column within a few seconds. Both recordings are at 2× speed.
Necessity
Confirmed
yarn testinjs/).composer test).Required changes: