-
Notifications
You must be signed in to change notification settings - Fork 6
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
Selection in one super select affects options of another. #42
Selection in one super select affects options of another. #42
Comments
@pascallaliberte It's like we need to be able to piggy-back on the AJAX feature and just specify that the |
@andrewculver How likely is it that the field label will change in the Webhook#new form? e.g. Let's take the Country > Region example. Instead of "Region", if you select "Canada" as the country, the region label will be "Province" and if United States, will be "State". In that case, a turbo_frame will be what's called for. |
I think it’s quite rare. The only example where I can think of that being needed is an address field. I probably wouldn’t solve for that specific problem necessarily. In particular, we actually want to introduce a package specifically for supporting address fields, so we could sell for that separately. |
@andrewculver made some headway into this. I've chosen to equip super-select to update its own I chose not to use the new |
Two problems I've run across, making
Changing Then there's the issue of Speaking of For problem Overall, however, the other alternative is to Which direction are you leaning toward? |
It kinda feels like we should go all-in with super-select working with our endpoints out of the box by default, including default support for |
@andrewculver Thought some more about this. I see two big approaches:
Option 1. is better if we ever assume we should handle large sets of values for the super-select. Option 2. is better if we assume short lists of values. It's also better if there's something else we want updated based on the value selected in the primary super select (e.g. the label of the field, an updated helper text, anything outside of the super-select itself) because the whole turbo_frame will be updated. |
Our work on bullet-train-co/bullet_train#635 will solve all of this. It'll update a dependent super select. It'll side-track the problems with searches and ajax response. It'll also avoid touching the controllers to make parts of the form change to a query_string param of the field we're depending on as we update a turbo_frame to include the new super select. But there is one thing that'll need a little documentation:
Let's wait until 635 is merged and we can look into that piece of documentation. |
bullet-train-co/bullet_train#635 is now merged. The underpinnings are available for this functionality (and used out-of-the-box in the new Address field implementation). The next step it to document this trick. Let's keep this issue open to cover the documentation need. |
@pascallaliberte, do you think we should make an issue in one of the active repos that links to this issue, just so we don't lose track of it? (I had no idea that there were still active issues on repos left over from before The Great Bundling.) |
@jagthedrummer Closing bullet-train-co/bullet_train-core#534 will close this one. It's also referenced in issue bullet-train-co/bullet_train-core#533 |
Background
Hypothetically, when setting up a webhooks endpoint for
scaffolding_completely_concrete_tangible_things.updated
, we want users to be able to specify that they only want to receive a webhook when a specific tangible thing is updated. The current plan is to implement this by adding ascaffolding_completely_concrete_tangible_thing_id
attribute toWebhooks::Outgoing::Endpoint
. (We're also going to add ascaffolding_absolutely_abstract_creative_concept_id
attribute as well, for filtering those kinds of events.)Assume there is both a "Creative Concept" and "Tangible Thing" super select field on the form for
Webhooks::Outgoing::Endpoint
.Request
Country
>Region
>City
.Initial Thoughts
I think this should be relatively straightforward, since we have the ability to populate a Super Select based on an AJAX request and you can hit
/account/scaffolding/absolutely_abstract/creative_concepts/$CREATIVE_CONCEPT_ID/completely_concrete/tangible_things.json
and get a list of Tangible Things for a given Creative Concept.The text was updated successfully, but these errors were encountered: