Skip to content
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

feat!: use a giant multiselect instead of individual toggles for features #695

Merged
merged 12 commits into from
Mar 7, 2025

Conversation

haoqunjiang
Copy link
Member

@haoqunjiang haoqunjiang commented Feb 18, 2025

As we are adding more features, the number of toggles is getting out of hand. A multiselect could save a few keystrokes for most users.

I also take this opportunity to change the prompts library to @clack/prompts.
(For context: create-astro, sv, create-preact, create-solid, create-qwik all use @clack/prompts, create-vite recently switched to @clack/prompts too, while create-next-app uses prompts)

The color library is changed to picocolors. IMO kleur is still the smaller library because of treeshaking. But @clack/prompts already comes with picocolors as a dependency, so by not adding kleur, we save a few bytes.


This is a proof-of-concept PR. I haven't put much consideration into the code style yet. Nor have I updated the i18n messages. I will do that if this change is accepted.

See the result in a screen recording:
asciicast

TODOs:

  • Clean up the code (wrap the isCancel condition; update the needsEslint type, etc.)
  • I think we should remove the packageName related logic but it can be postponed into another PR
  • Get the message translations reviewed

…ures

As we are adding more features, the number of toggles is getting out of hand.
A multiselect could save a few keystrokes for most users.

I also take this opportunity to change the prompts library to `@clack/prompts`.
The color library is changed to `picocolors`. IMO `kleur` is still the smaller
library because of treeshaking. But `@clack/prompts` already comes with
`picocolors` as a dependency, so by not adding `kleur`, we save a few bytes.

This is a proof-of-concept change. I haven't put much consideration into the
code style yet. Nor have I updated the i18n messages. I will do that if this
change is accepted.

See the result in a screen recording:
[![asciicast](https://asciinema.org/a/lPaZSGz9LTd7mcWZeJAZxerhx.svg)](https://asciinema.org/a/lPaZSGz9LTd7mcWZeJAZxerhx)
… ci]

Still much work to do. But it's acdceptable for now.
Copy link
Member

@cexbrayat cexbrayat left a comment

Choose a reason for hiding this comment

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

Looks good, I like the idea 👍

@haoqunjiang haoqunjiang marked this pull request as ready for review February 28, 2025 10:14
@haoqunjiang
Copy link
Member Author

haoqunjiang commented Feb 28, 2025

I think this PR is ready for review. I can confirm the flags parsing behavior is exactly same, but I can only manually test the prompt parsing, so far it seems good.

@cexbrayat @btea Do the new prompt messages look good to you?
If so, would you please help review the French translation of the new messages @cexbrayat ? They were translated by Claude 3.5 Sonnet, I'm not sure if I can trust it.

Copy link
Collaborator

@btea btea left a comment

Choose a reason for hiding this comment

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

LGTM

@haoqunjiang
Copy link
Member Author

Merging this PR now as I'm going to do another round of dependency maintenance and release a new version tomorrow.

@haoqunjiang haoqunjiang merged commit 3aaddc6 into vuejs:main Mar 7, 2025
52 checks passed
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.

3 participants