-
Notifications
You must be signed in to change notification settings - Fork 123
Fix ReflistStatusTag and StatusTag alignment #4441
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: releases/0.44
Are you sure you want to change the base?
Conversation
WalkthroughThe PR adds an optional Changes
Sequence Diagram(s)(omitted — changes are styling/prop propagation and do not introduce multi-component control-flow requiring a sequence diagram) Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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 |
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: 2
🤖 Fix all issues with AI agents
In `@shesha-reactjs/src/components/refListStatus/styles/styles.ts`:
- Line 3: The style hook createStyles call for useStyles is missing a TypeScript
type for its props; define an interface (e.g., RefListStatusStyleProps) that
types dimensionsStyles, fontStyles and readOnly to match their real shapes from
the consuming component, then annotate the second parameter of createStyles with
that interface so the signature becomes createStyles(..., props:
RefListStatusStyleProps); update any usages of dimensionsStyles/fontStyles to
satisfy the new types and export the interface if consumed elsewhere.
In `@shesha-reactjs/src/components/statusTag/styles/styles.ts`:
- Around line 3-9: The style hook useStyles is missing a type annotation for the
second parameter (the props object with readOnly) passed into createStyles;
update the signature for createStyles in useStyles so the second parameter is
typed (e.g., annotate { readOnly } with a proper type like { readOnly?: boolean
} or the same custom Props type used by refListStatus) so the compiler knows the
prop shape and avoid implicit any for readOnly (affecting shaStatusTag margin
calculation that references sheshaStyles.paddingLG).
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
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/refListStatus/styles/styles.ts (1)
42-42: Potential runtime error:fontStylesmay be undefined.Since
fontStylesis optional inRefListStatusStyleProps, accessingfontStyles.textAligndirectly will throw aTypeErrorwhenfontStylesisundefined.Proposed fix using optional chaining
- justify-content: ${fontStyles.textAlign === 'center' ? 'center' : fontStyles.textAlign === 'right' ? 'flex-end' : 'flex-start'}; + justify-content: ${fontStyles?.textAlign === 'center' ? 'center' : fontStyles?.textAlign === 'right' ? 'flex-end' : 'flex-start'};
#4059
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.