-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Update title and classnames (when option enabled) from select on update #2319
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
Open
isochronous
wants to merge
9
commits into
harvesthq:main
Choose a base branch
from
isochronous:keep_inherited_attrs_updated
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Update title and classnames (when option enabled) from select on update #2319
isochronous
wants to merge
9
commits into
harvesthq:main
from
isochronous:keep_inherited_attrs_updated
Conversation
This file contains hidden or 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
Modified chosen so that if inherit_select_classes is set to true, then classes will be copied from the select to the chosen container every time "chosen:updated" is triggered. Also added logic to ALWAYS copy the title attribute from the select to the container whenever "chosen:updated" is triggered. Updated both jQuery and prototype versions Heavily refactored unit tests for better granularity All jQuery unit tests are passing, but two prototype unit tests are failing for an unknown reason (exception being thrown from a prototype method, it's not just a failed assertion).
This reverts commit 7425638.
…on update Modified chosen so that if inherit_select_classes is set to true, then classes will be copied from the select to the chosen container every time "chosen:updated" is triggered. Add logic to ALWAYS copy the title attribute from the select to the container whenever "chosen:updated" is triggered. Updated both jQuery and prototype versions Heavily refactored unit tests for better granularity All jQuery unit tests are passing, but two prototype unit tests are failing for an unknown reason (exception being thrown from a prototype method, it's not just a failed assertion).
Cleaned up some duplicate logic that I'd left in the prototype version Significantly reorganized both spec files Got all unit tests working for both versions
Remove the x86-mingw32 entry from the PLATFORMS list
hello |
Hi there |
In case anyone wants these versions of chosen before this pull request is accepted (assuming it is), you can find both the jQuery and prototype versions here: https://gist.github.com/isochronous/541fa49aa34f7f5b20a3 |
Is anyone paying attention to these pull requests? |
…on update Modified chosen so that if inherit_select_classes is set to true, then classes will be copied from the select to the chosen container every time "chosen:updated" is triggered. Add logic to ALWAYS copy the title attribute from the select to the container whenever "chosen:updated" is triggered. Updated both jQuery and prototype versions Heavily refactored unit tests for better granularity All jQuery unit tests are passing, but two prototype unit tests are failing for an unknown reason (exception being thrown from a prototype method, it's not just a failed assertion).
Cleaned up some duplicate logic that I'd left in the prototype version Significantly reorganized both spec files Got all unit tests working for both versions
Remove the x86-mingw32 entry from the PLATFORMS list
…chronous/chosen into keep_inherited_attrs_updated
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 Fixes #2232 and Fixes #2311.
I simply extracted the logic that determines which classnames to apply to the container into a separate method, did the same for the logic that copies the title attribute, then replaced the original logic with calls to those two methods and added the same calls to the
results_build
method in the appropriate places so that classes and the title will be updated from the select on update.I also significantly reorganized the spec files to make them more granular. I originally had the whole virtual DOM being reconstructed and torn down before and after each test, but ran into some issues in prototype when using that approach that I was unable to figure out. Since none of the current tests (or the tests I added) actually conflict with each other, I just organized the tests so that the virtual DOM and the chosen instance are only created once before any test and then destroyed after all tests.
Both prototype and jQuery versions were updated, and all tests are passing.