Order and conditionally show settings in the install form - #11
Merged
Conversation
Declare display_order on every setting and depends_on: widget_type on the eight widget-specific ones, so the install form renders in a fixed sequence and only shows the settings the selected widget actually uses.
514sid
marked this pull request as ready for review
September 3, 2026 08:49
salmanfarisvp
approved these changes
Sep 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adopts two optional keys in the manifest's
help_textschema so the install form matches what each widget actually uses:display_ordersets the sequence fields render in, ascending within the basic and advanced sections separately.depends_on: {setting, values}hides a field unless a named setting currently holds one of the listed values.Until now the form showed all thirteen settings for every widget, in whatever order they came back, with the applicable widget spelled out in each title and help text. Picking Crypto Heatmap still meant scrolling past a chart interval, a chart style, three toolbar toggles and a stock dataset picker, none of which do anything.
What changed
Eight widget-specific settings now declare
depends_on: widget_type:symbolinterval,chart_style,allow_symbol_change,hide_top_toolbar,hide_side_toolbar,hide_legendheatmap_dataset,heatmap_groupingwidget_type,theme,locale, anddisplay_errorsstay unconditional. Every setting gets adisplay_order, contiguous 1..n within its bucket.Resulting form per widget:
Two smaller consequences:
symbolandlocalemoved from plain-stringhelp_textto the schema object form, the only place these keys can live.screenly_qc.ymlis regenerated fromscreenly.yml, so the two still differ only byid.Notes
No
src/changes. Every setting is optional with adefault_value, sogetSettingWithDefaultalready handles a setting that isn't written because its field was hidden.Unrecognized keys under
help_text.propertiesare ignored, so on a console build without support for them the form falls back to today's behaviour rather than breaking.