docs: document depends_on conditional visibility for settings - #311
Conversation
The web console now supports a depends_on: { setting, values } key
inside a setting's help_text schema so it only renders (and is
submitted) while another setting's current value is one of the
listed values. Purely a frontend-parsed convention, same as type/
options/advanced — no Rust changes needed since help_text stays an
opaque string to the CLI.
6beb0b8 to
909008b
Compare
sergey-borovkov
left a comment
There was a problem hiding this comment.
Docs read well and the example is clear. One gap I'd like closed before merging.
depends_on on a required field is undefined
docs/EdgeApps.md:486
The bullet says a hidden field's value "isn't collected or written on save", and the example correctly uses optional: true — but nothing states whether optional: false combined with depends_on is a supported combination.
A reader who marks a conditional field required gets an install form that may fail validation on a field they cannot see, with no way to work out why from these docs. One sentence either saying conditional fields should be optional: true, or describing how required-ness is skipped while the field is hidden, closes it.
Note for merge ordering: this PR and #308 both add a bullet to the same list at docs/EdgeApps.md:486 and a section at the same anchor, so expect a textual conflict on whichever lands second. No semantic conflict — #308's help_text_with_display_order only inserts into an existing schema's properties, so it preserves depends_on.
sergey-borovkov
left a comment
There was a problem hiding this comment.
The added sentence covers it — thanks. Approving.
Heads up that this will still conflict textually with #308 at docs/EdgeApps.md:486 (same list, same anchor); whichever lands second needs a trivial rebase. No semantic conflict.
Summary
properties.depends_onkey in a setting'shelp_textschema, which the web console (Screenly/Screenly#2554) now supports for conditional visibility: a setting only renders (and is submitted) while another named setting's current value is one of a listed set of values.help_textstays an opaque string to the CLI, exactly liketype/options/advancedalready are.