Skip to content

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

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

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

Conversation

@abhinavkdeval08-design

@abhinavkdeval08-design abhinavkdeval08-design commented Jun 28, 2026

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.

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

Summary by CodeRabbit

  • New Features
    • Added a reusable form helper text component for displaying supporting or validation messages.
    • Supports standard styling, properties, custom class names, error-state styling, and ref forwarding consistent with the component library.
    • Made the component available through the base component exports for convenient use across forms.
    • Helper text content renders accessibly beneath related form controls.

@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 thread src/base/FormHelperText/FormHelperText.tsx Outdated

@KhushamBansal KhushamBansal 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.

@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!

@abhinavkdeval08-design

Copy link
Copy Markdown
Author

@KhushamBansal @Bhumikagarggg @leecalcote
Plz review this PR

@abhinavkdeval08-design

Copy link
Copy Markdown
Author

@leecalcote @KhushamBansal @rishiraj38 @Bhumikagarggg
Kindly review my pr..

@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 🙂

@Bhumikagarggg Bhumikagarggg 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.

  1. Please change the name of file from src/base/FormHelperText/FormHelperText.tsx this to src/base/FormHelperText/FormHelperTextIcon.tsx
  2. Please take this PR as reference - #1332

Comment thread package-lock.json Outdated
Comment thread src/base/FormHelperText/index.ts
Signed-off-by: Abhinav Deval <abhinavkdeval08@gmail.com>
@abhinavkdeval08-design

abhinavkdeval08-design commented Jul 6, 2026

Copy link
Copy Markdown
Author

@Bhumikagarggg @leecalcote @KhushamBansal I've renamed the component file to FormHelperTextIcon.tsx, removed the export line from index.ts, and reverted the package-lock.json file as requested. The DCO check is passing. Please review it now!

@abhinavkdeval08-design
abhinavkdeval08-design force-pushed the feature/implement-form-helper-text branch from 6f78a41 to e344196 Compare July 6, 2026 07:04

@KhushamBansal KhushamBansal 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.

@abhinavkdeval08-design The file shouldn't be named src/base/FormHelperText/FormHelperTextIcon.tsx. It should be src/base/FormHelperText/FormHelperText.tsx. The component isn't an icon.

Signed-off-by: Abhinav Deval <abhinavkdeval08@gmail.com>
@abhinavkdeval08-design
abhinavkdeval08-design force-pushed the feature/implement-form-helper-text branch from 5f0765b to 483690c Compare July 6, 2026 13:09
@abhinavkdeval08-design

Copy link
Copy Markdown
Author

@KhushamBansal That makes total sense, it is indeed a text wrapper and not an icon. I had renamed it earlier based on the previous review request, but I have now reverted the file name back to FormHelperText.tsx and fixed the exports. @Bhumikagarggg FYI! The DCO check is passing. Let me know if it looks good to merge now.

@abhinavkdeval08-design

abhinavkdeval08-design commented Jul 14, 2026

Copy link
Copy Markdown
Author

@leecalcote @KhushamBansal @Bhumikagarggg kindly review the PR

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ed0449c9-92f9-47f2-9dee-6f78454836e4

📥 Commits

Reviewing files that changed from the base of the PR and between e18dbff and 0df750f.

📒 Files selected for processing (2)
  • src/base/FormHelperText/FormHelperText.test.tsx
  • src/base/FormHelperText/FormHelperText.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/base/FormHelperText/FormHelperText.tsx

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

A typed FormHelperText wrapper forwards props and refs to MUI’s component, includes rendering tests, and exports it through the local and base package barrels.

Changes

FormHelperText component

Layer / File(s) Summary
FormHelperText implementation and exports
src/base/FormHelperText/FormHelperText.tsx, src/base/FormHelperText/FormHelperText.test.tsx, src/base/FormHelperText/index.ts, src/base/index.tsx
Adds the typed ref-forwarding wrapper, tests child rendering, ref forwarding, class names, and error state, and exposes the component through both barrel entry points.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 0df75

This change adds and exports a FormHelperText component backed by MUI without changing authentication, data handling, runtime configuration, or deployment behavior. No actionable merge-blocking risk remains after normal checks and review.

Suggested reviewers: bhumikagarggg

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the implementation of the FormHelperText base component wrapper and matches the primary change.
Linked Issues check ✅ Passed The pull request implements the missing FormHelperText component, adds MUI-based typings, forwards refs and props, and exposes the component through local and root-level exports. These changes satisfy…
Out of Scope Changes check ✅ Passed The changes are limited to the FormHelperText wrapper, its exports, and focused tests. No unrelated code changes are identified.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Full details: Linked Issues check

Explanation

The pull request implements the missing FormHelperText component, adds MUI-based typings, forwards refs and props, and exposes the component through local and root-level exports. These changes satisfy issue #1400.

Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files.

✨ 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.

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/base/FormHelperText/FormHelperText.tsx`:
- Around line 6-8: Replace the empty SistentFormHelperTextProps interface with a
type alias that preserves its extension of MuiFormHelperTextProps, removing the
unused empty-interface declaration and its comment.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 600cd717-a3bc-410b-830f-ddb11bd6d530

📥 Commits

Reviewing files that changed from the base of the PR and between 2bb6802 and e18dbff.

📒 Files selected for processing (3)
  • src/base/FormHelperText/FormHelperText.tsx
  • src/base/FormHelperText/index.ts
  • src/base/index.tsx

Comment thread src/base/FormHelperText/FormHelperText.tsx Outdated
@chellej

chellej commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

@KhushamBansal KhushamBansal 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.

@abhinavkdeval08-design Could you attach demo video of this component in the PR description?

@abhinavkdeval08-design

Copy link
Copy Markdown
Author

@KhushamBansal, since FormHelperText is a pure structural base wrapper around Material-UI’s core component with forwarded ref and type definitions (rather than an interactive or visual feature widget like a table/modal), it is primarily designed to be consumed downstream within form controls (e.g., FormControl, TextField).

The component has been verified with local tsup production builds and strict TypeScript lint checks (all CI checks are passing green). I've resolved the empty interface ESLint warning as well. Let me know if there are any other specific code-level checks needed, or if it looks good to merge!

@PARTH-TUSSLE PARTH-TUSSLE 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.

Hey @abhinavkdeval08-design , I went through the current implementation. The earlier concerns around ref forwarding, the filename, package-lock changes, and the empty interface have all been addressed, and the current diff looks clean and appropriately scoped.
Before I approve, I'd just like to see a small unit test covering the wrapper, especially ref forwarding and basic prop/child rendering so we have regression coverage for this base component. Also, please attach the demo video requested earlier in the PR description.

…rding

Signed-off-by: Abhinav Deval <abhinavkdeval08@gmail.com>
@abhinavkdeval08-design

Copy link
Copy Markdown
Author
Screen.Recording.2026-08-30.184453.mp4

Hi @PARTH-TUSSLE @KhushamBansal,

I have added the unit test suite in FormHelperText.test.tsx covering:

  • Standard child text rendering
  • Direct DOM ref forwarding
  • Custom classNames and error prop styling

I have also attached the demo video verifying these test states in the PR description above. All local builds and lint checks are green. Awaiting your approval to merge!

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

5 participants