Skip to content

feat(core+prompts): Refactoring of the frame renderer #302

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

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

Conversation

MacFJA
Copy link
Contributor

@MacFJA MacFJA commented Apr 17, 2025

Extract the rendering function from Prompt class into a reusable function.

The goal is to provide a function to easily renderer a frame (with partial re-rendering).


Update spinner prompt to use the new function

Copy link

changeset-bot bot commented Apr 17, 2025

⚠️ No Changeset found

Latest commit: 121a3ee

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

pkg-pr-new bot commented Apr 17, 2025

@example/basic@example/changesets

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

commit: 63037c1

@43081j
Copy link
Collaborator

43081j commented Apr 18, 2025

the idea here is good, to clean up some duplicated logic. but i think our prompts are too varied in how they render right now

this "renderer" probably should handle a whole bunch of other behaviours, which may mean it should even be a class, etc

i'm not sure we should land this as it is, and should spend some time reading into how the other prompts render first. otherwise we basically extracted the logic spinner needs and not much else.

e.g taskLog has logic for a windowed buffer, which could be an option of a renderer instance.

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.

2 participants