Skip to content

fix(ui): align Checkbox vertically in flex rows#1751

Closed
TilmanHaupt wants to merge 12 commits into
mainfrom
til-checkbox
Closed

fix(ui): align Checkbox vertically in flex rows#1751
TilmanHaupt wants to merge 12 commits into
mainfrom
til-checkbox

Conversation

@TilmanHaupt

@TilmanHaupt TilmanHaupt commented Jun 9, 2026

Copy link
Copy Markdown
Member

Summary

jn:inline-flex jn:flex-col — the outer div shrinks to content size (no excess height), FormHints stack vertically via flex-col, and the parent's items-center centers it correctly.

Bildschirmfoto 2026-06-09 um 14 14 11

Test plan

  • Render a <Checkbox> inside a flex row container and confirm it aligns vertically with sibling elements
  • Confirm no visual regression for standalone Checkbox usage
  • Confirm no visual regression for Checkbox in form layouts

Add jn:inline-flex jn:items-center to jn-checkbox-outer so the checkbox
sits at the correct baseline when placed next to buttons or other
inline elements in a flex container.

Also gitignore .husky/prepare-commit-msg (personal DCO sign-off hook).

Signed-off-by: TilmanHaupt <tilman.haupt@sap.com>
Signed-off-by: TilmanHaupt <tilman.haupt@sap.com>
@changeset-bot

changeset-bot Bot commented Jun 9, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b38e122

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
@cloudoperators/juno-ui-components Patch
@cloudoperators/juno-app-carbon Patch
@cloudoperators/juno-app-doop Patch
@cloudoperators/juno-app-example Patch
@cloudoperators/juno-app-greenhouse Patch
@cloudoperators/juno-app-heureka Patch
@cloudoperators/juno-app-supernova Patch
@cloudoperators/juno-app-template Patch
@cloudoperators/juno-messages-provider Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@TilmanHaupt TilmanHaupt added ui-components All tasks related to juno-ui-components library greenhouse-pr-build Set this label to create a preview image which will automatically set the `greenhouse-pr-preview` labels Jun 9, 2026
@TilmanHaupt TilmanHaupt self-assigned this Jun 9, 2026
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-06-10 11:51 UTC

@github-actions github-actions Bot added the greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. label Jun 9, 2026
@TilmanHaupt TilmanHaupt marked this pull request as ready for review June 9, 2026 12:14
@TilmanHaupt TilmanHaupt requested review from a team and franzheidl as code owners June 9, 2026 12:14
Copilot AI review requested due to automatic review settings June 9, 2026 12:14
@github-actions github-actions Bot added greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. and removed greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. labels Jun 9, 2026

Copilot AI 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.

Pull request overview

This PR aims to fix vertical alignment of the Checkbox component when placed inside flex row layouts, and includes a patch changeset for @cloudoperators/juno-ui-components.

Changes:

  • Update Checkbox wrapper classes to improve alignment in flex rows.
  • Add a patch changeset for the UI components package.
  • Ignore .husky/prepare-commit-msg in .gitignore.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
packages/ui-components/src/components/Checkbox/Checkbox.component.tsx Adjusts wrapper classes intended to improve Checkbox alignment in flex row containers.
.changeset/til-checkbox-fix.md Adds a patch changeset entry for the UI components package release.
.gitignore Adds an ignore rule for .husky/prepare-commit-msg.

Comment thread packages/ui-components/src/components/Checkbox/Checkbox.component.tsx Outdated
@github-actions github-actions Bot added greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. and removed greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. labels Jun 9, 2026
@github-actions github-actions Bot added greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. and removed greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. labels Jun 9, 2026
@TilmanHaupt TilmanHaupt marked this pull request as draft June 9, 2026 12:42
…mHint layout

Signed-off-by: TilmanHaupt <tilman.haupt@sap.com>
@github-actions github-actions Bot removed the greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. label Jun 9, 2026
@TilmanHaupt TilmanHaupt requested a review from Copilot June 9, 2026 12:44
@github-actions github-actions Bot added the greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. label Jun 9, 2026

Copilot AI 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.

Pull request overview

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

Comment thread packages/ui-components/src/components/Checkbox/Checkbox.component.tsx Outdated
…lignment in flex rows

Signed-off-by: TilmanHaupt <tilman.haupt@sap.com>
@github-actions github-actions Bot added greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. and removed greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. labels Jun 9, 2026
…ation

Signed-off-by: TilmanHaupt <tilman.haupt@sap.com>
@github-actions github-actions Bot added greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. and removed greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. labels Jun 9, 2026
…ight stretch

Signed-off-by: TilmanHaupt <tilman.haupt@sap.com>
@github-actions github-actions Bot removed the greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. label Jun 9, 2026
…ckboxCell only

Signed-off-by: TilmanHaupt <tilman.haupt@sap.com>
@github-actions github-actions Bot added greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. and removed greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. labels Jun 9, 2026
…cking with flex-col

Signed-off-by: TilmanHaupt <tilman.haupt@sap.com>
@github-actions github-actions Bot added greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. and removed greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. labels Jun 9, 2026
@TilmanHaupt

Copy link
Copy Markdown
Member Author

closed because i dont get it

@TilmanHaupt TilmanHaupt closed this Jun 9, 2026
@github-actions github-actions Bot removed the greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. label Jun 9, 2026
@TilmanHaupt TilmanHaupt reopened this Jun 10, 2026
@github-actions github-actions Bot added the greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. label Jun 10, 2026
…fix required dot

- Remove inline-flex from Checkbox outer (reverts to block): fixes CheckboxGroup
  item spacing which broke when flex-col children became inline-flex
- Remove flex/flex-col from CheckboxGroup options container: restores natural
  block stacking so checkboxes have proper spacing between them
- Remove leading-0 from Checkbox labelStyles: fixes required dot position —
  zero line-height caused align-top + mt-2 to misplace the dot below the text

Signed-off-by: TilmanHaupt <tilman.haupt@sap.com>
@github-actions github-actions Bot added greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. and removed greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. labels Jun 10, 2026
…CheckboxGroup

Checkbox outer needs inline-flex flex-col so it sizes to content and aligns
correctly in horizontal flex containers (Stack alignment="center").
CheckboxGroup options container needs flex flex-col to force inline-flex
children to stack vertically instead of sitting inline side-by-side.

Signed-off-by: TilmanHaupt <tilman.haupt@sap.com>
@github-actions github-actions Bot added greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. and removed greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. labels Jun 10, 2026
@TilmanHaupt

Copy link
Copy Markdown
Member Author

i really give up now. not possible with just touching checkbox.

@github-actions github-actions Bot removed the greenhouse-pr-preview THIS LABEL IS SET AUTOMATICALLY. label Jun 10, 2026
@TilmanHaupt TilmanHaupt deleted the til-checkbox branch June 10, 2026 11:51
@franzheidl

Copy link
Copy Markdown
Member

Will be adressed with #1714 / #1753. 👍

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

Labels

greenhouse-pr-build Set this label to create a preview image which will automatically set the `greenhouse-pr-preview` ui-components All tasks related to juno-ui-components library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants