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

Enhance popup #482

Open
3 tasks
FWDekker opened this issue Oct 19, 2023 · 3 comments · Fixed by #487
Open
3 tasks

Enhance popup #482

FWDekker opened this issue Oct 19, 2023 · 3 comments · Fixed by #487
Assignees
Labels
enhancement Improvement of existing feature

Comments

@FWDekker
Copy link
Owner

FWDekker commented Oct 19, 2023

The current popup would benefit from more customisation and features, including:

  • Putting the settings option at the top, with shortcut 0.
  • If the user presses the 0 mnemonic while focussing on some template, then that template is opened in the settings.
  • The previously selected template is pre-selected when the popup is opened. (Stored by the corresponding template's UUID.) (This does not need to persist between sessions, but could probably made persistent using PropertiesComponent.)

This can be achieved by implementing my own PopupStep.


Old description:
It annoys me to no end that the "0" shortcut in the settings by default refers to the settings, but that's only because it's coincidentally the 10th scheme. I think configuring it to always link to opening the main settings would be a more logical choice.

@FWDekker FWDekker added the enhancement Improvement of existing feature label Oct 19, 2023
@FWDekker FWDekker added this to the v3.0.0 milestone Oct 19, 2023
@FWDekker FWDekker self-assigned this Oct 19, 2023
@FWDekker FWDekker changed the title Fix settings shortcut in popup Use 0 shortcut in popup to open settings Oct 22, 2023
@FWDekker
Copy link
Owner Author

I feel like I've investigated this before, but this is not actually possible, because the numbering is determined by a setting of JBPopupFactory, and is not something I have control over (beyond enabling/disabling it). Therefore, this issue cannot (currently) be solved.

@FWDekker FWDekker closed this as not planned Won't fix, can't repro, duplicate, stale Oct 22, 2023
FWDekker added a commit that referenced this issue Oct 22, 2023
While investigating #482, I found that I could add more mnemonics, which is kinda cool. So I did.
@FWDekker
Copy link
Owner Author

Actually, I think I can solve this. Simply put the settings entry at the very top, similar to IntelliJ's own Run configurations popup, where 0 is always the first entry, and pressing 0 while focusing on an entry will open the settings focused on that entry.

@FWDekker FWDekker reopened this Nov 12, 2023
@FWDekker
Copy link
Owner Author

JBPopupFactory (and the deeply nested class that makes the popup) only supports displaying the entries in the order 1, 2, ..., 9, 0, A, B, ..., Z. As a result, the settings action will be at 1, and the first template action at 2. In the settings dialog, the templates will thus start at 2, which I dislike.

Therefore, the solution will be to implement a custom PopupStep class which has the desired behaviour. With this additional freedom, I can also add other nice features. I will add this to the issue's description. I will postpone the code rewrite to v3.1.0.

@FWDekker FWDekker modified the milestones: v3.0.0, v3.1.0 Nov 12, 2023
@FWDekker FWDekker changed the title Use 0 shortcut in popup to open settings Enhance popup Nov 14, 2023
@FWDekker FWDekker removed this from the v3.1.0 milestone Dec 6, 2023
@FWDekker FWDekker moved this to Ready in Randomness issues Jan 10, 2024
@FWDekker FWDekker moved this from Ready to Backlog in Randomness issues Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement of existing feature
Projects
Status: Backlog
Development

Successfully merging a pull request may close this issue.

1 participant