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

Improve Region Dropdown Selections #376

Merged

Conversation

ducku
Copy link
Collaborator

@ducku ducku commented Dec 2, 2023

Use label system to display both path with region and description while ignoring description upon onChange
Region_Dropdown

Closes #362

Copy link
Member

@adamnovak adamnovak left a comment

Choose a reason for hiding this comment

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

This looks good and seems to work properly when I run it, except I don't like the implementation of getting rid of the none: option. We're filtering it out instead of working out why it is getting generated and making that not happen.

Also the PR probably needs to be updated with the merge of the other region dropdown PR.

}

// Autocomplete selectable options
const displayRegions = [...pathsWithRegion, ...pathNamesColon];
const displayRegions = [...pathsWithRegion, ...pathNamesColon].filter(option => option.label !== "none:");
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is the Right Way to get rid of this extra option, because the code does not convince me that we actually know why it is showing up.

Either we should get rid of it where it is actually being generated, or we should have a comment here explaining why it is there and why this actually is the best time to remove it.

@adamnovak adamnovak merged commit bc8040f into vgteam:master Dec 11, 2023
1 check passed
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.

Improve region dropdown display for BED regions
2 participants