Skip to content

Thulasizwe/bug/3557#4673

Merged
James-Baloyi merged 9 commits intoshesha-io:mainfrom
czwe-01:thulasizwe/bug/3557
Mar 23, 2026
Merged

Thulasizwe/bug/3557#4673
James-Baloyi merged 9 commits intoshesha-io:mainfrom
czwe-01:thulasizwe/bug/3557

Conversation

@czwe-01
Copy link
Collaborator

@czwe-01 czwe-01 commented Mar 20, 2026

#3557

Summary by CodeRabbit

  • New Features

    • Added an opt-in control for automatic label alignment on configurable form items.
  • Bug Fixes

    • Improved label alignment and spacing consistency across many designer components.
    • Fixed sizing behavior for date pickers and related form fields.
    • Removed conflicting margin overrides to restore predictable layout.
  • Style

    • Adjusted default form designer spacing and improved editor work-area scrolling/visibility.
    • Minor table box-sizing tweak for more consistent rendering.

czwe-01 added 4 commits March 20, 2026 15:18
- Removed unnecessary margin from form items in GlobalSheshaStyles.
- Adjusted min-width in ReactTable styles for better alignment.
- Added tabCardHeight variable and overflow styles in configuration-studio.
- Updated width calculation in GlobalTableStyles to account for margins.
- Simplified finalStyles in DatePickerWrapper by removing fixed dimensions.
- Introduced preserveDimensionsInDesigner property in LinkComponent for better design consistency.
- Cleaned up margin styles in styleLabel to enhance layout.
- Added autoAlignLabel prop to IConfigurableFormItemProps interface for better label alignment control.
- Integrated useStyles hook in ConfigurableFormItemLive to apply conditional styles based on autoAlignLabel.
- Updated multiple instances of ConfigurableFormItem to utilize the new autoAlignLabel prop for consistent behavior across components.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 20, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: e867df36-adbd-4d1a-b904-87c9f2b9948f

📥 Commits

Reviewing files that changed from the base of the PR and between 5dfb460 and 2a024a3.

📒 Files selected for processing (1)
  • shesha-reactjs/src/configuration-studio/styles.ts

Walkthrough

Added optional autoAlignLabel prop (default true) to configurable form items, passed it into useStyles to produce a new formItem class (conditional label height, full-width, zero bottom margin, hover border-color), and disabled auto-alignment in several designer components; adjusted spacing and related styles.

Changes

Cohort / File(s) Summary
Core Label Alignment System
shesha-reactjs/src/components/formDesigner/components/model.ts, shesha-reactjs/src/components/formDesigner/components/styles.ts, shesha-reactjs/src/components/formDesigner/components/configurableFormItemLive.tsx, shesha-reactjs/src/components/formDesigner/components/configurableFormItemSetting.tsx
Added optional autoAlignLabel?: boolean; updated useStyles signature to accept { autoAlignLabel } and return formItem class; integrated formItem into Form.Item className usage.
Designer Components with Disabled Auto-Align
shesha-reactjs/src/designer-components/.../attachmentsEditor/attachmentsEditor.tsx, .../checkboxGroup/checkboxGroup.tsx, .../radio/radio.tsx, .../richTextEditor/index.tsx, .../textArea/textArea.tsx
Passed autoAlignLabel={false} into ConfigurableFormItem for these components to disable automatic label height alignment in designer renderers.
Form Designer Spacing & Constants
shesha-reactjs/src/components/formDesigner/utils/designerConstants.ts
Reduced horizontal spacing: DEFAULT_FORM_ITEM_MARGINS.left/right and DEFAULT_MARGINS.horizontal changed from '3px''0px'.
Global Styling Cleanup
shesha-reactjs/src/components/mainLayout/styles/indexStyles.ts, shesha-reactjs/src/designer-components/styleLabel/styles.ts
Removed global overrides that forced form-item label height: auto !important and a global form-item margin: 0px !important, allowing component-level formItem styles to apply.
Layout & Sizing Adjustments
shesha-reactjs/src/designer-components/dateField/datePickerWrapper.tsx, shesha-reactjs/src/configuration-studio/styles.ts, shesha-reactjs/src/components/reactTable/styles/styles.ts, shesha-reactjs/src/components/richTextEditor/styles/styles.ts
Stopped forcing width/height in DatePickerWrapper; changed configuration-studio tabs/content to flex with improved overflow; added box-sizing: border-box to table styles; minor formatting in rich text styles.
Component Definition & Utility Updates
shesha-reactjs/src/designer-components/link/index.tsx, shesha-reactjs/src/designer-components/checkboxGroup/multiCheckbox.tsx
Added preserveDimensionsInDesigner: true to LinkComponent; applied DEFAULT_MARGINS to MultiCheckbox root element.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐇 I nudged a label, soft and bright,
I trimmed the gaps and set the height,
Hover glows and borders sing,
Designer fields now spring to spring,
Hopping off to style the night.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title 'Thulasizwe/bug/3557' appears to be a branch name rather than a descriptive pull request title, providing no meaningful information about the actual changes. Replace the branch name with a clear, descriptive title that summarizes the main change, such as 'Fix form item label alignment and spacing' or similar.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@czwe-01 czwe-01 requested a review from James-Baloyi March 20, 2026 15:00
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
shesha-reactjs/src/components/formDesigner/components/configurableFormItemLive.tsx (1)

21-30: ⚠️ Potential issue | 🟠 Major

autoAlignLabel is introduced here but not propagated through settings wrapper.

ConfigurableFormItemSetting (shesha-reactjs/src/components/formDesigner/components/configurableFormItemSetting.tsx:11-59) currently ignores autoAlignLabel and does not pass it to ConfigurableFormItemLive, so designer-side consumers can set autoAlignLabel={false} without effect in that path.

Proposed follow-up patch (outside this file)
- export const ConfigurableFormItemSetting: FC<IConfigurableFormItemProps> = ({
-   children,
-   model,
-   valuePropName,
- }) => {
+ export const ConfigurableFormItemSetting: FC<IConfigurableFormItemProps> = ({
+   children,
+   model,
+   valuePropName,
+   autoAlignLabel = true,
+ }) => {
   ...
   return (
     <ConfigurableFormItemLive
       model={{
         propertyName: model.propertyName,
         label: model.label,
         type: '',
         id: '',
         description: model.description,
         validate: { required: model.validate?.required },
         hidden: model.hidden,
       }}
+      autoAlignLabel={autoAlignLabel}
       className={classNames(styles.settingsFormItem, "sha-js-label")}
       labelCol={{ span: 24 }}
       wrapperCol={{ span: 24 }}
     >

Also applies to: 61-61

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@shesha-reactjs/src/components/formDesigner/components/configurableFormItemLive.tsx`
around lines 21 - 30, ConfigurableFormItemSetting does not forward the
autoAlignLabel prop to ConfigurableFormItemLive, so changes to autoAlignLabel in
the designer have no effect; update the settings wrapper
(ConfigurableFormItemSetting) to accept/retain autoAlignLabel and pass it
through to ConfigurableFormItemLive (prop name autoAlignLabel) wherever the live
component is rendered, ensuring any existing prop defaulting logic remains
consistent with the autoAlignLabel usage in ConfigurableFormItemLive and
useStyles.
shesha-reactjs/src/designer-components/radio/radio.tsx (1)

35-43: ⚠️ Potential issue | 🟡 Minor

Replace any in onChangeInternal with unknown and add a proper type guard.

Line 40 uses e: any, which bypasses type safety. Replace with unknown type and implement explicit type checking as required by the TypeScript guidelines for this project.

const onChangeInternal = (e: unknown): void => {
  if (typeof e === 'object' && e !== null && 'target' in e) {
    const target = e as { target: { value: unknown } };
    customEvents.onChange({ ...e, currentTarget: { value: target.target.value } });
  }
  if (typeof onChange === 'function') onChange(e);
};
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@shesha-reactjs/src/designer-components/radio/radio.tsx` around lines 35 - 43,
The onChangeInternal handler currently types its event parameter as any; change
its signature to (e: unknown) and add a runtime type guard that ensures e is a
non-null object with a target containing value before accessing e.target.value,
then call customEvents.onChange with the spread of e and currentTarget: { value:
target.value } (use a narrowed/typed local like target = e as { target: { value:
unknown } }); keep the existing fallback call to onChange if it's a function;
update references in Factory/ConfigurableFormItem and preserve use of
calculatedModel.eventHandlers and customEvents.onChange.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@shesha-reactjs/src/components/formDesigner/components/styles.ts`:
- Around line 25-34: The CSS template for the formItem block contains an extra
closing brace that produces malformed CSS; locate the template literal that
defines the formItem styles (the block including .ant-form-item-additional) and
remove the stray closing '}' so the braces correctly match and the template
literal ends only once (ensure the transform/z-index rules remain inside the
same block and the final closing backtick/parenthesis stays intact).
- Around line 12-31: The rule taking .ant-form-item-additional out of flow
causes overlap; update the styles so .ant-form-item-additional is not absolutely
positioned: remove position: absolute, bottom/left/right, transform and z-index
from .ant-form-item-additional and let it be positioned statically (or relative)
in the normal flow, and instead control spacing by restoring a nonzero
--ant-form-item-margin-bottom or adding a margin-top on
.ant-form-item-additional so validation/help text pushes following items down;
ensure related selectors (.ant-form-item-row and the autoAlignLabel label rule)
still work with the new flow layout.

In `@shesha-reactjs/src/components/reactTable/styles/styles.ts`:
- Line 239: Replace the magic number in the CSS rule "min-width: calc(100% -
2px);" by either adding a clarifying comment explaining what the 2px compensates
for (e.g., border-width or scrollbar offset) or extracting it into a named
constant (e.g., BORDER_ADJUST or reuse DEFAULT_MARGINS) and use that constant in
the calc expression; update the declaration that contains "min-width: calc(100%
- 2px);" in styles.ts and, if you extract a constant, define and export it
alongside other style constants so related width adjustments remain consistent.

In `@shesha-reactjs/src/components/richTextEditor/styles/styles.ts`:
- Around line 23-25: The toolbar's z-index (selector .jodit-toolbar__box) is too
low and gets obscured by other UI layers; update the CSS for .jodit-toolbar__box
to use a much higher stacking context (e.g., z-index: 3000 or another value
above your highest overlay) and ensure it has a positioned ancestor if needed so
the toolbar reliably appears above designer overlays.

In `@shesha-reactjs/src/configuration-studio/styles.ts`:
- Around line 103-107: Align the indentation of the .${csDocEditor} CSS block
with its sibling selectors (e.g., .${csWorkArea}) to match the project's style;
locate the .${csDocEditor} selector in styles.ts and remove the extra leading
spaces so its opening line and inner properties use the same indentation level
as .${csWorkArea} and .${csTreeArea}.

In `@shesha-reactjs/src/designer-components/checkboxGroup/multiCheckbox.tsx`:
- Line 75: The hardcoded "marginTop: '5px'" in the style object for the
MultiCheckbox component overrides any user-configured marginTop in model.style;
remove this hardcoded property (or move it before the spread of ...model.style)
inside the style definition used by MultiCheckbox so that model.style.marginTop
can take precedence and user-configured styles are respected.

In `@shesha-reactjs/src/designer-components/dateField/datePickerWrapper.tsx`:
- Line 42: The wrapper lost its 100% fill defaults causing sizing regressions;
in datePickerWrapper (finalStyles / additionalStyles) restore defaults so inner
picker fills the FormItem wrapper by setting width:'100%' and height:'100%' as
fallback, but still allow explicit sizes from additionalStyles to override them
(e.g. create finalStyles as { width: '100%', height: '100%', ...additionalStyles
}).

---

Outside diff comments:
In
`@shesha-reactjs/src/components/formDesigner/components/configurableFormItemLive.tsx`:
- Around line 21-30: ConfigurableFormItemSetting does not forward the
autoAlignLabel prop to ConfigurableFormItemLive, so changes to autoAlignLabel in
the designer have no effect; update the settings wrapper
(ConfigurableFormItemSetting) to accept/retain autoAlignLabel and pass it
through to ConfigurableFormItemLive (prop name autoAlignLabel) wherever the live
component is rendered, ensuring any existing prop defaulting logic remains
consistent with the autoAlignLabel usage in ConfigurableFormItemLive and
useStyles.

In `@shesha-reactjs/src/designer-components/radio/radio.tsx`:
- Around line 35-43: The onChangeInternal handler currently types its event
parameter as any; change its signature to (e: unknown) and add a runtime type
guard that ensures e is a non-null object with a target containing value before
accessing e.target.value, then call customEvents.onChange with the spread of e
and currentTarget: { value: target.value } (use a narrowed/typed local like
target = e as { target: { value: unknown } }); keep the existing fallback call
to onChange if it's a function; update references in
Factory/ConfigurableFormItem and preserve use of calculatedModel.eventHandlers
and customEvents.onChange.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 80322f42-a310-47d2-9b6e-1c1f737e86bd

📥 Commits

Reviewing files that changed from the base of the PR and between 94e2478 and 50e69eb.

📒 Files selected for processing (17)
  • shesha-reactjs/src/components/formDesigner/components/configurableFormItemLive.tsx
  • shesha-reactjs/src/components/formDesigner/components/model.ts
  • shesha-reactjs/src/components/formDesigner/components/styles.ts
  • shesha-reactjs/src/components/mainLayout/styles/indexStyles.ts
  • shesha-reactjs/src/components/reactTable/styles/styles.ts
  • shesha-reactjs/src/components/richTextEditor/styles/styles.ts
  • shesha-reactjs/src/configuration-studio/styles.ts
  • shesha-reactjs/src/designer-components/attachmentsEditor/attachmentsEditor.tsx
  • shesha-reactjs/src/designer-components/checkboxGroup/checkboxGroup.tsx
  • shesha-reactjs/src/designer-components/checkboxGroup/multiCheckbox.tsx
  • shesha-reactjs/src/designer-components/dataTable/table/styles/styles.ts
  • shesha-reactjs/src/designer-components/dateField/datePickerWrapper.tsx
  • shesha-reactjs/src/designer-components/link/index.tsx
  • shesha-reactjs/src/designer-components/radio/radio.tsx
  • shesha-reactjs/src/designer-components/richTextEditor/index.tsx
  • shesha-reactjs/src/designer-components/styleLabel/styles.ts
  • shesha-reactjs/src/designer-components/textArea/textArea.tsx
💤 Files with no reviewable changes (1)
  • shesha-reactjs/src/components/mainLayout/styles/indexStyles.ts

- Enhanced form item styles in formDesigner for better alignment and responsiveness.
- Adjusted default margins in designerConstants for a cleaner layout.
- Updated ReactTable styles to ensure full width and proper box-sizing.
- Removed unnecessary margin from MultiCheckbox component for improved spacing.
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@shesha-reactjs/src/components/formDesigner/components/styles.ts`:
- Around line 17-49: styles.formItem currently targets descendants like
".ant-form-item" and ":hover" which won't match the Form.Item root; replace
those descendant selectors with root-aware "&" selectors. Concretely, change
".ant-form-item { ... }" to "& { ... }", change nested ".ant-form-item-row" to
"& .ant-form-item-row" (or keep it nested inside the "&" block), and change
":hover { border-color: ${token.colorPrimary} !important; }" to "&:hover {
border-color: ${token.colorPrimary} !important; }"; ensure child label selector
uses "& > .ant-form-item-label" (or place it inside the "& .ant-form-item-row"
block) so all rules in styles.formItem apply to the Form.Item root as intended.

In `@shesha-reactjs/src/components/formDesigner/utils/designerConstants.ts`:
- Around line 36-41: You changed DEFAULT_FORM_ITEM_MARGINS.left/right and
DEFAULT_MARGINS.horizontal to '0px' which removes horizontal spacing used across
components; inspect and validate visual impact by reviewing uses of
DEFAULT_FORM_ITEM_MARGINS, DEFAULT_MARGINS (and DEFAULT_MARGIN_VALUES in
stylingUtils.ts), RadioGroup (radioGroup.tsx) where Space margins control radio
spacing, DataTable width calc(100% - (2 * horizontal)) in
dataTable/table/styles/styles.ts, and ConfigurableFormItemLive defaults; either
restore the original '3px' horizontal defaults or make the horizontal margin
configurable/overrideable and update the affected calculations/UI (RadioGroup
spacing, DataTable width formula, any dimension logic in StylingUtils and
ConfigurableFormItemLive) to preserve intended layout and run visual/CI snapshot
tests to confirm no regressions.
- Around line 49-52: DEFAULT_MARGINS.horizontal was changed to '0px' which
removes horizontal spacing used throughout the app; restore it to '3px' or
confirm and adjust all dependent calculations: revert DEFAULT_MARGINS.horizontal
back to '3px' in designerConstants (symbol DEFAULT_MARGINS) or, if you intend
zero horizontal margin, update radioGroup.tsx (Space margin usage),
dataTable/table/styles.ts (width calc using 2 * DEFAULT_MARGINS.horizontal), and
stylingUtils (DEFAULT_MARGIN_VALUES and any width/minWidth/maxWidth/height
calculations) so their spacing and size math account for the new value and
preserve intended layout across components.

In `@shesha-reactjs/src/configuration-studio/styles.ts`:
- Line 23: The tabCardHeight constant and its use in csDocEditor height
calculation are causing layout bugs; remove the magic subtraction using
tabCardHeight (or if you must keep a token, set it to Ant Design's cardHeightSM
= 32) and instead make the tabs content use a flex-based layout so the editor
fills available space: update the parent/container that wraps csDocEditor (the
element targeting .ant-tabs-content or the component rendering csDocEditor) to
display: flex (or use a flex class) and set csDocEditor to flex: 1 / height:
auto so it grows to fill the container rather than using calc(100vh -
headerHeight - tabCardHeight). Ensure references to headerHeight remain only for
elements above the tabs, not to size the inner editor.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 75b51f12-46fb-4dd0-bdb9-3ab6360ebef0

📥 Commits

Reviewing files that changed from the base of the PR and between 50e69eb and f41849b.

📒 Files selected for processing (5)
  • shesha-reactjs/src/components/formDesigner/components/styles.ts
  • shesha-reactjs/src/components/formDesigner/utils/designerConstants.ts
  • shesha-reactjs/src/components/reactTable/styles/styles.ts
  • shesha-reactjs/src/components/richTextEditor/styles/styles.ts
  • shesha-reactjs/src/configuration-studio/styles.ts

czwe-01 added 2 commits March 23, 2026 10:36
- Integrated labelAlign property into useStyles for ConfigurableFormItemLive to improve label alignment.
- Updated ConfigurableFormItemSetting to accept autoAlignLabel prop for consistent styling.
- Adjusted styles in useStyles to ensure full width and proper alignment of form items.
- Added default margins to MultiCheckbox for improved spacing in the designer components.
- Refined GlobalTableStyles to ensure proper width calculation without unnecessary margins.
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
shesha-reactjs/src/components/formDesigner/components/configurableFormItemLive.tsx (1)

32-35: ⚠️ Potential issue | 🟡 Minor

Missing dependencies in useMemo could cause stale layout values.

The memo depends only on [formItemlabelCol, formItemWrapperCol], but the body also reads labelCol and wrapperCol from props. If a parent passes different labelCol/wrapperCol values on a subsequent render, the memo won't recompute and will return stale fallback values.

🛠️ Proposed fix
   const layout = useMemo(() => {
     // Make sure the `wrapperCol` and `labelCol` from `FormItemProver` override the ones from the main form
     return { labelCol: formItemlabelCol || labelCol, wrapperCol: formItemWrapperCol || wrapperCol };
-  }, [formItemlabelCol, formItemWrapperCol]);
+  }, [formItemlabelCol, formItemWrapperCol, labelCol, wrapperCol]);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@shesha-reactjs/src/components/formDesigner/components/configurableFormItemLive.tsx`
around lines 32 - 35, The useMemo creating layout can return stale values
because it omits labelCol and wrapperCol from its dependency array; update the
memo for layout (the useMemo that returns { labelCol: formItemlabelCol ||
labelCol, wrapperCol: formItemWrapperCol || wrapperCol }) to include labelCol
and wrapperCol alongside formItemlabelCol and formItemWrapperCol so the memo
recomputes when any of those four inputs change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@shesha-reactjs/src/components/formDesigner/components/styles.ts`:
- Around line 3-6: The UseStylesProps interface is declared but not applied to
the second parameter of createStyles for useStyles; update the createStyles call
to explicitly type its props parameter with UseStylesProps so the callback
signature enforces autoAlignLabel's type (refer to UseStylesProps, createStyles,
and useStyles) and adjust the generic/parameter typing accordingly to default
autoAlignLabel to true while preserving existing destructuring.

---

Outside diff comments:
In
`@shesha-reactjs/src/components/formDesigner/components/configurableFormItemLive.tsx`:
- Around line 32-35: The useMemo creating layout can return stale values because
it omits labelCol and wrapperCol from its dependency array; update the memo for
layout (the useMemo that returns { labelCol: formItemlabelCol || labelCol,
wrapperCol: formItemWrapperCol || wrapperCol }) to include labelCol and
wrapperCol alongside formItemlabelCol and formItemWrapperCol so the memo
recomputes when any of those four inputs change.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 22d5cdce-0772-4985-a3d6-3fab5260ef57

📥 Commits

Reviewing files that changed from the base of the PR and between f41849b and 00c574f.

📒 Files selected for processing (4)
  • shesha-reactjs/src/components/formDesigner/components/configurableFormItemLive.tsx
  • shesha-reactjs/src/components/formDesigner/components/configurableFormItemSetting.tsx
  • shesha-reactjs/src/components/formDesigner/components/styles.ts
  • shesha-reactjs/src/designer-components/checkboxGroup/multiCheckbox.tsx

…iguration-studio

- Removed unused autoAlignLabel prop from UseStylesProps interface in formDesigner.
- Enhanced layout in configuration-studio by adjusting flex properties for better responsiveness and alignment of document tabs and editor.
- Ensured consistent height and overflow handling for document editor and tabs.
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
shesha-reactjs/src/components/formDesigner/components/styles.ts (1)

3-3: 🧹 Nitpick | 🔵 Trivial

Add explicit type annotation to the props parameter.

The second parameter lacks type information, which leaves autoAlignLabel implicitly typed. Per coding guidelines, TypeScript should be leveraged as a type system.

💡 Proposed fix for type safety
-export const useStyles = createStyles(({ css, cx, token }, { autoAlignLabel = true }) => {
+export const useStyles = createStyles(({ css, cx, token }, { autoAlignLabel = true }: { autoAlignLabel?: boolean } = {}) => {

Alternatively, extract an interface if this pattern is reused:

interface UseStylesProps {
  autoAlignLabel?: boolean;
}

export const useStyles = createStyles(({ css, cx, token }, { autoAlignLabel = true }: UseStylesProps = {}) => {
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@shesha-reactjs/src/components/formDesigner/components/styles.ts` at line 3,
The props parameter of the createStyles call in useStyles is missing an explicit
type, leaving autoAlignLabel implicitly typed; add a TypeScript annotation
(e.g., declare a UseStylesProps interface with autoAlignLabel?: boolean and
annotate the second parameter as UseStylesProps = {}) and update the
createStyles signature (createStyles(({ css, cx, token }, { autoAlignLabel =
true }: UseStylesProps = {}) => ...) so autoAlignLabel is strongly typed;
reference the createStyles call and the useStyles export when making this
change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@shesha-reactjs/src/configuration-studio/styles.ts`:
- Line 23: Remove the dead constant declaration tabCardHeight since it is no
longer used by the csDocEditor layout (which now uses height: 100%)—locate the
const tabCardHeight = 40; declaration and delete it, and verify there are no
remaining references to tabCardHeight or any dependent calculation with
headerHeight elsewhere in the file to avoid leaving broken expressions.

---

Duplicate comments:
In `@shesha-reactjs/src/components/formDesigner/components/styles.ts`:
- Line 3: The props parameter of the createStyles call in useStyles is missing
an explicit type, leaving autoAlignLabel implicitly typed; add a TypeScript
annotation (e.g., declare a UseStylesProps interface with autoAlignLabel?:
boolean and annotate the second parameter as UseStylesProps = {}) and update the
createStyles signature (createStyles(({ css, cx, token }, { autoAlignLabel =
true }: UseStylesProps = {}) => ...) so autoAlignLabel is strongly typed;
reference the createStyles call and the useStyles export when making this
change.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 94ff2048-4074-49b2-829e-f4332c9f96b6

📥 Commits

Reviewing files that changed from the base of the PR and between 00c574f and 5dfb460.

📒 Files selected for processing (2)
  • shesha-reactjs/src/components/formDesigner/components/styles.ts
  • shesha-reactjs/src/configuration-studio/styles.ts

@James-Baloyi James-Baloyi merged commit 2cb43ce into shesha-io:main Mar 23, 2026
2 checks passed
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