Skip to content

Conversation

@43081j
Copy link
Collaborator

@43081j 43081j commented Aug 29, 2025

Adds two things to the autocomplete prompt:

  1. Wrapping (in that options can now wrap across multiple lines)
  2. Automatically shrinking the max items displayed if they don't fit on the screen

The limit options helper has become quite a bit more complicated to handle the latter 😬 but that's probably ok.

Fixes #318

Adds two things to the autocomplete prompt:

1. Wrapping (in that options can now wrap across multiple lines)
2. Automatically shrinking the max items displayed if they don't fit on
   the screen

The limit options helper has become quite a bit more complicated to
handle the latter 😬 but that's _probably_ ok.
@changeset-bot
Copy link

changeset-bot bot commented Aug 29, 2025

🦋 Changeset detected

Latest commit: aa80be9

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 Minor
@clack/core Minor

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 Aug 29, 2025

@example/basic@example/changesets

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

commit: aa80be9

@43081j 43081j requested a review from dreyfus92 August 29, 2025 13:55
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.

so good overall. don't forget to add a changeset and if you don't mean to add tests on this one, we should add an issue for later and add them on a new pr 👀

@43081j
Copy link
Collaborator Author

43081j commented Aug 30, 2025

ill add the tests before we merge 👍

thanks for reviewing 🙏

@43081j 43081j mentioned this pull request Sep 5, 2025
@43081j
Copy link
Collaborator Author

43081j commented Sep 15, 2025

@dreyfus92 i've added tests for autocomplete wrapping and limit-options itself

@43081j 43081j requested a review from dreyfus92 September 15, 2025 21:44
return { lineCount, removals };
};

export const limitOptions = <TOption>(params: LimitOptionsParams<TOption>): string[] => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this logic is a bit bonkers so if you want it explaining, feel free to catch me on discord

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.

just a nit, dunno if it TS would yell 😁

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.

ship it 🫡

@43081j 43081j merged commit 55645c2 into main Sep 16, 2025
7 checks passed
@43081j 43081j deleted the autocomplete-wrapperisms branch September 16, 2025 15:48
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.

[Bug] Autocomplete field glitches on navigating up/down

3 participants