NotificationBlock: Refactor to mirror Postblock #1661
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.
Description
We've gone back and forth over this, haven't we?
This switches NotificationBlock's method of selecting which elements are hidden from a CSS selector containing all of the relevant post (root) ids to javascript logic that determines whether to apply a single attribute. This:
I am working on a fix for Mutual Checker, NotificationBlock, Quote Replies: Some notifications are not processed #1658 if the underlying API changes referenced there stay the way they are, and while the same techniques can ultimately be applied to both methods, it's cleaner using this one.edit: on further investigation this probably isn't necessaryThis may wind up as just a commit in another PR. In general, there's a tension between the order of things that minimizes merge conflicts and that which reduces review, probably, but I'm imho really good at managing merge conflicts at this point so ultimately makes no difference.
Testing steps
Confirm that NotificationBlock continues to function as normal, including updates to the shown/hidden state of onscreen notifications when blocking/unblocking (e.g. from the blog view modal on the activity page).