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

Consolidate Dropdown components #11080

Open
emteknetnz opened this issue Nov 29, 2023 · 0 comments
Open

Consolidate Dropdown components #11080

emteknetnz opened this issue Nov 29, 2023 · 0 comments

Comments

@emteknetnz
Copy link
Member

emteknetnz commented Nov 29, 2023

silverstripe/silverstripe-admin#1618 added SearchableDropdownFieldTrait which uses react-select to render a flexible drop down which can:

  • be a regular drop down
  • be a multi-select drop down
  • type in to search and narrow down options
  • optionally do lazy-loaded ajax requests for large amounts of options

In a CMS context, there are too many dropdown classes, including ones using jQuery chosen which we should be aiming to remove these and only use the react-select version

We will need to consider what impact this would have on projects that use the provided Form fields on the frontend - https://www.silverstripe.org/learn/lessons/v4/introduction-to-frontend-forms-1?_ga=2.202441553.1747665087.1701218520-1653549433.1678675180 as react isn't suitable for this

Since we can make breaking changes for major releases, SearchableDropdownFieldTrait.php should be turned into simply DropdownField.php and the following php files (and other associated files) should be removed:

  • SelectField.php
  • SingleSelectField.php
  • DropdownField.php
  • MultiSelectField.php
  • ListboxField.php
  • SearchableDropdownField.php
  • SearchableMultiDropdownField.php
  • SearchableDropdownTrait.php
@emteknetnz emteknetnz added this to the Silverstripe CMS 6 milestone Nov 29, 2023
@michalkleiner michalkleiner changed the title Consolodate Dropdown components Consolidate Dropdown components Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant