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

Layout debugging #3314

Closed
2 tasks done
wcarmon opened this issue Oct 7, 2022 · 4 comments
Closed
2 tasks done

Layout debugging #3314

wcarmon opened this issue Oct 7, 2022 · 4 comments
Assignees
Labels
blocker Items that would block a forthcoming release

Comments

@wcarmon
Copy link
Contributor

wcarmon commented Oct 7, 2022

Checklist

  • I have searched the issue tracker for open issues that relate to the same feature, before opening a new one.
  • This issue only relates to a single feature. I will open new issues for any other features.

Is your feature request related to a problem?

Please advise on how to debug layout issues.

For example, in chrome, the developer tools show a widget tree, allow you to click a widget to find it in the tree, allow you to see a box model for margin & padding.

Is it possible to construct a solution with the existing API?

I'm open to ideas and happy to implement

Describe the solution you'd like to see.

Perhaps there is some way to do something basic with borders and click events?

@andydotxyz andydotxyz added this to the Dalwhinnie (early 2023) milestone Oct 13, 2022
@andydotxyz
Copy link
Member

Great idea, let's figure out how we can get this in on v2.4.0.
Perhaps boxes around everything in some debug mode? Hover or ctrl-hover to show a widget?
Or maybe something more low-level like logging the widget tree, or opening an inspector window?

@Bluebugs
Copy link
Contributor

Inspector are great tool. It seems common in the go ecosystem to have a "service" exporting a remote API under certain circumstances that a tool can connect to and explore. What do you think of exporting the widget tree live over http to an inspector tool? With maybe the ability to highlight a specific widget from the inspector tool. This would enable debugging layout also on device and not just on the same machine.

@andydotxyz
Copy link
Member

That is one approach, and what it enables would be very useful.
Debugging layout is a big feature - though I wonder if we can make use of the ability to JSON convert the tree that is already in. Whichever route we take it should be consistent so only one approach to tree debug is maintained.

@andydotxyz andydotxyz added the blocker Items that would block a forthcoming release label Jan 9, 2023
@andydotxyz andydotxyz self-assigned this May 15, 2023
@andydotxyz andydotxyz mentioned this issue May 24, 2023
3 tasks
@andydotxyz
Copy link
Member

First pass for visual inspection now landed - on develop do "go run -tags debug ." to see.
Follow on work could expand on this - let's track in new tickets though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker Items that would block a forthcoming release
Projects
None yet
Development

No branches or pull requests

3 participants