Skip to content

Notifications: Keep the panel open after trashing or spamming a comment - #116046

Draft
StevenDufresne wants to merge 4 commits into
trunkfrom
fix/notifications-trash-keeps-panel-open
Draft

StevenDufresne wants to merge 4 commits into
trunkfrom
fix/notifications-trash-keeps-panel-open

Conversation

@StevenDufresne

Copy link
Copy Markdown
Contributor

Proposed Changes

  • Trashing or spamming a comment closes the note and returns to the list with that note removed, instead of closing the whole panel. Focus moves to the next note.

Why are these changes being made?

  • The busy Trash/Spam button lost focus when it disabled itself, which the panel treated as a click outside and closed. With the panel staying open, the trashed note also stayed in the list.

Testing Instructions

  • Open the notifications panel, open a comment notification, click Trash (or Spam). The panel stays open, the note is gone from the list, and the next note is focused. Repeat after scrolling down the list.
Before After

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • For UI changes, have you tested the affected components in dark mode?
  • Have you tested accessibility for your changes? Ensure the feature remains usable with various user agents (e.g., browsers), interfaces (e.g., keyboard navigation), and assistive technologies (e.g., screen readers) (PCYsg-S3g-p2).
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
    • For UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

🧐 Test on Calypso Live 🌅

Environment 🔗
WordPress.com Dashboard live link
WordPress.com (/reader) live link
Automattic for Agencies Dashboard live link
Automattic for Agencies live link
Jetpack Cloud live link

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown

This PR does not affect the size of JS and CSS bundles shipped to the user's browser.

The busy Trash/Spam button (and the simplified Actions toggle) was natively
disabled while the request ran, which dropped focus to the body and tripped
the host popover's focus-outside close. Keep those controls focusable while
busy, and when the closed note was hidden, move focus to the nearest visible
note's row instead.
DataViews' infinite scroll keeps every row it has been given and never drops
one that leaves `data`, so a trashed note stayed visible once the panel no
longer closed. Pass every visible note as a single page starting at the first
note, with `perPage` tied to the note count, so any removal makes DataViews
rebuild its rows. Scroll requests now raise a target note count that the fill
effect loads towards.
@StevenDufresne
StevenDufresne force-pushed the fix/notifications-trash-keeps-panel-open branch from 7f3c393 to 18fdaac Compare November 6, 2026 05:19
Sending a reply closed the whole panel. Clicking Send left focus on the
button, which then disabled itself once the field cleared, and Cmd+Enter
blurred the field. Either way focus fell to the body, which the host
popover treats as a click outside. Keep the Send button focusable while
disabled and move focus to it after a successful send.

DOTCOM-19088

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant