Skip to content

feat(ui-dashboard): migrate value-formatter option panels (0.2.3)#304

Open
frozenluo wants to merge 1 commit into
mainfrom
dev/frozenluo/charts-value-trio
Open

feat(ui-dashboard): migrate value-formatter option panels (0.2.3)#304
frozenluo wants to merge 1 commit into
mainfrom
dev/frozenluo/charts-value-trio

Conversation

@frozenluo

Copy link
Copy Markdown
Contributor

What

Phase 3b (continued) of the dashboard UI extraction. Migrates the value-formatter option-panel trio from the sentio app into @sentio/ui-dashboard:

  • ValueOptions — formatter (Number/Date/String) + style/precision/currency + prefix/suffix
  • ValueControlsDisclosurePanel wrapper with show-value-label / tooltip-total toggles
  • ValueStringMapping — value→text mapping rules editor

How

  • proto ChartConfig_Value*JsonValueConfigLike / ValueStyleLike / ValueFormatterLike / MappingRuleLike (already present in types/chart.ts).
  • ui-core supplies ComboInput / DisclosurePanel / Checkbox / Button / classNames.
  • The commented-out ColorSelect mapping branch is kept commented; its ThemeType / query-value-theme dependency is dropped. This keeps the panels free of the worker-coupled color-theme module (query-value-theme is pulled into the chart web-worker bundle in app and stays app-local).
  • strict-mode: typed implicit-any callback params; defaultProps → default parameters; dynamic-key writes cast to Record<string, any>.
  • Adds a Value story to OptionPanels.stories.

Verification

  • pnpm build (esm/cjs/dts) clean.
  • tsc --noEmit: 0 errors under src/ (only the known unrelated @mswjs/interceptors lib-dts error remains).
  • 0 private references (gen/service / sentio/app / @sentio/api-es / 'lib/).
  • Version 0.2.2 → 0.2.3.

🤖 Generated with Claude Code

Migrate ValueOptions / ValueControls / ValueStringMapping from sentio app
into ui-dashboard charts/options. proto ChartConfig_Value*Json types map to
ValueConfigLike / ValueStyleLike / ValueFormatterLike / MappingRuleLike;
ui-core supplies ComboInput / DisclosurePanel / Checkbox / Button / classNames.

The dead ColorSelect mapping branch (commented out in app) is kept commented;
its ThemeType/query-value-theme dependency is dropped, so the panels no longer
pull in the worker-coupled color theme module.

Adds a Value story to OptionPanels.stories.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

1 participant