Skip to content

fix: trim lines from correct end#532

Open
43081j wants to merge 1 commit intomainfrom
limitations-of-optionations
Open

fix: trim lines from correct end#532
43081j wants to merge 1 commit intomainfrom
limitations-of-optionations

Conversation

@43081j
Copy link
Copy Markdown
Collaborator

@43081j 43081j commented May 8, 2026

What does this PR do?

This changes the limit-options logic such that we trim lines from the
end of the list we're dealing with.

For example, if we know we are already going to render a top ellipsis,
we should trim the preceding lines (top of the list) until we can fit on
screen.

Similarly, if we are rendering a bottom ellipsis, do the same for
following lines.

If there's currently no ellipsis, we trim the following lines, then the
preceding lines. This particular part can be improved one day in a
follow up.

On top of this, correct wrapping has been added for the group
multi-select prompt's options.

Type of change

  • Bug fix
  • Feature
  • Refactor (no behavior change)
  • Documentation
  • Performance improvement
  • Tests
  • Chore (dependencies, CI, tooling)

Checklist

  • pnpm test passes (or targeted tests for my change)
  • pnpm format has been run
  • I have added/updated tests for my changes (if applicable)
  • I have added a changeset

AI-generated code disclosure

  • This PR includes AI-generated code

This changes the limit-options logic such that we trim lines from the
end of the list we're dealing with.

For example, if we know we are already going to render a top ellipsis,
we should trim the preceding lines (top of the list) until we can fit on
screen.

Similarly, if we are rendering a bottom ellipsis, do the same for
following lines.

If there's currently no ellipsis, we trim the following lines, then the
preceding lines. This particular part can be improved one day in a
follow up.

On top of this, correct wrapping has been added for the group
multi-select prompt's options.
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 8, 2026

🦋 Changeset detected

Latest commit: 9843012

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
Copy Markdown

pkg-pr-new Bot commented May 8, 2026

commit: 9843012

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.

1 participant