Skip to content
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

Default python implementation for generic_browser #532

Closed
xavier630 opened this issue Aug 2, 2021 · 1 comment
Closed

Default python implementation for generic_browser #532

xavier630 opened this issue Aug 2, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@xavier630
Copy link
Contributor

xavier630 commented Aug 2, 2021

This probably applies to other generic x classes of commands as well but I noticed looking at generic browser that there is a lot duplication of implementations across browsers due to not having any default implementations to inherit from.

The command -> action mapping only needs to be registered once at the generic browser level which is probably where a default implementation should be too in order to avoid this duplication:

Example
The go(url) command is implemented identically four times (once for each browser):
image

@xavier630 xavier630 changed the title Default python implementations for generic_browser Default python implementation for generic_browser Aug 2, 2021
@splondike splondike added the enhancement New feature or request label Sep 16, 2021
splondike pushed a commit that referenced this issue Mar 11, 2023
)

The goal of this PR is to reduce duplication, add consistency and
complete functionality where possible. It should close issue #532.

Things done:

- Move most of the common browser functionality to browser.py and
browser_mac.py
- Implement tab actions in those same two files and in the specific
browser apps when they differ.
- Change mac shortcuts for tab next and tab previous to `ctrl-tab` and
`ctrl-shift-tab` that have less issues with international keyboards.
(Maybe a bit out of the scope of this PR)
- Implement action `browser.focus_page` and add command to trigger it.
- Implement action `user.tab_duplicate` for all the browsers.
- Implement commands `bookmarks sidebar` and `history sidebar` and their
respective actions for Firefox.
- Fix some shortcuts that were incorrect.
- Raise NotImplementedError for the actions that couldn't be implemented
with a clear message of the reason.
- Add support for Opera and Vivaldi browsers.
- Add .talon files for all the browsers. This makes it easier if the
user wants to add custom commands.
- Move all the tag activation to .talon files
- Remove commented out commands in browser.talon. Many of those can now
be performed with Rango.
@splondike
Copy link
Collaborator

#1117 has reduced duplication and put together some default browser actions. Closing this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants