Skip to content

Conversation

@43081j
Copy link
Collaborator

@43081j 43081j commented Mar 29, 2025

Adds a selectableGroups boolean flag which can be used to disallow selecting groups.

This basically just skips over them when using up/down, but still renders when they are "selected" (by selecting all the children individually).

Adds a `selectableGroups` boolean flag which can be used to disallow
selecting groups.

This basically just skips over them when using up/down, but still
renders when they are "selected" (by selecting all the children
individually).
@changeset-bot
Copy link

changeset-bot bot commented Mar 29, 2025

🦋 Changeset detected

Latest commit: e85b846

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

This PR includes changesets to release 2 packages
Name Type
@clack/prompts Patch
@clack/core 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

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 29, 2025

Open in Stackblitz@example/basic@example/changesets

npm i https://pkg.pr.new/bombshell-dev/clack/@clack/core@255
npm i https://pkg.pr.new/bombshell-dev/clack/@clack/prompts@255

commit: e85b846

Copy link
Member

@natemoo-re natemoo-re left a comment

Choose a reason for hiding this comment

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

Nice, thank you for the PR!

@43081j
Copy link
Collaborator Author

43081j commented Mar 29, 2025

@AdrianGonz97 are you able to take a look at this and let me know if it matches what you have in svelte's fork?

the behaviour is basically that we render everything as before, but you can't select groups if selectableGroups is false.

if you select all the children of a group, it will show as selected. but you can't select it yourself

@43081j
Copy link
Collaborator Author

43081j commented Mar 29, 2025

i see a missing part actually

in the svelte fork, they also render a different prefix depending on if the groups are selectable or not. i'll take a look at that 👍

@43081j
Copy link
Collaborator Author

43081j commented Mar 29, 2025

ok should be the same now

this is how it looks with selectableGroups: false and a full group selected
image

this is how it looks with selectableGroups: true
image

Copy link
Member

@dreyfus92 dreyfus92 left a comment

Choose a reason for hiding this comment

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

james, at first glance it looks good but, i just have a question. would it be necessary to add some tests for this?

@43081j
Copy link
Collaborator Author

43081j commented Mar 30, 2025

Definitely

We are missing quite a few tests so I might add them in a standalone PR first. I'll take a look

@dreyfus92 dreyfus92 merged commit 6868c1c into main Mar 30, 2025
6 checks passed
@dreyfus92 dreyfus92 deleted the selectable-groups branch March 30, 2025 14:16
@natemoo-re natemoo-re added the backport This PR should be cherry-picked onto v0 label Mar 30, 2025
natemoo-re added a commit that referenced this pull request Mar 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR should be cherry-picked onto v0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants