Skip to content

refactor(form): use col-form-label in inline mode#609

Open
spike-rabbit wants to merge 1 commit intomainfrom
refactor/form-use-col-form-label
Open

refactor(form): use col-form-label in inline mode#609
spike-rabbit wants to merge 1 commit intomainfrom
refactor/form-use-col-form-label

Conversation

@spike-rabbit
Copy link
Member

@spike-rabbit spike-rabbit commented Aug 20, 2025

Previously we overrode the .form-label when
the form-item was switched to the inline mode.
With this change, we just use the bootstrap standard class.



Documentation.
Examples.
Dashboards Demo.
Playwright report.

Coverage Reports:

Code Coverage

@github-actions
Copy link

@spike-rabbit spike-rabbit force-pushed the refactor/form-use-col-form-label branch from 312daae to b3c732b Compare August 20, 2025 12:50
@spike-rabbit spike-rabbit force-pushed the refactor/form-use-col-form-label branch 2 times, most recently from f6156c3 to e06b51d Compare March 12, 2026 10:10
Previously we overrode the `.form-label` when
the form-item switched to the inline mode.
With this change, we just use the bootstrap standard class.

See https://getbootstrap.com/docs/5.3/forms/layout/#horizontal-form.
@spike-rabbit spike-rabbit force-pushed the refactor/form-use-col-form-label branch from e06b51d to da1f84b Compare March 23, 2026 16:24
@spike-rabbit spike-rabbit marked this pull request as ready for review March 24, 2026 06:52
@spike-rabbit spike-rabbit requested review from a team as code owners March 24, 2026 06:53
@spike-rabbit spike-rabbit requested a review from dr-itz March 24, 2026 06:53
@spike-rabbit
Copy link
Member Author

@dr-itz what do you think here?

The benefits in my opinion are:

  • way less generated CSS
  • sticking to standard BS classes, no heavy component level overrides

Downsides:

  • technically, one could have changed via a CSS class to the column mode
  • now the form-container is required to do that, and we have a new signal read for every form-item.

@dr-itz
Copy link
Contributor

dr-itz commented Mar 25, 2026

The CSS Angular generates for all the :host-context is absolutely horrible. So that needs addressing. However we can simply invert the logic here, i.e. only treat the xs case as special. I did that in #1756.

Much smaller CSS and a pure CSS solution.

(At some point we might consider container queries instead and drop the resize observer from the forms 🤷 )

@dr-itz
Copy link
Contributor

dr-itz commented Mar 25, 2026

The CSS Angular generates for all the :host-context is absolutely horrible. So that needs addressing. However we can simply invert the logic here, i.e. only treat the xs case as special. I did that in #1756.

Much smaller CSS and a pure CSS solution.

(At some point we might consider container queries instead and drop the resize observer from the forms 🤷 )

so...that breaks because when using si-form-item w/o a si-form-container...

@dr-itz
Copy link
Contributor

dr-itz commented Mar 25, 2026

Using container queries: #1757

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.

2 participants