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(select): custom option renderer #424

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

adaam2
Copy link

@adaam2 adaam2 commented Oct 4, 2024

Adds the ability to customize the rendering of options for selects & multi-selects via a custom render function. If a custom render function is specified, then this overrides any built-in styles for the options themselves.

Let me know your thoughts

adaam2 added a commit to speakeasy-api/speakeasy that referenced this pull request Nov 25, 2024
This PR adds the ability to bootstrap a new target using a pre-existing
specification hosted on Speakeasy's registry. The CLI will now show the
most recent 5 targets that have been interacted with (based on the CLI
event stream).

If there are any recent target candidates in the workspace, then the
user will be presented with the option to choose from an existing SDK or
create from scratch at the beginning of Quickstart. If there are no
previous generations in a workspace, then the existing "new user" flow
will be shown where the user can enter a filepath to a spec:

![CleanShot 2024-10-07 at 13 46
20@2x](https://github.com/user-attachments/assets/8cc576bc-e0bf-4a56-8ad6-5d5308fb8cae)

Then selecting from the list of recent SDKs:

![CleanShot 2024-10-07 at 13 46
32@2x](https://github.com/user-attachments/assets/6d2b44d3-f93c-4c15-b41f-5e70fb954bea)

(n.b the look and feel of the select list in the 2nd screenshot will
change / look much better once the corresponding
charmbracelet/huh#424 pr has been merged)

The end result is that a new workflow file is created that references
the existing Registry URI for the spec from the previous target

## Next steps

- Try and re-use as much of the prior target's `gen.yaml`
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