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

Debug view #50

Open
saitonakamura opened this issue Aug 9, 2021 · 3 comments
Open

Debug view #50

saitonakamura opened this issue Aug 9, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@saitonakamura
Copy link
Sponsor Collaborator

saitonakamura commented Aug 9, 2021

What is the best way to debug why Boxes/children ended in places where they ended. I'm trying yo understand what gone wrong in my markup and having wireframe of flex container/highlight of the margins would be very helpful. But I don't understand how to do this properly (because of center anchor, for instance you can't set this on a flex). Is there any example I can look up?

For instance I can do this, but I can't really figure out whether it mesh inside flex positioned incorrectly or items themselves
https://codesandbox.io/s/eager-elgamal-hbqz3?file=/src/index.tsx

@saitonakamura
Copy link
Sponsor Collaborator Author

Ok, I think I got, I needed centerAnchor on a box (since it uses native three geometries). But it will still be nice to have this built-in

@talentlessguy talentlessguy added the enhancement New feature or request label Aug 9, 2021
@ChrisCrossCrash
Copy link
Contributor

I was going to make a new issue for exactly this! It would be very helpful if you could just put a debug prop in the root Flex element. Something like this:

<Flex debug>
   ...
</Flex>

Then it would put wireframes around all the elements and flex containers. It could also show the anchors.

I've been trying to learn this library all day today, but it has been very difficult because there isn't an easy way to visualize the flex layout.

@proelf98
Copy link

Yes would love it. Would it be possible to set a material to the Container?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants