Skip to content

Render the CardHeader selection menu with the shared SelectionMenu#5102

Open
lukemelia wants to merge 1 commit into
cs-11325-card-chooser-selection-trigger-reconsider-adorn-pill-vsfrom
cs-11366-add-bulk-selection-menu-to-the-workspace-cardsgrid
Open

Render the CardHeader selection menu with the shared SelectionMenu#5102
lukemelia wants to merge 1 commit into
cs-11325-card-chooser-selection-trigger-reconsider-adorn-pill-vsfrom
cs-11366-add-bulk-selection-menu-to-the-workspace-cardsgrid

Conversation

@lukemelia
Copy link
Copy Markdown
Contributor

Part of CS-11366. The bulk-selection affordance in an operator-mode stack item's CardHeader used a bespoke dropdown (selection checkmark + count + caret wrapped in a BoxelDropdown). This swaps it for the shared boxel-ui SelectionMenu so the trigger matches the card chooser — primary fill, keyboard focus ring, caret flip on open.

The menu stays where it is (the card header), per discussion; only the trigger/shell is unified.

Changes

  • boxel-ui card-header: render <SelectionMenu @selectedCount @items @label /> in place of the inline dropdown. CardHeaderUtilityMenu now carries selectedCount (number) + optional label instead of triggerText. Removed the now-dead .utility-menu-trigger* CSS; .utility-menu-positioner collapses to shrink-to-fit (right-anchored, grows left) so the centered card title still doesn't shift when the menu appears.
  • host stack-item: the utilityMenu getter supplies selectedCount and an accessible label instead of triggerText.
  • Updated the card-header usage stub, the card-header integration test, and the workspace-delete-multiple acceptance test to the new shape/selector (.utility-menu-trigger[data-test-selection-dropdown-trigger]).

Base branch

Targets cs-11325-… (PR #5100, the shared SelectionMenu) since that prerequisite isn't merged to main yet — keeps this diff scoped to just the swap. Will rebase onto main and retarget once #5100 lands.

Testing

  • boxel-ui card-header integration test passes (incl. the title-centering assertion) against a fresh build.
  • host workspace-delete-multiple acceptance test still pending a host rebuild to run locally.

🤖 Generated with Claude Code

The bulk-selection affordance in a stack item's CardHeader used a
bespoke dropdown (selection checkmark + count + caret in a BoxelDropdown).
Replace it with the shared boxel-ui SelectionMenu so it matches the card
chooser's trigger (primary fill, focus ring, caret flip).

CardHeaderUtilityMenu now carries `selectedCount` (number) and an optional
`label` instead of `triggerText`. The producer (operator-mode stack item)
supplies the count and an accessible label. The positioner collapses to
shrink-to-fit so the centered card title still doesn't shift when the menu
appears.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 4, 2026

Preview deployments

Host Test Results

    1 files      1 suites   1h 51m 40s ⏱️
2 931 tests 2 916 ✅ 15 💤 0 ❌
2 950 runs  2 935 ✅ 15 💤 0 ❌

Results for commit 11c9369.

Realm Server Test Results

    1 files      1 suites   10m 10s ⏱️
1 549 tests 1 548 ✅ 1 💤 0 ❌
1 640 runs  1 639 ✅ 1 💤 0 ❌

Results for commit 11c9369.

@lukemelia lukemelia requested a review from Copilot June 4, 2026 03:11
@lukemelia lukemelia marked this pull request as ready for review June 4, 2026 03:11
@lukemelia lukemelia requested review from a team and burieberry June 4, 2026 03:12
Copy link
Copy Markdown
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

This PR updates the operator-mode stack item CardHeader bulk-selection control to use the shared boxel-ui SelectionMenu, aligning the trigger’s visual/interaction behavior (primary fill, focus ring, caret flip) with other selection surfaces and removing the bespoke dropdown trigger implementation.

Changes:

  • Replaced the inline BoxelDropdown-based selection trigger in boxel-ui CardHeader with the shared <SelectionMenu @selectedCount @items @label />.
  • Updated host stack-item to provide selectedCount and an accessible label for the selection trigger.
  • Updated integration/acceptance tests and the card-header usage stub/docs to the new utilityMenu shape and trigger selector ([data-test-selection-dropdown-trigger]).

Reviewed changes

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

Show a summary per file
File Description
packages/boxel-ui/addon/src/components/card-header/index.gts Swaps bespoke selection dropdown trigger for shared SelectionMenu and simplifies the positioning CSS.
packages/host/app/components/operator-mode/stack-item.gts Updates utilityMenu getter to provide selectedCount + accessible label instead of triggerText.
packages/boxel-ui/addon/src/components/card-header/usage.gts Updates the usage example and docs to the new utilityMenu API shape.
packages/boxel-ui/test-app/tests/integration/components/card-header-test.gts Updates the test to assert the new selection trigger selector and utilityMenu shape.
packages/host/tests/acceptance/workspace-delete-multiple-test.gts Updates acceptance test selectors to target the shared selection trigger hook.

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

import Tooltip from '../tooltip/index.gts';

export interface CardHeaderUtilityMenu {
// Accessible name for the trigger; SelectionMenu defaults to the count.
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