Skip to content

feat(cds-fluid-form): new wc component#21951

Merged
maradwan26 merged 12 commits into
carbon-design-system:mainfrom
maradwan26:wc-fluid-form
May 5, 2026
Merged

feat(cds-fluid-form): new wc component#21951
maradwan26 merged 12 commits into
carbon-design-system:mainfrom
maradwan26:wc-fluid-form

Conversation

@maradwan26

@maradwan26 maradwan26 commented Apr 2, 2026

Copy link
Copy Markdown
Contributor

Closes #20341
Closes #20915
Closes #21950

Adds a new component cds-fluid-form to @carbon/web-components along with its respective test cases. Also adds controls to this components story in both React and WC storybooks. Fixes some minor form-related styling issues with some fluid components in WC

Changelog

New

  • Added cds-fluid-form and its respective styles, tests, mdx, and story
  • Added controls to FluidForm stories in both React and WC storybooks
    • Note: stories are not 100% synced due to cds-fluid-date-picker not being implemented in WC yet, I've added a TODO comment to address this once that's done

Changed

  • Fixed an issue with some fluid components in WC not rendering properly inside of a fluid-form, this was due to flex: 1 1 auto; not being set in their stylesheet
    • This should also be added to cds-fluid-date-picker once it gets implemented
  • Fixed an issue with cds-fluid-password-input having excess padding at the bottom
  • Aligned cds-password-input's default tooltip alignment value with React
  • Fixed an issue with modal-body allowing fluid-form to overflow past its border
  • The stories for FluidForm no longer use FluidTextInput with type="password", they have been replaced with FluidPasswordInput

Testing / Reviewing

  • cds-fluid-form should render as expected in Web Components
  • Story controls should work
  • There should be no regressions related to any of the styling fixes I've made to the fluid components nor modal
  • CI should pass

PR Checklist

As the author of this PR, before marking ready for review, confirm you:

  • Reviewed every line of the diff
  • Updated documentation and storybook examples
  • Wrote passing tests that cover this change
  • Addressed any impact on accessibility (a11y)
  • Tested for cross-browser consistency
  • Validated that this code is ready for review and status checks should pass

More details can be found in the pull request guide

@netlify

netlify Bot commented Apr 2, 2026

Copy link
Copy Markdown

Deploy Preview for v11-carbon-react ready!

Name Link
🔨 Latest commit 51b6386
🔍 Latest deploy log https://app.netlify.com/projects/v11-carbon-react/deploys/69f9afb9c9a7ed0008470de4
😎 Deploy Preview https://deploy-preview-21951--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Apr 2, 2026

Copy link
Copy Markdown

Deploy Preview for v11-carbon-web-components ready!

Name Link
🔨 Latest commit 51b6386
🔍 Latest deploy log https://app.netlify.com/projects/v11-carbon-web-components/deploys/69f9afb9dc4be300089c68d7
😎 Deploy Preview https://deploy-preview-21951--v11-carbon-web-components.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@codecov

codecov Bot commented Apr 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.10%. Comparing base (19a1247) to head (51b6386).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #21951      +/-   ##
==========================================
- Coverage   95.13%   95.10%   -0.03%     
==========================================
  Files         548      549       +1     
  Lines       45602    45636      +34     
  Branches     6576     6578       +2     
==========================================
+ Hits        43382    43403      +21     
- Misses       2090     2103      +13     
  Partials      130      130              
Flag Coverage Δ
main-packages 89.16% <ø> (ø)
web-components 97.89% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@maradwan26 maradwan26 marked this pull request as ready for review April 2, 2026 19:42
@maradwan26 maradwan26 requested a review from a team as a code owner April 2, 2026 19:42
@maradwan26 maradwan26 requested a review from laurenmrice April 2, 2026 19:42
@maradwan26

Copy link
Copy Markdown
Contributor Author

@laurenmrice

Just a heads up for visual review, the story controls have made it really easy to see how the fluid components behave together with the different states so I've noticed a bunch of visual problems with some of the fluid components in React/WC that would likely need issues to be created if they have not been already (e.g. FluidNumberInput & FluidDatePicker disabled state, FluidNumberInput invalid state, etc.)

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

@maradwan26 This is looking really good! Just a couple comments below:

There are some smaller visual bugs, which you mentioned, in Fluid Form in general that already existed in React, so I will make a separate issue for that. It's mostly regarding things per input or specifically the fluid form modal. Let me know if anything below needs to be a separate issue.


Default story

Fluid form on page

  • The horizontal borders between the first and second rows in the form should be 1px instead of 2px.
  • Number input component: In Firefox, when the number input field receives focus, there is a glitchy half border around the - control. This seems to only be a Firefox problem.
  • Disabled prop: When the prop is set to true, some of the borders between components disappear and the bottom border on number input is incorrect. They all should be $border-disabled.
  • Invalid and Warning props: There are some issues with the alignment of these invalid and warning states. Is this a current problem in React? I couldn’t see it because I don’t have access to the prop in React. I can move this to a separate issue if it makes more sense to.
Image Warning

@maradwan26

maradwan26 commented Apr 10, 2026

Copy link
Copy Markdown
Contributor Author

@laurenmrice

The horizontal borders between the first and second rows in the form should be 1px instead of 2px.

Screenshot 2026-04-10 at 3 35 44 PM Screenshot 2026-04-10 at 3 36 18 PM

Could you clarify a bit more on this? On my end I see 1px in Dev Tools

Number input component: In Firefox, when the number input field receives focus, there is a glitchy half border around the - control. This seems to only be a Firefox problem.

This is a problem with the FluidNumberInput itself, but for me its on the "+" when I hover. I'm also seeing this in React and in both Chrome and Firefox

Screenshot 2026-04-10 at 3 44 02 PM

I think this can be put in a separate issue since this is an issue outside of the fluid-form

Disabled prop: When the prop is set to true, some of the borders between components disappear and the bottom border on number input is incorrect. They all should be $border-disabled.

The fluid number input bug originates all the way from the default number-input it just gets inherited here. I believe a fix for the regular number-input should fix this one? Unless there should be a different border for the fluid variant which kinda goes into my next questions regarding disabled states:

Regarding the borders when in disabled states, are they supposed to look different when the fluid-component is by itself, compared to when it is inside of a form?

For example, right now all the fluid-components have a bottom border of 1px solid transparent when disabled in both React and WC. Are they then supposed to be 1px solid $border-disabled when inside of a fluid-form? Or are they always supposed to be 1px solid $border-disabled?

I'm assuming for the non-fluid variants, 1px solid transparent is correct, since this what's in Figma. But for the fluid variants I think this needs to defined, since right now they all just follow the 1px solid transparent border (except fluid datepicker and number-input which are incorrect in both scenarios right now)

Invalid and Warning props: There are some issues with the alignment of these invalid and warning states. Is this a current problem in React? I couldn’t see it because I don’t have access to the prop in React. I can move this to a separate issue if it makes more sense to.

I added controls to the React story in this PR so that all the states are visible: https://deploy-preview-21951--v11-carbon-react.netlify.app/?path=/story/components-fluid-components-fluidform--default

And yeah, this is also an issue with React. The same goes for the disabled states too and the NumberInput.

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

@maradwan26

Stroke inconsistencies

The horizontal borders between the first and second rows in the form should be 1px instead of 2px.

Interesting, I am not seeing this anymore in any browser. So ignore this. 😄


Fluid number input bugs

Number input component: In Firefox, when the number input field receives focus, there is a glitchy half border around the - control. This seems to only be a Firefox problem.

I made a separate issue for the focus/hover number input problems (#22055).


Disabled state
All the borders should be set to $border-subtle according to our website guidance. I noticed in Figma we have a couple bugs around this, some of the fluid inputs don't even have bottom borders in the disabled state, so I am going to make a follow up issue in our kit repo for that.

I also see what you mean about the stemming disabled issue coming from the normal number input.

I went ahead and made a separate issue to tackle the number input disabled problem and the fluid form input problem (#22056).

Frame 1

Invalid / Warning states

I added controls to the React story in this PR so that all the states are visible: https://deploy-preview-21951--v11-carbon-react.netlify.app/?path=/story/components-fluid-components-fluidform--default

Thanks, yes so this is a problem stemming from React. I made a separate issue (#22054) to tackle these states for React and WC because there are many bugs with it.

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

Approving because for the bugs I did find, I made separate issues for them because there were already problems for them coming from React. I also want to do a separate issue on the fluid modal form overall. Everything else looks good.

@maradwan26

maradwan26 commented Apr 16, 2026

Copy link
Copy Markdown
Contributor Author

@laurenmrice Thank you! For #22056 I rephrased it to be more specific to the the Fluid components instead of the Fluid form. Just for added specificity since the fluid-components should still have the $border-subtle colour when not in a fluid form.

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

LGTM

@maradwan26 maradwan26 added this pull request to the merge queue May 5, 2026
Merged via the queue into carbon-design-system:main with commit a5bc2c1 May 5, 2026
38 checks passed
@maradwan26 maradwan26 deleted the wc-fluid-form branch May 5, 2026 14:30
iamnexxed pushed a commit to iamnexxed/carbon that referenced this pull request May 5, 2026
* feat(cds-fluid-form): new wc component

* fix(fluid-components): add flex style

* fix: hide modal-container overflow

* feat: sync stories

* feat(fluidform): storycontrols in react and wc

* fix(fluid-password-input): remove excess bottom padding

* test: add tests

* fix: datepicker controls

* chore: clean up imports

* fix: passwordinput default alignment

---------

Co-authored-by: Heloise Lui <71858203+heloiselui@users.noreply.github.com>
@carbon-automation

Copy link
Copy Markdown
Contributor

Hey there! v11.107.0 was just released that references this issue/PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[fluid-form]: add unit test cases [FluidForm]: add controls args to every story React|WC Parity: Create FluidForm

4 participants