kiln / flourish-sdk

The SDK for developing Flourish templates
Other
80 stars 16 forks source link

Conditional settings seems not to work #85

Closed ilariaventurini closed 1 year ago

ilariaventurini commented 1 year ago

Hello, I'm creating a Flourish template using Flourish SDK and I tried to use conditional settings in this way:

  - property: show_test_label
    name: Show test label
    type: boolean

  - property: test_label
    name: Test label
    type: string
    show_if:
      show_test_label: true

The problem is that the input string test_label is always visible, whether show_test_label is true or false.

Nov-07-2022 08-39-23

I tried also hide_if but the result is the same. Is that a bug or am I missing something?

Thanks

daanlouter commented 1 year ago

Hi @ilariaventurini, it looks like there is a bug with conditional settings that are not part of a settings block. If you move these settings into a settings block (ie. by adding - Test label settings before the first setting in the template.yml), it will probably work.

ilariaventurini commented 1 year ago

Thanks!

daanlouter commented 1 year ago

Hi @ilariaventurini - this fix has been made and will be rolled out to the sdk soon. Thanks again for reporting.