Skip to content

Create new single choice input implementation#2426

Merged
antares1470 merged 20 commits into
masterfrom
feature/single-choice-input
Feb 18, 2026
Merged

Create new single choice input implementation#2426
antares1470 merged 20 commits into
masterfrom
feature/single-choice-input

Conversation

@Delphinus8821

@Delphinus8821 Delphinus8821 commented Nov 13, 2025

Copy link
Copy Markdown
Collaborator

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

  1. Open the Data Access View and expand the Test Parameters plugin
  2. Start typing into the Graph Element Type single choice input and choose one of the options
  3. Observe the dropdown list still shows when an option has been selected, with the selected option at the top
  4. Click the Select button and check it shows the same drop down list

Applicable Issues

#2428

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
9.5% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
46.2% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@Delphinus8821 Delphinus8821 marked this pull request as ready for review December 22, 2025 23:43
@Delphinus8821 Delphinus8821 marked this pull request as draft January 21, 2026 02:48
@OrionsGuardian

Copy link
Copy Markdown
Collaborator

Regarding Step 3 in the Verification steps ...
Once an entry has been selected, editing is complete.
There shouldn't be any need to display the full list of options.

@Delphinus8821

Copy link
Copy Markdown
Collaborator Author

Regarding Step 3 in the Verification steps ... Once an entry has been selected, editing is complete. There shouldn't be any need to display the full list of options.

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 Auriga2 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Where exactly SINGLE_SPINNER option used in the code? Perhaps worthwhile adding a description in the code, or in the changelog.md?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This should be working now

@Delphinus8821

Copy link
Copy Markdown
Collaborator Author

Regarding Step 3 in the Verification steps ... Once an entry has been selected, editing is complete. There shouldn't be any need to display the full list of options.

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

@Auriga2

Auriga2 commented Feb 10, 2026

Copy link
Copy Markdown
Collaborator

Looks better now, but it lets users proceed with any text typed. Previously it'd clear if nothing matches.

@antares1470 antares1470 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I wonder if the dropdown itself might potentially be able to take up less space? Right now it seems to stretch the length of the view which for a Single Choice dropdown with small values means there's a lot of wasted space.

Image

@Delphinus8821

Copy link
Copy Markdown
Collaborator Author

I wonder if the dropdown itself might potentially be able to take up less space? Right now it seems to stretch the length of the view which for a Single Choice dropdown with small values means there's a lot of wasted space.

Image

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

@antares1470

antares1470 commented Feb 17, 2026

Copy link
Copy Markdown
Collaborator

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)

@Delphinus8821

Copy link
Copy Markdown
Collaborator Author

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

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
44.6% Coverage on New Code (required ≥ 80%)
3.4% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@antares1470 antares1470 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Subject to box size being fixed in #2025

@antares1470 antares1470 merged commit a208d51 into master Feb 18, 2026
2 of 3 checks passed
@antares1470 antares1470 deleted the feature/single-choice-input branch February 18, 2026 21:54
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.

6 participants