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

[24.2] Do not reorder options in FormSelect component when multiselect disabled #19837

Merged
merged 6 commits into from
Mar 26, 2025

Conversation

jdavcs
Copy link
Member

@jdavcs jdavcs commented Mar 18, 2025

Fix #19804

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

@ahmedhamidawan
Copy link
Member

ahmedhamidawan commented Mar 18, 2025

Is it just me or is the currently selected value not even being highlighted?:

firefox_zzSSC1YsGV

@jdavcs
Copy link
Member Author

jdavcs commented Mar 18, 2025

Is it just me or is the currently selected value not even being highlighted?:

You're right! 24.2, on main. It's a different issue though, I think.

@ahmedhamidawan
Copy link
Member

There is a problem with the multiselect itself as well as FormSelect being unable to recognize if something is selected if the select values are objects as opposed to strings/numbers etc.

@ahmedhamidawan
Copy link
Member

Note that this commit 165cff9 not fix the fact that Multiselect is still unable to track which values are current because it has the prop track-by="value" and value in this case can be an object.

@ahmedhamidawan
Copy link
Member

Now, explicitly check if the form select values need to be tracked by ids and it now works as expected; the current value(s) are highlighted and ordered accordingly:

firefox_IRZfj1MHhL

@bernt-matthias
Copy link
Contributor

Results look great, but I wont be able to review this .. I have no clue about the client stuff :(

@ahmedhamidawan
Copy link
Member

ahmedhamidawan commented Mar 20, 2025

Also changed the hover highlight for the current option to brand-success from brand-danger which I think makes more sense? Can drop this commit if people are against this.

firefox_8LGhaPTat6

@jdavcs
Copy link
Member Author

jdavcs commented Mar 20, 2025

@ahmedhamidawan I really dislike the red as the "this option is selected" indicator. Do we have an option besides green? (maybe a darker shade of gray, so as to highlight the selected item as "different" from unselected items; red/green, to me, is action or event-related as opposed to indicating a difference) If not, green is still better than red, in my opinion.

@ahmedhamidawan
Copy link
Member

firefox_UCpumInB9d

Maybe this? @jdavcs

@jdavcs
Copy link
Member Author

jdavcs commented Mar 20, 2025

Maybe this? @jdavcs

Yep, I think that makes it much better!

@mvdbeek mvdbeek merged commit 7bd3e59 into galaxyproject:release_24.2 Mar 26, 2025
25 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants