feat: implement FormHelperText base component wrapper (#1400)#1659
feat: implement FormHelperText base component wrapper (#1400)#1659abhinavkdeval08-design wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
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.
| export const FormHelperText: React.FC<SistentFormHelperTextProps> = ({ children, ...props }) => { | ||
| return <MuiFormHelperText {...props}>{children}</MuiFormHelperText>; | ||
| }; |
There was a problem hiding this comment.
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).
| 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
left a comment
There was a problem hiding this comment.
@abhinavkdeval08-design Please sign your commits and address the bot's feedback on your PR.
Signed-off-by: Abhinav Deval <abhinavkdeval08@gmail.com>
0f694d4 to
536f203
Compare
|
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! |
|
@leecalcote @KhushamBansal |
|
@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 🙂 |
|
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 |
Description
This PR resolves #1400 by implementing the missing
FormHelperTextcomponent wrapper from@mui/materialinto the Sistent design system base components directory matrix.Changes Proposed
FormHelperTextdirectory component undersrc/base.SistentFormHelperTextPropsextending MUI's core typings to preserve strict type definitions.cross-envandtsup.(Note: Local pre-commit tests failed due to a deprecated environment match in
React.acttracking 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!