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

Added: Dependent questions support in JSON #1762

Closed

Conversation

liortct
Copy link
Contributor

@liortct liortct commented Aug 7, 2022

Addresses #1761.

Added support for dependent questions.

@liortct liortct force-pushed the feature/dependant-questions branch from 610a8b5 to c3ec194 Compare August 7, 2022 22:17
@cookiecutter cookiecutter deleted a comment from liortct Jun 13, 2023
@ericof ericof self-requested a review June 13, 2023 13:55
@ericof ericof added this to the 2.2.0 milestone Jun 13, 2023
@ericof ericof added the enhancement This issue/PR relates to a feature request. label Jun 13, 2023
@ericof ericof modified the milestones: 2.2.0, 3.0.0 Jul 6, 2023
@Guillem96
Copy link

@ericof are you planning to merge this anytime soon?

@kurtmckee
Copy link
Member

I like this idea but am leery of this implementation. It introduces syntax in the key name that must be interpreted. I think that a different implementation may be clearer, and allow for more than boolean dependencies.

For example:

{
    "trim-level": ["basic", "standard", "high-end"],
    "stereo": [
        {"case": {"trim-level": "high-end"}, "value": "xm-enabled"},
        {"case": {"trim-level": "standard"}, "prompt": ["am-fm-only", "xm-enabled"]},
        {"default": "am-fm-only"}
    ]
}

I'm not proposing that this is what an implementation should look like, only that the ability to ask follow-up questions is useful but should be considered in the context of more conditional control over the prompting.

Due to the age of this PR, I'm closing this.

@kurtmckee kurtmckee closed this Nov 17, 2023
@liortct
Copy link
Contributor Author

liortct commented Nov 24, 2023

@kurtmckee
I would like to add this feature. If you want any changes just say and I will work on it.
I think that my implementation was good, you could use more than a boolean parameter, but if you think differently just say and I will change

@kurtmckee
Copy link
Member

Hi @liortct!

I recommend pinging @ericof / @pydanny / @jensens in #1761 to hash out the implementation. As noted above, I think that dependent questions will be valuable, but it will be good to discuss a solution that allows for more than boolean conditions.

@ericof
Copy link
Member

ericof commented Nov 25, 2023

Hello @liortct, it would be awesome to have support for dependent questions, but I do agree with @kurtmckee about discussing the proper format to implement that.
Right now, I suggest we move back to #1761 and discuss it there.

@liortct liortct mentioned this pull request Nov 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This issue/PR relates to a feature request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants