-
Notifications
You must be signed in to change notification settings - Fork 345
[PORT] Dropdowns v2; plus, dropdowns now highlight their selected element #5731
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
[PORT] Dropdowns v2; plus, dropdowns now highlight their selected element #5731
Conversation
Complete rewrite of dropdowns to use popper elements that are injected at the body level. This means they are now horribly overcomplicated and also suck a lot less  Also ported `Icon` to typescript for a reason that didn't end up making it in the PR   :cl: add: good tgui dropdowns del: tgui dropdown suck qol: tgui dropdowns suck less balance: buffed tgui dropdowns /:cl:
## About The Pull Request This PR makes selected elements in Dropdowns to be highlighted. Without this:  With this:  ## Why It's Good For The Game It's convenient to have this kind of selection indication, especially in long lists. ## Changelog :cl: qol: Made selected elements highlighted in TGUI Dropdowns /:cl:
## About The Pull Request If dropdown not receive `selected` prop, buttons will be change value to first(when press next) or last element(when press back) ## Changelog :cl: fix: Fixed dropdown buttons empty selected case /:cl:
I was notified that this caused the Chromosome selection on the Genetics console to look a little weird. It looks a bit like this: I was able to replicate this on tgstation, but only after reverting to a pre-react commit (I chose tgstation/tgstation@84ba2dc). So Absolucy and I believe this to be an issue with us still being pre-react. However, I was able to find a temporary solution (which we will want to try to revert once the react port is done), and have implemented it in 4b0e68d. Now it looks like this, as it should: |
fe6170a
to
4b0e68d
Compare
About The Pull Request
This PR ports the following PRs from tgstation:
Here's how dropdowns looked before this PR:

and after:

Why It's Good For The Game
Code improvements, and the highlighting dropdowns makes it easier to know what you selected, especially in long lists.
Changelog
🆑MichiRecRoom, actioninja, lebedev, KoJIT2009
refactor: TGUI dropdowns have been refactored; please let me know if you spot any broken dropdowns!
qol: (lebedev) Made selected elements highlighted in TGUI Dropdowns
/:cl: