Skip to content

Conversation

fushar
Copy link
Contributor

@fushar fushar commented Sep 4, 2025

Fixes DOTCOM-14291

Proposed Changes

Implement the following shortcuts in notifications v2:

From note list

  • (arrow down):
    • if we're just going back to the note from details: it will navigate from that note
    • otherwise, it will go to the first note in the list
  • (arrows up/down): after the list has focus, arrows will behave as expected to navigate the note list

From note details

  • a: approve
  • s: mark as spam
  • t: move to the trash
  • l: like
  • e: edit
  • (arrows up/down): go to prev/next note in the current filter

After s and t, we will go back to the note list, and focus will be set to the next note.

Testing Instructions

  1. Go to /v2
  2. Click notification bells
  3. Use your keyboard and try the above shortcuts

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?
  • 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)?

Copy link

github-actions bot commented Sep 4, 2025

@fushar fushar self-assigned this Sep 4, 2025
@fushar fushar marked this pull request as ready for review September 4, 2025 15:52
@fushar fushar requested a review from a team September 4, 2025 15:52
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Sep 4, 2025
@matticbot
Copy link
Contributor

matticbot commented Sep 4, 2025

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • notifications
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug notif-v2-navigation on your sandbox.

Copy link
Contributor

@arthur791004 arthur791004 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested but I found the t didn't work 🤔

import getIsLoading from '../../panel/state/selectors/get-is-loading';
import getKeyboardShortcutsEnabled from '../../panel/state/selectors/get-keyboard-shortcuts-enabled';
import { useAppContext } from '../context';
import './style.scss';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we don't need this 😅

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bad copy-paste, fixed in 6307bd9.

@fushar fushar force-pushed the notif-v2-navigation branch from bc8165e to 6307bd9 Compare September 8, 2025 02:36
@fushar
Copy link
Contributor Author

fushar commented Sep 8, 2025

Tested but I found the t didn't work 🤔

Good catch, fixed in edb5c86 🤦

Copy link
Contributor

@arthur791004 arthur791004 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested again and looks good 👍

@fushar fushar merged commit a0e63eb into trunk Sep 8, 2025
10 of 12 checks passed
@fushar fushar deleted the notif-v2-navigation branch September 8, 2025 06:57
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Sep 8, 2025
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.

3 participants