-
Notifications
You must be signed in to change notification settings - Fork 123
Standardise on 'Component' terminology instead of 'Widget' when referring to form compontents #3694
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Standardise on 'Component' terminology instead of 'Widget' when referring to form compontents #3694
Conversation
WalkthroughRenamed UI labels from “Widgets” to “Components” in the form designer toolbox and sidebar. Adjusted settings styling by removing a button color override and changing a switch color token to grey. Added a new migrator step for Text component to default missing content to "Text...". No API changes. Changes
Sequence Diagram(s)sequenceDiagram
participant Config as Existing Text Config
participant Migrator as Text Migrator
participant Steps as Steps 0..6
participant Output as Migrated Config
Config->>Migrator: Provide prev config
Migrator->>Steps: Apply steps sequentially (0..5)
Steps-->>Migrator: Intermediate config
Migrator->>Steps: Step 6 sets content = prev.content ?? "Text..."
Steps-->>Migrator: Final config
Migrator-->>Output: Return migrated config
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related issues
Possibly related PRs
Suggested reviewers
Poem
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
shesha-reactjs/src/designer-components/text/index.tsx (1)
90-90: Migration step for default text content is correct and non-destructiveUsing nullish coalescing ensures existing non-empty content isn’t overridden. Good safeguard for older configs.
For parity with new instances (not just migrated ones), consider defaulting content in initModel so brand-new Text components also start with “Text...”. Example:
initModel: (model) => ({ code: false, copyable: false, delete: false, ellipsis: false, mark: false, italic: false, underline: false, level: 1, textType: 'span', content: model?.content ?? 'Text...', ...model, }),If you’d like, I can add a quick unit test that verifies step 6 sets a default when content is null/undefined and preserves non-empty strings.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
shesha-reactjs/src/components/formDesigner/designerMainArea/index.tsx(1 hunks)shesha-reactjs/src/components/formDesigner/toolbox.tsx(1 hunks)shesha-reactjs/src/designer-components/_settings/settingsControl.tsx(0 hunks)shesha-reactjs/src/designer-components/_settings/styles/styles.ts(1 hunks)shesha-reactjs/src/designer-components/text/index.tsx(1 hunks)
💤 Files with no reviewable changes (1)
- shesha-reactjs/src/designer-components/_settings/settingsControl.tsx
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-06-12T16:55:57.638Z
Learnt from: teboho
PR: shesha-io/shesha-framework#3397
File: shesha-reactjs/src/designer-components/charts/bar.tsx:49-52
Timestamp: 2025-06-12T16:55:57.638Z
Learning: For the chart components’ migrators (e.g., BarChartComponent in shesha-reactjs/src/designer-components/charts/bar.tsx), the version 5 step intentionally spreads `{ ...prev, ...defaultConfigFiller }` so that values from `defaultConfigFiller` override any existing properties in `prev`. This reset to new defaults is by design and should not be flagged as an issue.
Applied to files:
shesha-reactjs/src/components/formDesigner/designerMainArea/index.tsxshesha-reactjs/src/designer-components/text/index.tsx
📚 Learning: 2025-06-10T11:52:51.462Z
Learnt from: teboho
PR: shesha-io/shesha-framework#3374
File: shesha-reactjs/src/generic-pages/settings/dynamic-theme/textsExample.tsx:13-15
Timestamp: 2025-06-10T11:52:51.462Z
Learning: In the Shesha framework's dynamic theme system, the "Global text" Typography element in textsExample.tsx is intentionally left without explicit styling to demonstrate automatic global text color application through the ConfigProvider's colorText token, while the "Default text" element uses explicit theme color styling to show the difference between global and default text color approaches.
Applied to files:
shesha-reactjs/src/designer-components/_settings/styles/styles.ts
🔇 Additional comments (3)
shesha-reactjs/src/designer-components/_settings/styles/styles.ts (1)
62-62: Outdated review – target file not foundThe path
shesha-reactjs/src/designer-components/_settings/styles/styles.tsdoesn’t exist in the current codebase, so this suggestion to replace a hard-codedgreywon’t apply. Please disregard this comment or reopen against the correct file if it has been renamed or moved.Likely an incorrect or invalid review comment.
shesha-reactjs/src/components/formDesigner/toolbox.tsx (1)
20-20: Terminology alignment confirmed
Label changed to “Components” matches the PR objective and sidebar updates.
A repo-wide search returned no remaining “Widget/Widgets” references—rename is fully standardized.shesha-reactjs/src/components/formDesigner/designerMainArea/index.tsx (1)
33-33: Renamed sidebar title/placeholder to “Builder Components” — OKConsistent with toolbox tab rename and PR goal.
Summary by CodeRabbit
New Features
Style