Create new single choice input implementation#2426
Conversation
|
|
|
Regarding Step 3 in the Verification steps ... |
This was done as the original single choice input would show the full list of options whenever the input was in focus. I couldn't find a way to only show this list when it is clicked on and then hide it when an option is chosen, as it is a text object so it keeps its focus after an option has been selected. |
Auriga2
left a comment
There was a problem hiding this comment.
Wondering why we need to display Select next to the triangle in the drop down, which takes a wider space than required to fit this text anyway.
| public List<MenuItem> getLocalMenuItems() { | ||
| final List<MenuItem> items = new ArrayList<>(); | ||
| if (type != null) { | ||
| if (type == SINGLE_SPINNER) { |
There was a problem hiding this comment.
Where exactly SINGLE_SPINNER option used in the code? Perhaps worthwhile adding a description in the code, or in the changelog.md?
There was a problem hiding this comment.
This PR is just pulling out the single choice input out of this PR #2025 which is not finished yet. The SINGLE_SPINNER is for a component that has not yet been implemented.
The Select is there so that when the rest of that input field PR is done, all of the components will have the same look and feel
| } | ||
|
|
||
| /** | ||
| * Set the collection of icons from a list of InageIcons. |
There was a problem hiding this comment.
Typo InageIcons.
Also what is the use of icons here? If you meant to use it for icons in the dropdowns similar to Robot options in Test Parameters plugin, it doesn't seem to be working.
There was a problem hiding this comment.
This should be working now
As I haven't been able to get the drop down menu to not show when an option has been selected, I have now reverted this change back to what it did before, so now the drop down menu will only show the options that match what is currently in the text box. This means that in order to show the full list again, you either have to clear the text field or use the Select button |
|
Looks better now, but it lets users proceed with any text typed. Previously it'd clear if nothing matches. |
This could potentially be something to look at when the rest of this PR #2025 is implemented as the thought was to keep all the components the same size, and look and feel |
It could potentially be looked at there. The main difference I see though between the single and multi-choice dropdowns is that the display value for the multi-choice can get bigger as more options are selected (albeit it suffers the same issue when there aren't many options selected), whereas the single choice dropdown display value won't get any bigger than the longest option in the dropdown (and so the box its contained in doesn't need to be longer than that) |
|
Validation is no longer needed as the input will now clear the text if it is not valid and the text area is no longer in focus |
|
antares1470
left a comment
There was a problem hiding this comment.
Subject to box size being fixed in #2025




Prerequisites
Reviewed the checklist
Reviewed feedback from the "Sonar Cloud" bot. Note that you have to wait
for the "CI / Unit Tests") to complete first. Failed Unit tests can be
debugged by adding the label "verbose logging" to the GitHub PR.
Description of the Change
Implemented the new single choice input from this PR #2025
All single choice inputs have been updated to the new implementation
Alternate Designs
Why Should This Be In Core?
New look and feel for the single choice inputs to match the new multi choice input.
Benefits
Possible Drawbacks
Verification Process
Applicable Issues
#2428