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

Select2 v4.0.9 support #16

Closed
wants to merge 2 commits into from
Closed

Select2 v4.0.9 support #16

wants to merge 2 commits into from

Conversation

aTei
Copy link

@aTei aTei commented Sep 26, 2019

Not working for prev v4.0.* versions

https://github.com/select2/select2/releases/tag/4.0.9
Related commit select2/select2#5582

@aTei aTei changed the title Select2 v4.0.10 support Select2 v4.0.9 support Sep 26, 2019
@aTei
Copy link
Author

aTei commented Sep 26, 2019

Updated info

@Hirurg103
Copy link
Owner

Hi @aTei , thank you for this contribution.

I think that if I merge this PR the gem won't work for select2 v4.0.5? Any ideas?

@aTei
Copy link
Author

aTei commented Sep 26, 2019

The only option I see is to make it the same way as was done separation between 2, 3 & 4

@Hirurg103
Copy link
Owner

Let me think a bit

@Hirurg103
Copy link
Owner

Hirurg103 commented Sep 30, 2019

The only option I see is to make it the same way as was done separation between 2, 3 & 4

Yea, could you go with this solution for now and add one test case for version v4.0.10 in a separate test file (select2_v4-0-10_spec.rb for example). And change version in spec/fixtures/select2-v4/index.html back to v4.0.5

Note that you will need separate fixture html for version v4.0.10. Name it spec/fixtures/select2-v4-0-10/index.html

@tbk303
Copy link

tbk303 commented Oct 4, 2019

Maybe omit [role='treeitem'] in the selector and add a check for [role='alert'] to filter the messages issued by select2? This way both versions could be supported.

@MatthewKennedy
Copy link

Any chance this can make it as a released version?

@Hirurg103
Copy link
Owner

@MatthewKennedy, this PR cannot be merged now because it breaks support for previous versions of select2 (v4.0.5 for example)

@Hirurg103 Hirurg103 closed this in 53a9bf4 Dec 6, 2019
@Hirurg103
Copy link
Owner

Hi @aTei , thank you for this contribution. I decided to test select2 version 4.0.12 thoroughly and extracted all tests to the shared folder. I run all shared tests for all tested select2 versions. See refactor tests commit and add support for 4.0.9+ commit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants