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

Disable invalid menu actions #304

Merged
merged 1 commit into from
Jul 28, 2024
Merged

Disable invalid menu actions #304

merged 1 commit into from
Jul 28, 2024

Conversation

LucasPickering
Copy link
Owner

Description

Describe the change. If there is an associated issue, please include the issue link (e.g. "Closes #xxx"). For UI changes, please also include screenshots.

The implementation is mildly jank, but it's simple and clear to the user. Disabled items can still be selected, they just don't trigger callbacks. This was the easiest thing to implement and I think also the most intuitive.

Closes #222

Known Risks

What issues could potentially go wrong with this change? Is it a breaking change? What have you done to mitigate any potential risks?

The implementation is fairly rigid and also includes some potential O(n^2) code, but in reality n<10 so it's totally fine.

QA

How did you test this?

Added to some unit tests, tested all the actions in the TUI.

Checklist

  • Have you read CONTRIBUTING.md already?
  • Did you update CHANGELOG.md?
    • Only user-facing changes belong in the changelog. Internal changes such as refactors should only be included if they'll impact users, e.g. via performance improvement.
  • Did you remove all TODOs?
    • If there are unresolved issues, please open a follow-on issue and link to it in a comment so future work can be tracked

The implementation is mildly jank, but it's simple and clear to the user. Disabled items can still be selected, they just don't trigger callbacks. This was the easiest thing to implement and I think also the most intuitive.

Closes #222
@LucasPickering LucasPickering merged commit 0740aa0 into master Jul 28, 2024
7 checks passed
@LucasPickering LucasPickering deleted the menu-disable branch July 28, 2024 21:56
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.

Unavailable actions in menus should be disabled
1 participant