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

Feature: Autocomplete/dropdown or any other assisted input with generic conditionals #42

Open
rinatkhaziev opened this issue Jun 28, 2012 · 12 comments

Comments

@rinatkhaziev
Copy link
Contributor

Per @jeremyfelt:
it would be cool if we could modify the input fields for each conditional either through filters or just by default. For example – If is_category() is selected as the conditional, a drop down list of existing categories would be more pleasant than a text field.

@jeremyfelt
Copy link
Contributor

I started tackling this last night and made some decent progress. I'm going to try and have it ready for some testing by next week.

@ghost ghost assigned jeremyfelt Oct 18, 2012
@danielbachhuber
Copy link
Contributor

Cool, assigned this to you and the v0.3 milestone

@danielbachhuber
Copy link
Contributor

@jeremyfelt still want to try to swing this for v0.4?

@jeremyfelt
Copy link
Contributor

This got pretty ugly pretty quick. I'm guessing it's a no go for v0.4, but deserves future thought. I'll take a peek soon.

@jeremyfelt
Copy link
Contributor

Brainstorming here... Ignoring quick edit for the moment, just focusing on new ad code.

  1. Check a JS global for options to prefill when onchange of acm-conditionals[] select field is triggered
  2. If the JS global has a matching key - is_category - replace the acm-arguments[] input field with a select menu
  3. Loop through the matching key's array in the JS global to build the possible selections in acm-arguments[]

So...

  • This seems straight forward at first, but what if you're working with is_tag as your conditional and have 70,000 tags?
  • Rather than a new select menu, we can use jQuery UI's chosen to corral a massive list.
  • Generating the massive list would be expensive, though we are in the admin. Would an ajax search interface make sense instead?
  • Would it make more sense as a filter that let themes or providers decide what should show?

See, ugly. :)

Thoughts @danielbachhuber @rinatkhaziev?

@rinatkhaziev
Copy link
Contributor Author

This seems straight forward at first, but what if you're working with is_tag as your conditional and have 70,000 tags?

Start autocompleting at 3 chars, limit to 100 items. This way we won't do any expensive queries.

Rather than a new select menu, we can use jQuery UI's chosen to corral a massive lis

Makes sense

Generating the massive list would be expensive, though we are in the admin. Would an ajax search interface make sense instead?

See the first bullet point

Would it make more sense as a filter that let themes or providers decide what should show?

Filter would definitely be nice.

Not that ugly :)

@jeremyfelt
Copy link
Contributor

Good point. With Chosen, the user could just finish typing if it doesn't match one of the 100. Much less ugly.

@danielbachhuber
Copy link
Contributor

@jeremyfelt will you be able to finish this up in the next day or so?

@jeremyfelt
Copy link
Contributor

I'm going to try and toss some time at it this evening or tomorrow, but the outlook is unlikely at finishing it up for 0.4.

@danielbachhuber
Copy link
Contributor

Let's just put it in v0.5 then, and we can keep the momentum going by releasing in a month or so. Please do the work on a feature branch when you do work on it.

@jeremyfelt
Copy link
Contributor

Awesome, sounds good.

@jeremyfelt jeremyfelt removed their assignment Jul 9, 2019
@GaryJones GaryJones modified the milestones: 0.5.0, Future Release Mar 14, 2022
@GaryJones
Copy link
Collaborator

No branch apparently existing in GitHub for this work.

@GaryJones GaryJones removed this from the Future Release milestone Sep 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants