Mutual Checker, NotificationBlock, Quote Replies: Process new reply format#1659
Conversation
961d8e3 to
c42de4b
Compare
5ae2b74 to
49ff16e
Compare
49ff16e to
62ee14e
Compare
|
Re: Quote Replies, see also: #1662. |
brain dump of my current thinking about how to fetch specific replies:
also |
|
Wait, there is a timestamp... hm, why did I think there wasn't a timestamp? I have screenshots of the API data from when I was working on this and there absolutely is a timestamp that I must have missed. (Unless that's the post timestamp or something absurd, but why would that be the case). Er, stay tuned. |
Co-Authored-By: April Sylph <28949509+AprilSylph@users.noreply.github.com>
2c03b8b to
bc1da02
Compare
Done. (I assume there's no way for a
Done. Well, sort of; I call the existing code here, which assumes that the first reply with a matching timestamp is the right one. We should... probably add that partial match check?
As implemented, this falls back on any failure of the processing code. |
|
I'm gonna sit on this one this week too, but only because there's something cooking which should make reply fetching a lot more reliable... |
|
Important note for future reference: Mutual Checker and NotificationBlock could've been fixed months ago if their changes had been split into their own PRs. Granted, all these updates rely on updated utils, but if you include the same util changes across multiple PRs, you open the possibility to first 1) get the util changes merged with the least effort from the reviewer (i.e. with the lowest-reviewer-effort feature update) and then 2) update all the PRs so that the util changes aren't included in feature updates, which further reduces reviewer effort. |
There was a problem hiding this comment.
- Mutual Checker
- Confirm that from-mutuals notifications of both the old and new types are visible.
- Confirm that other notifications of both the old and new types are hidden.
- NotificationBlock
- Activate NotificationBlock on the linked post and confirm that the notification is hidden.
- Quote Replies
- Confirm that Quote Replies adds action buttons to "replied to your post", "replied to you in a post", and "mentioned you on a post" notifications.
- Confirm that Quote Replies does not add action buttons to "replied to you in a [community name] post" or "mentioned you in a comment in [community name]" notifications
- Confirm that Quote Replies generates draft posts with the correct contents from all three supported notification types, from both the activity page and activity modal
- Break the Quote Replies API fetch. Confirm that Quote Replies generates draft posts from "replied to your post" / "replied to you in a post" notifications, with degraded formatting.
- Confirm that "mentioned you on a post" notifications will instead show an error modal (this code path is unchanged and we didn't write a fallback into it).
- Confirm that the links in the generated draft posts all point to the correct accounts/urls.
Oh, interesting—I've of course never been on the reviewer side in a meaningful capacity, but I had guessed the preference would be for the opposite! I'll keep that in mind for the future. |

Well, #1658 is fairly problematic.
Description
This contains (somewhat rudimentary) fixes for the linked issue, in which the relevant features are broken by certain kinds of activity item that use a new internal data format, containing only enough information to render the notification rather than all of the internal data we use to add functionality.
outdated Quote Replies info
This truncates the reply text and generally looks rather stupid, but it's better than nothing. Note also that it does not currently exclude community posts (I didn't see a way to do so). I did test the code on a reply on a community post.
Testing steps
To easily distinguish affected activity items, run
document.documentElement.append(Object.assign(document.createElement('style'), { textContent: '[aria-label="Notification"]:not([role="listitem"]) { outline: 1px solid red; outline-offset: -3px }' })).Mutual Checker:
NotificationBlock:
Quote Replies: