dillon1000/react
Commit
Browse files [Devtools] Navigating commits performance panel hotkey (#35238)
## Summary Add keyboard shortcuts (Cmd/Ctrl + Left/Right arrow keys) to navigate between commits in the Profiler's snapshot view. Moved `filteredCommitIndices` management and commit navigation logic (`selectNextCommitIndex`, `selectPrevCommitIndex`) from `SnapshotSelector` into `useCommitFilteringAndNavigation` used by `ProfilerContext` to enable keyboard shortcuts from the top-level Profiler component. ## How did you test this change? - New tests in ProfilerContext-tests - Built browser extension: `yarn build:<browser name>` - tested in browser: `yarn run test:<browser name>` - Manually verified Left/Right arrow navigation cycles through commits - Verified navigation respects commit duration filter - Verified reload-and-profile button unaffected Chrome: https://github.com/user-attachments/assets/01d2a749-13dc-4d08-8bcb-3d4d45a5f97c Edge with duration filter: https://github.com/user-attachments/assets/a7f76ff7-2a0b-4b9c-a0ce-d4449373308b firefox mixing hotkey with clicking arrow buttons: https://github.com/user-attachments/assets/48912d68-7c75-40f2-a203-5e6d7e6b2d99
Changed paths5 files
First-parent comparisonpackages/react-devtools-shared/src/__tests__/profilerContext-test.js ModifiedM packages/react-devtools-shared/src/devtools/views/Profiler/Profiler.js ModifiedM packages/react-devtools-shared/src/devtools/views/Profiler/ProfilerContext.js ModifiedM packages/react-devtools-shared/src/devtools/views/Profiler/SnapshotSelector.js ModifiedA packages/react-devtools-shared/src/devtools/views/Profiler/useCommitFilteringAndNavigation.js AddedPatch
Files changed
Rendering syntax-highlighted changes…