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
Remove modules deprecated in 4.0.0 #5815
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This never actually really worked, and since we thought this commit was coming sooner, we never actually fixed it. Now we can just remove it and accept the fact that Select2 currently only works for `<select>` boxes, the things it advertises itself as being a replacement for. Closes #3294.
These features will be removed in upcoming commits.
These were originally slate to be deprecated and removed during the 4.1.0 release, but it has been determined that they should still remain in the core. These will be stripped down to only the essentials before the 4.1.0 release, sincce we don't want to have to continue supporting another 6 options on top of the ones we already have.
This removes the two options that were specific to the CSS for a dropdown. These two options were not well documented and as a result are not widely used. * dropdownCss - Allowed for custom CSS styles to be injected on the dropdown container. Had an undocumented feature where the CSS could be customized per element by passing in a function as the option. There is no immediate replacement for this option since Select2 will only allow custom CSS classes going forward. The best option is to create a new CSS class which covers the properties that were previously being injected. * adaptDropdownCssClass - Allowed for the CSS classes which were present on the original element to be cloned into the set of CSS classes which were on the dropdown container. This was only documented as a possible option but the rest of the documentation was left blank, probably because nobody knew what this did. Internally this was used to make the `:all:` helper function within the `dropdownCssClass` option. The suggested replacement for this is to change the CSS classes on the original element prior to initializing Select2, and to use the `:all:` helper to copy those classes over. The `:all:` helper will remain as a supported option going forward.
This removes the two options that were specific to the CSS for a selection container. These two options were not well documented and as a result are not widely used. * containerCss - Allowed for custom CSS styles to be injected on the selection container. Had an undocumented feature where the CSS could be customized per element by passing in a function as the option. There is no immediate replacement for this option since Select2 will only allow custom CSS classes going forward. The best option is to create a new CSS class which covers the properties that were previously being injected. * adaptContainerCssClass - Allowed for the CSS classes which were present on the original element to be cloned into the set of CSS classes which were on the selection container. This was only documented as a possible option but the rest of the documentation was left blank, probably because nobody knew what this did. Internally this was used to make the `:all:` helper function within the `containerCssClass` option. The suggested replacement for this is to change the CSS classes on the original element prior to initializing Select2, and to use the `:all:` helper to copy those classes over. The `:all:` helper will remain as a supported option going forward.
Removed `adaptContainerCssClass`, `adaptDropdownCssClass`, `containerCss`, and `dropdownCss` which are now no longer supported with the promotion of `dropdownCssClass` and `selectionCssClass` to the core builds. Renamed `containerCssClass` to `selectionCssClass` to reflect the new name. Documented the `dir` option and pointed to the MDN documentation on the `dir` attribute. Removed `initSelection` and `query` which were used with the now-removed support of `<input />` tags.
Now that we are not dynamically loading in any modules for the full builds, we do not need the ability to override the AMD base path to search for these additional modules at. The `amdLanguageBase` option is still needed to handle dynamically loading in the additional lanugage files, though we acknowledge that nobody appears to be using this option.
This was an undocumented feature that we are dropping to ease the the maintenance burden now that the `dropdownCssClass` and `selectionCssClass` options are being included in all builds.
This should help alleviate much of the confusion that comes from people who used Select2 3.x and were used to these classes being injected at the container which wrapped the selection container instead of on the selection container itself. Now this makes it more clear what container these classes are being applied to.
We were lacking a test that verified that original classes were not copied unless `:all:` was actually specified.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes a
The following changes were made
<input />
supportinitSelection
query
dropdownCss
to a core modulecontainerCss
to a core module and rename toselectionCss
Fixes #3294