Skip to content

Order and conditionally show settings in the install form - #11

Merged
514sid merged 1 commit into
mainfrom
feat/setting-order-and-visibility
Sep 3, 2026
Merged

Order and conditionally show settings in the install form#11
514sid merged 1 commit into
mainfrom
feat/setting-order-and-visibility

Conversation

@514sid

@514sid 514sid commented Sep 3, 2026

Copy link
Copy Markdown
Member

Summary

Adopts two optional keys in the manifest's help_text schema so the install form matches what each widget actually uses:

  • display_order sets 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:

Setting Shown for
symbol Advanced Chart, Symbol Overview
interval, chart_style, allow_symbol_change, hide_top_toolbar, hide_side_toolbar, hide_legend Advanced Chart
heatmap_dataset, heatmap_grouping Stock Heatmap

widget_type, theme, locale, and display_errors stay unconditional. Every setting gets a display_order, contiguous 1..n within its bucket.

Resulting form per widget:

advanced_chart   basic: Widget Type, Symbol, Color Theme, Locale
                 advanced: Chart Interval, Chart Style, Hide Top Toolbar,
                           Hide Side Toolbar, Hide Legend, Allow Symbol Change,
                           Display Errors
symbol_overview  basic: Widget Type, Symbol, Color Theme, Locale
                 advanced: Display Errors
stock_heatmap    basic: Widget Type, Heatmap Dataset, Color Theme, Locale
                 advanced: Heatmap Grouping, Display Errors
crypto_heatmap   basic: Widget Type, Color Theme, Locale
                 advanced: Display Errors

Two smaller consequences:

  • symbol and locale moved from plain-string help_text to the schema object form, the only place these keys can live.
  • Dropped the "(Stock Heatmap)" title suffixes and the "the Advanced Chart widget" phrasing in help text, now that a field only appears for the widget it applies to.

screenly_qc.yml is regenerated from screenly.yml, so the two still differ only by id.

Notes

No src/ changes. Every setting is optional with a default_value, so getSettingWithDefault already handles a setting that isn't written because its field was hidden.

Unrecognized keys under help_text.properties are ignored, so on a console build without support for them the form falls back to today's behaviour rather than breaking.

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
514sid requested a review from salmanfarisvp September 3, 2026 08:49
@514sid
514sid marked this pull request as ready for review September 3, 2026 08:49
@514sid
514sid merged commit ca0758a into main Sep 3, 2026
1 check passed
@514sid
514sid deleted the feat/setting-order-and-visibility branch September 3, 2026 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants