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: Auto adjust board size to fit children components if width/height isn't provided #599

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

Conversation

AbhinavTheDev
Copy link

/claim #562
Fixes #562

Copy link

vercel bot commented Feb 7, 2025

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

Name Status Preview Comments Updated (UTC)
tscircuit-core-benchmarks ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 9, 2025 11:59am

const newProps = getBoardSize(this._parsedProps, this.children)
// console.log("newProps",newProps);
if (newProps) {
this._parsedProps = newProps
Copy link
Contributor

Choose a reason for hiding this comment

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

? you're still setting _parsedProps, which is immutable

Copy link
Contributor

@seveibar seveibar left a comment

Choose a reason for hiding this comment

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

you're not allowed to change props, you cannot change props (in any way)

you can create a function like board.getSize() and refactor the code to not use props where it would normally be getting the width/height or whatever

you can't change props, props are the user input, you can create new variables etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automatically adjust board size to fit children components if width/height isn't provided
2 participants