-
-
Notifications
You must be signed in to change notification settings - Fork 240
feat(mouse-gesture): add option to Show Previously Selected Tab #2159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
I quickly tested it locally, and it seems to work as expected. Technically it'd run into an error if the number of tabs were 0, but that seems impossible to me. Otherwise, it should work just like Gesturefy. The localization stuff confuses me a little bit, though. |
|
Hi. @Leblayd Thank you for your contribution! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements a new mouse gesture and keyboard shortcut action to switch to the previously selected tab based on access time. The feature adds the gecko-show-previously-selected-tab command that finds the most recently accessed tab (excluding the current one) and switches to it.
Key Changes:
- Added
gecko-show-previously-selected-tabcommand that iterates through tabs to find the one with the highest_lastAccessedtimestamp (excluding tabs withInfinity) - Registered the new action in both the custom shortcut key system and mouse gesture system
- Made the action available in the gesture settings UI
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
libs/shared/custom-shortcut-key/commands.ts |
Added the gecko-show-previously-selected-tab command with logic to find and select the previously accessed tab |
browser-features/chrome/common/mouse-gesture/utils/actions.ts |
Registered the same action for mouse gestures with identical logic (but includes debug logging and a return statement) |
browser-features/pages-settings/src/app/gesture/useAvailableActions.ts |
Added the new action to the list of available gesture actions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Implementing the missing option mentioned (by me) in #2158