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

Use Select2 for variant search #49

Merged
merged 4 commits into from
Nov 11, 2019
Merged

Use Select2 for variant search #49

merged 4 commits into from
Nov 11, 2019

Conversation

tvdeyen
Copy link
Member

@tvdeyen tvdeyen commented Nov 11, 2019

Instead of preloading all variants - what can be a lot in some stores - we make use of the Ajax loading feature of select2 in the variant select box of the newly introduced essence_spree_variant.

Also includes fixes for the ingredient setter method and the preview text.

Instead of setting an invalid Spree::Variant instance we just
the variant_id if an ID is passed instead of a Variant to the
ingredient setter method.
Loading all variants in each essence editor editor partial is
a huge performance issue. Use select2 ajax feature, so that
the variants get loaded on demand.
We now have javascript assets (the ajax based variant select)
that needs to be installed in the host app.
Copy link

@dividedharmony dividedharmony left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@tvdeyen tvdeyen merged commit 24f4225 into master Nov 11, 2019
@tvdeyen tvdeyen deleted the select2-variant-search branch November 11, 2019 18:24
tvdeyen added a commit that referenced this pull request Nov 12, 2019
- Use Select2 ajax for Taxon select [\#52](#52) ([tvdeyen](https://github.com/tvdeyen))
- Add support for Ransack query params [\#51](#51) ([tvdeyen](https://github.com/tvdeyen))
- Use Select2 Ajax feature for Essence Product [\#50](#50) ([tvdeyen](https://github.com/tvdeyen))
- Use Select2 for variant search [\#49](#49) ([tvdeyen](https://github.com/tvdeyen))
- Add essence variants [\#48](#48) ([tvdeyen](https://github.com/tvdeyen))
- CI build fixes [\#47](#47) ([tvdeyen](https://github.com/tvdeyen))
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.

2 participants