Skip to content

feat: implement FormHelperText base component wrapper (#1400)#1659

Open
abhinavkdeval08-design wants to merge 1 commit into
layer5io:masterfrom
abhinavkdeval08-design:feature/implement-form-helper-text
Open

feat: implement FormHelperText base component wrapper (#1400)#1659
abhinavkdeval08-design wants to merge 1 commit into
layer5io:masterfrom
abhinavkdeval08-design:feature/implement-form-helper-text

Conversation

@abhinavkdeval08-design

Copy link
Copy Markdown

Description

This PR resolves #1400 by implementing the missing FormHelperText component wrapper from @mui/material into the Sistent design system base components directory matrix.

Changes Proposed

  • Created FormHelperText directory component under src/base.
  • Implemented SistentFormHelperTextProps extending MUI's core typings to preserve strict type definitions.
  • Exported the component locally and globally via the root module index.
  • Verified successful production builds locally using cross-env and tsup.

(Note: Local pre-commit tests failed due to a deprecated environment match in React.act tracking within the main upstream branch repositories).

cc @leecalcote @KhushamBansal
Please review this PR and let me know if any changes are required. Happy to iterate!

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new wrapper component, FormHelperText, which wraps Material-UI's FormHelperText component, and updates peer dependency flags in package-lock.json. The review feedback recommends wrapping the new component with React.forwardRef to ensure proper integration with other components and form libraries by forwarding the ref to the underlying DOM element.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +10 to +12
export const FormHelperText: React.FC<SistentFormHelperTextProps> = ({ children, ...props }) => {
return <MuiFormHelperText {...props}>{children}</MuiFormHelperText>;
};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

To ensure proper integration with other components, form libraries, and overlays (such as tooltips or focus managers), it is highly recommended to forward the ref to the underlying DOM element. This maintains consistency with other wrapper components in the repository (e.g., TextField).

Suggested change
export const FormHelperText: React.FC<SistentFormHelperTextProps> = ({ children, ...props }) => {
return <MuiFormHelperText {...props}>{children}</MuiFormHelperText>;
};
export const FormHelperText = React.forwardRef<HTMLParagraphElement, SistentFormHelperTextProps>(
({ children, ...props }, ref) => {
return (
<MuiFormHelperText ref={ref} {...props}>
{children}
</MuiFormHelperText>
);
}
);
FormHelperText.displayName = 'FormHelperText';

@KhushamBansal KhushamBansal left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@abhinavkdeval08-design Please sign your commits and address the bot's feedback on your PR.

Signed-off-by: Abhinav Deval <abhinavkdeval08@gmail.com>
@abhinavkdeval08-design abhinavkdeval08-design force-pushed the feature/implement-form-helper-text branch from 0f694d4 to 536f203 Compare June 28, 2026 06:10
@abhinavkdeval08-design

Copy link
Copy Markdown
Author

Hi @KhushamBansal, thank you for the review! I have addressed the bot's feedback by wrapping the component in React.forwardRef and adding the displayName. I've also amended the commit to include the DCO sign-off. Please let me know if it looks good to go!

@abhinavkdeval08-design

Copy link
Copy Markdown
Author

@leecalcote @KhushamBansal
Please review this PR and let me know if any changes are required. Happy to iterate!

@Bhumikagarggg

Copy link
Copy Markdown
Contributor

@abhinavkdeval08-design Thank you for your contribution! Let's discuss this during the website call tomorrow at 5:30 PM IST | 7 AM CST Add it as an agenda item to the meeting minutes, if you would 🙂

@abhinavkdeval08-design

Copy link
Copy Markdown
Author

Hi @Bhumikagarggg, thank you for the invite! Unfortunately, I won't be able to join the website call tomorrow due to prior personal commitments. However, I have already addressed the code feedback by implementation of React.forwardRef and adding the displayName. The DCO check is also passing now. Please let me know if there are any further code reviews required here on GitHub. Happy to iterate!

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.

[Feature] Implement FormHelperText

3 participants