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

Refactor: break out non-React hook helper to calculate Kcl expression value #4905

Closed

Conversation

franknoirot
Copy link
Collaborator

@franknoirot franknoirot commented Jan 3, 2025

Currently we have a nice powerful hook called useCalculateKclExpression which does many things, including computing the final value of a KCL expression given the expression as string and all the available values in program memory for the current file.

This breaks that out into a lib function, so that it can be used in non-React contexts. For the purposes of #4442, I'm going to use this function to get each operation's KCL-type arguments into a format that the command palette can consume, because we are given the source range of the argument to splice it out as a string.

Copy link

qa-wolf bot commented Jan 3, 2025

QA Wolf here! As you write new code it's important that your test coverage is keeping up.
Click here to request test coverage for this PR!

Copy link

vercel bot commented Jan 3, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
modeling-app ✅ Ready (Inspect) Visit Preview Jan 3, 2025 4:30pm

@franknoirot franknoirot marked this pull request as ready for review January 3, 2025 16:18
@franknoirot franknoirot marked this pull request as draft January 3, 2025 17:31
@franknoirot franknoirot closed this Jan 6, 2025
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