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

Selectize fields in agg builder #2406

Closed
wants to merge 12 commits into from
Closed

Conversation

w33ble
Copy link
Contributor

@w33ble w33ble commented Dec 18, 2014

Make fields "searchable" via Selectize.

Closes #2130

(Other functionality moved to #2404)

Don't forget to run bower install before testing 😋

  • Replace angular-ui-select with angular-selectize.js
    • angular-ui-select refused to work on fields, and the API was a huge pain
    • angular-selectize.js has a much better API, worked brilliantly and doesn't lock up FF
  • Use selectize for include/exclude filter flags
  • Use selectize for field selection
  • Tweak styles so selectize inputs match vanilla inputs

Chrome:
2014-12-18 16_12_47

Firefox:
2014-12-18 16_20_15

@rashidkpc
Copy link
Contributor

Can you update this with more emojis? 🍂

@w33ble w33ble added the review label Dec 19, 2014
@rashidkpc
Copy link
Contributor

This will let you pass an invalid field name in, causing the app to silently fail until a full page refresh is performed.

Reproduction steps:

  1. Add an aggregation
  2. Start with a valid field
  3. Click apply
  4. Blank the field name and type something invalid
  5. Click apply, observe console error.

This should probably disable the Apply button if no valid field is selected.

@rashidkpc rashidkpc assigned w33ble and unassigned rashidkpc Dec 19, 2014
@w33ble
Copy link
Contributor Author

w33ble commented Dec 19, 2014

Ah, good catch. Apparently I removed the required attribute on the field 🐋

@w33ble w33ble assigned rashidkpc and w33ble and unassigned w33ble and rashidkpc Dec 19, 2014
@w33ble
Copy link
Contributor Author

w33ble commented Dec 19, 2014

There's still an issue with ng-invalid not being set here. Gotta dig in to the directive a little methinks 👘

@w33ble w33ble assigned rashidkpc and unassigned w33ble Dec 19, 2014
@w33ble
Copy link
Contributor Author

w33ble commented Dec 19, 2014

@rashidkpc since you have a windows VM, can you make sure this works well in IE too? Or, we can wait til we get the new box to merge this, either way.

@@ -26,8 +26,8 @@
"angular-elastic": "~2.3.3",
"angular-mocks": "~1.2.14",
"angular-route": "~1.2.14",
"angular-selectize.js": "w33ble/angular-selectize.js#b0dd020c",
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you submit a pull to upstream for your changes to this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did. EvanOxfeld/angular-selectize.js#27

There's also an issue where a test fails on angular > 1.2.25, and a bunch fail in 1.3 - got an issue for that as well, and pull that sets the version since I was unable to fix the test. EvanOxfeld/angular-selectize.js#28

@rashidkpc
Copy link
Contributor

On the initial load I don't seem to be able to type into this. If I hit the arrow keys a few times it works, but on inital load the type-to-search functionality seems to be broken.

@rashidkpc rashidkpc assigned w33ble and unassigned rashidkpc Dec 22, 2014
@w33ble
Copy link
Contributor Author

w33ble commented Dec 30, 2014

Having explored it for a while, and submitted some issues and PRs, it's become clear that angular-selectize is a bit of a mess, and there are some fundamentally broken parts. I'm not sure the author is really interested in maintaining it and I'm not convinced the issues will be resolved. I'm also not crazy with how selectize itself works, so this solution looks like a dead end.

The options currently seem to be exploring a fix for chosen on firefox (if it hasn't already been fixed) or write my own select2 directive (the angular-ui one is not useable).

@w33ble w33ble closed this Dec 30, 2014
@w33ble w33ble deleted the selectize-fields branch February 6, 2015 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Better select box
2 participants