-
Notifications
You must be signed in to change notification settings - Fork 158
feat(autocomplete): add wrapping and window limits #384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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 detectedLatest commit: aa80be9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
|
@example/basic • @example/changesets commit: |
There was a problem hiding this 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 👀
|
ill add the tests before we merge 👍 thanks for reviewing 🙏 |
|
@dreyfus92 i've added tests for autocomplete wrapping and limit-options itself |
| return { lineCount, removals }; | ||
| }; | ||
|
|
||
| export const limitOptions = <TOption>(params: LimitOptionsParams<TOption>): string[] => { |
There was a problem hiding this comment.
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
dreyfus92
left a comment
There was a problem hiding this 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 😁
dreyfus92
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ship it 🫡
Adds two things to the autocomplete prompt:
The limit options helper has become quite a bit more complicated to handle the latter 😬 but that's probably ok.
Fixes #318