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

Replace slim-select with tom-select #14917

Closed
jeremystretch opened this issue Jan 24, 2024 · 1 comment
Closed

Replace slim-select with tom-select #14917

jeremystretch opened this issue Jan 24, 2024 · 1 comment
Assignees
Labels
status: accepted This issue has been accepted for implementation type: housekeeping Changes to the application which do not directly impact the end user
Milestone

Comments

@jeremystretch
Copy link
Member

Proposed Changes

We currently employ the slim-select library to facilitate dynamic, API-backed dropdown widgets in the user interface. We are currently using v1.27, which is far out of date. This issue proposes replacing slim-select with the alternative tom-select library.

If accepted, this proposal would negate #14734.

Justification

There are a few reasons I'm leaning toward tom-select:

  1. The Tabler framework ships with native styling for tom-select inputs
  2. Tom-select seems to provide more thorough documentation
  3. Initial experimentation with tom-select has been very promising, and it feels like it would easily support Ability to display additional relevant context data within the select UI #13283
  4. Upgrading slim-select to v2.8 would essentially require rewriting the current implementation (and there's apparently no migration guide provided)
@jeremystretch jeremystretch added type: housekeeping Changes to the application which do not directly impact the end user status: under review Further discussion is needed to determine this issue's scope and/or implementation labels Jan 24, 2024
@jeremystretch jeremystretch changed the title Replace slim-slect with tom-select Replace slim-select with tom-select Jan 24, 2024
@jeremystretch
Copy link
Member Author

We discussed this in today's maintainers' meeting and decided to move ahead with tom-select.

@jeremystretch jeremystretch self-assigned this Jan 25, 2024
@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation and removed status: under review Further discussion is needed to determine this issue's scope and/or implementation labels Jan 25, 2024
@jeremystretch jeremystretch added this to the v4.0 milestone Jan 25, 2024
jeremystretch added a commit that referenced this issue Feb 8, 2024
* Experimenting

* Remove testing resources

* Replace ApiSelect with TomSelect

* Add color support

* Add clear button

* Clear cached options when searching dynamic selects

* Add support for static parameters

* Refactor TomSelect implementation

* Add dynamic parameter support

* Limit number of options to 100

* Remove redundant api_url definitions for user model

* Add support for disabled indicator

* Remove obsolete value-field attr on dynamic select widgets

* Remove obsolete fetch_trigger kwarg from dynamic model choice widgets

* Remove obsolete empty_label kwarg from dynamic model choice widgets

* Add support for API path variables

* Add support for setting a 'null' option

* Annotate depth for recursive hierarchies

* Misc cleanup

* Remove obsolete APISelect code

* Remove slim-select & just-debounce-it

* Clean up type validation

* Closes #14237: Clear child selections on change to parent selection

* Use an MD icon for the clear button

* Use an MD icon for the clear button

* Explain why noUnusedParameters is disabled
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: housekeeping Changes to the application which do not directly impact the end user
Projects
None yet
Development

No branches or pull requests

1 participant