Conversation
WalkthroughThis pull request updates the settings logic and styling across multiple designer components. The dropdown settings now use a revised method and updated labels. The number field components are refactored to adopt a more robust styling and property-handling approach, including new dimension-based style utilities, default value adjustments, and a removal of custom change event handling. Additionally, the number field settings now include high precision options with conditional inputs and updated validation keys. Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant DS as Dropdown Settings Form
participant NS as NumberField Settings Form
participant NC as NumberField Control
U->>DS: Interact with dropdown component
DS->>DS: Generate settings using updated getSettings (new labels & input type)
U->>NS: Toggle highPrecision switch
alt High Precision Enabled
NS->>NS: Display numeric input row (stepNumeric)
else Disabled
NS->>NS: Display text input row (stepString)
end
NS->>NC: Update number field configuration with new settings
sequenceDiagram
participant U as User Input
participant NC as NumberField Control
participant OE as External onChange Handler
U->>NC: Enter or clear a number value
NC->>OE: Directly propagate the onChange event with the new value
Possibly related PRs
Suggested reviewers
Poem
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (3)
shesha-reactjs/src/designer-components/numberField/settingsForm.ts (3)
164-185: Fix inconsistent parent ID assignmentThe
parentIdin the input field (line 178) doesn't match the parent container's ID.- parentId: 'jNmEKg7HtYXwaL9CylTOX', + parentId: 's4gmBg31azZC0UjZjpfTm',
164-185: Avoid duplicate ID valuesBoth settings input rows use the same ID (
type-default-value-s4gmBg31azZC0UjZjpfTm), which could lead to conflicts. Consider using unique identifiers.- id: 'type-default-value-s4gmBg31azZC0UjZjpfTm', + id: 'stepNumeric-input-row',And for the second row:
- id: 'type-default-value-s4gmBg31azZC0UjZjpfTm', + id: 'stepString-input-row',Also applies to: 187-208
187-208: Fix inconsistent parent ID in stepString inputThe
parentIdin the input field (line 201) doesn't match the parent container's ID.- parentId: 'jNmEKg7HtYXwaL9CylTOX', + parentId: 's4gmBg31azZC0UjZjpfTm',
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
shesha-reactjs/src/designer-components/numberField/settingsForm.ts(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: build-and-test
🔇 Additional comments (3)
shesha-reactjs/src/designer-components/numberField/settingsForm.ts (3)
154-162: Good addition of high precision modeAdding a high precision toggle with clear tooltip is a good enhancement. This allows users to explicitly choose whether they need high precision decimal support.
219-229: Good addition of required field validationAdding the required validation switch to number fields is a good enhancement that aligns with form validation best practices.
237-239: Improved validation property namingChanging from
minLength/maxLengthtominValue/maxValueis semantically more accurate for number fields.Also applies to: 245-247
refactor number input
Summary by CodeRabbit
New Features
Refactor
Style