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

Add classvar ESCAPE_TO_MINIMIZE #4951

Merged
merged 10 commits into from
Aug 29, 2024
Merged

Add classvar ESCAPE_TO_MINIMIZE #4951

merged 10 commits into from
Aug 29, 2024

Conversation

willmcgugan
Copy link
Collaborator

Fixes #4949

@willmcgugan willmcgugan marked this pull request as draft August 28, 2024 16:08
@darrenburns
Copy link
Member

As mentioned, maybe this should be union of true/false/none. The value at App takes precedence. If the value is set (not None) at the Screen level, the the value from the Screen overrides.

@willmcgugan willmcgugan marked this pull request as ready for review August 29, 2024 09:11
Copy link
Member

@darrenburns darrenburns left a comment

Choose a reason for hiding this comment

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

Looks good. Just as a general question - is there something about our binding system that means we're preferring to handle this inside on_key rather than as a binding (or priority binding)? If we're opting to do this, it might suggest we're missing some functionality in the binding system?

@willmcgugan
Copy link
Collaborator Author

It could be done with a binding. But it would place a burden on the dev not to break it, and to do the right thing if they want to bind escape for something else. Maybe we could add something to the binding system to make that a non-issue in the future, but I don't know what that would look like.

@willmcgugan willmcgugan merged commit d173c26 into main Aug 29, 2024
20 checks passed
@willmcgugan willmcgugan deleted the escape-minimize branch August 29, 2024 10:06
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.

Make "escape to dismiss" optional for maximised widgets
2 participants