FE: categorical distribution config dialog and expanded view - #1737
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
❌ Fast Track: checks did not passFailed guardrails: frontend/complexity (Guardrail threw: Cannot find module 'eslint'
Reflects |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 20d7d76c15
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| let categoricalConfigs = $state<Record<string, DistributionConfig>>({}); | ||
| const categoricalConfig = $derived<DistributionConfig>( | ||
| activeGroup | ||
| ? (categoricalConfigs[activeGroup.id] ?? { | ||
| ...defaultCategoricalConfig, |
There was a problem hiding this comment.
Extract categorical config out of the panel
This patch adds categorical configuration state directly to DatasetDistributionPanel, which is now 498 lines and mixes source selection, categorical config, header actions, dialogs, and chart rendering. The frontend guidelines ask us to split logical, testable parts, so please move this categorical config/defaulting into a small helper or child component instead of growing the top-level panel further.
AGENTS.md reference: AGENTS.md:L39-L41
Useful? React with 👍 / 👎.
| categoryNoun?: string; | ||
| categoryNounPlural?: string; | ||
| sortLabels?: Record<DistributionSortOption, string>; | ||
| showCountMode?: boolean; | ||
| /** Keeps categorical metadata horizontal while reusing the expanded chart. */ | ||
| fixedOrientation?: DistributionOrientation; |
There was a problem hiding this comment.
Keep expanded dialog under the size guideline
Adding the categorical wording/config props here pushes ExpandDialog to 116 lines and makes it handle both generic expansion and categorical-specific presentation. The frontend guideline asks components to stay small and split logical parts, so please extract the categorical-specific props/wiring into a wrapper or helper to keep this dialog focused.
AGENTS.md reference: AGENTS.md:L39-L41
Useful? React with 👍 / 👎.
DatasetDistributionPanel gains per-group config dialogs and an expand button for categorical bar charts; ExpandDialog mirrors the panel config; layout wires the new handlers. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
20d7d76 to
58efaf1
Compare
4ea245b to
0d8fd50
Compare
Summary
Stacked on p11.
Wires the config helpers from p11 into the panel and adds an expanded view for categorical bar charts:
DatasetDistributionPanel: each categorical group now has a gear icon that opens aDistributionConfigDialog(top-N, sort order, manual value selection); the configured top-N is applied viaselectVisibleCountsExpandDialog: renders the full categorical bar chart at a larger size; mirrors the orientation and config from the panel statePanelHeader: renders the optional expand and config action buttons passed from the panel+layout.svelte: passes the new config and expand handlers down toDatasetDistributionPanelTest plan
make static-checks(frontend) passesnpm run test:unitpasses (new/updated tests inDatasetDistributionPanel,ExpandDialog,PanelHeader)Part of LIG-9585.