-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
PR: Restore widget shortcuts to Preferences and allow to change them on the fly (Shortcuts) #23024
Open
ccordoba12
wants to merge
10
commits into
spyder-ide:master
Choose a base branch
from
ccordoba12:issue-22516
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The current docstrings were not easy to understand.
ccordoba12
force-pushed
the
issue-22516
branch
6 times, most recently
from
November 20, 2024 21:27
bbbc620
to
251ca02
Compare
- The previous solution, which used tuples to collect those data, was easy to break, because it required to put data in the right order; and undocumented, because it was unclear what kind of data had to be added in the tuple elements. - Those limitations made difficult to reason about shortcuts-related code.
- Before we only allowed class methods decorated with on_conf_change to do that. - But that's too limited if we need to use regular functions to observe an option. And that's precisely what this new method allows us to do.
This is necessary to add observers for specific shortcuts.
- That allows those shortcuts to be updated on the fly when they are changed in Preferences or directly with set_conf. - Also, fix inheritance of classes that inherit from SpyderShortcutsMixin to accomodate this change.
ccordoba12
force-pushed
the
issue-22516
branch
from
November 21, 2024 17:15
251ca02
to
8b3fe55
Compare
That was introducing an error in test_shortcut_for_widget_is_updated when run on CI due to the incorrectly named section.
This is to have feature parity of kwargs with the other methods of SpyderShortcutsMixin.
ccordoba12
force-pushed
the
issue-22516
branch
from
November 21, 2024 22:37
8b3fe55
to
b18dc1a
Compare
@dalthviz, this is ready for review. Please check that:
|
Gave this an initial check and seems like manually changing shortcuts is working and also shortcuts like |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Changes
ShortcutData
dataclass to represent shortcut data internally and work more easily with it.Issue(s) Resolved
Fixes #22516
Affirmation
By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.
I certify the above statement is true and correct: @ccordoba12