Skip to content

Update boxel ui input type checkbox#4121

Open
FadhlanR wants to merge 6 commits intomainfrom
cs-10270-update-boxel-ui-input-type-checkbox
Open

Update boxel ui input type checkbox#4121
FadhlanR wants to merge 6 commits intomainfrom
cs-10270-update-boxel-ui-input-type-checkbox

Conversation

@FadhlanR
Copy link
Contributor

@FadhlanR FadhlanR commented Mar 5, 2026

Previously, the 'show only' checkbox in the card chooser did not use the boxel-ui input component. In this PR, I’ve updated the design of the boxel-ui checkbox to ensure it meets the requirements for use within the card chooser.

Screenshot 2026-03-05 at 15 31 54

@github-actions
Copy link

github-actions bot commented Mar 5, 2026

@github-actions
Copy link

github-actions bot commented Mar 5, 2026

Host Test Results

    1 files  ± 0      1 suites  ±0   2h 19m 52s ⏱️ + 27m 11s
2 013 tests +83  1 998 ✅ +83  15 💤 ±0  0 ❌ ±0 
2 028 runs  +83  2 013 ✅ +83  15 💤 ±0  0 ❌ ±0 

Results for commit ce7a56b. ± Comparison against base commit b367d0b.

♻️ This comment has been updated with latest results.

@FadhlanR FadhlanR marked this pull request as ready for review March 5, 2026 09:08
@FadhlanR FadhlanR requested review from a team and burieberry March 5, 2026 09:08
@habdelra habdelra requested a review from Copilot March 5, 2026 14:29
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the host card catalog “show only” control to use the shared Boxel UI input component, and extends BoxelInput with checkbox-specific styling/documentation so it can be used in the card chooser.

Changes:

  • Switch card-search “show only” checkbox to BoxelInput @type='checkbox'.
  • Add checkbox styling support to BoxelInput (including CSS variables) and document it in the Boxel UI usage page.
  • Add a Percy snapshot to cover the updated checkbox rendering in the operator-mode card catalog integration test.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
packages/host/tests/integration/components/operator-mode-card-catalog-test.gts Adds a Percy snapshot around the “show only” checkbox state to visually lock in the updated design.
packages/host/app/components/card-search/section-header.gts Replaces the raw checkbox input with BoxelInput checkbox usage in the search sheet header.
packages/boxel-ui/addon/src/components/input/usage.gts Adds Freestyle documentation + example for checkbox usage, including CSS vars.
packages/boxel-ui/addon/src/components/input/index.gts Extends BoxelInput to support checkbox styling and broadens @value type to allow boolean.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@FadhlanR
Copy link
Contributor Author

Thanks for the feedback @burieberry @backspace . I addressed the feedback and I added tests to ensure the theme works with checkbox inputs.

Copy link
Contributor

@backspace backspace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

Is the contrast of the checkmark a concern of this? With the StarryNight and many other themes, I think the black checkmark probably should be white, or another high-contrast theme colour.

@FadhlanR
Copy link
Contributor Author

Image Is the contrast of the checkmark a concern of this? With the StarryNight and many other themes, I think the black checkmark probably should be white, or another high-contrast theme colour.

I'm currently using --primary-foreground from the theme for the checkmark. I'm not sure if we need a dynamic contrast calculation here. What do you think, @burieberry?

Copy link
Contributor

@burieberry burieberry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The checkmark color is now updated. However, there's something strange going on with the grid layout and the size of the checkmark. The checkmark size is very small. We can revert to the fixed values and not do scaling.
Image
Image

@FadhlanR
Copy link
Contributor Author

@burieberry I updated the checkmark implementation to prevent it from being too small. I also hid the error icon and error message for the checkbox input because I don't think they are necessary for checkboxes. Here is the screenshot.

Screen.Recording.2026-03-12.at.14.14.30.mov

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.

4 participants