toga icon indicating copy to clipboard operation
toga copied to clipboard

add a layout debug mode that sets background colors

Open aerickson opened this issue 1 year ago • 6 comments

Makes debugging Toga's layout system easier by visually indicating container boundaries. See https://github.com/beeware/toga/issues/2856.

features:

  • randomized background color (using colors optimized for color-blindness) for boxes
  • enabled via TOGA_DEBUG_LAYOUT env var

usage:

TOGA_DEBUG_LAYOUT=1 briefcase dev

PR Checklist:

  • [x] All new features have been tested
  • [ ] All new features have been documented
  • [x] I have read the CONTRIBUTING.md file
  • [x] I will abide by the code of conduct

aerickson avatar Nov 15 '24 01:11 aerickson

Throwing this up for initial feedback, will complete docs and tests once things are looking good.

aerickson avatar Nov 15 '24 01:11 aerickson

I know this is still marked as a draft, but I couldn't help myself providing some initial feedback. tl;dr - this is all looking very promising; with a couple of fairly minor tweaks, it should be pretty close to merge-ready.

Awesome. :)

I think I've addressed all of the comments. Thank you both.

aerickson avatar Dec 04 '24 07:12 aerickson

@aerickson Happy to give this another review; but it's currently showing a merge conflict that needs to be resolved. Also, you can flick this over to "ready for review" if you think it's ready.

freakboy3742 avatar Dec 04 '24 23:12 freakboy3742

The CI failure isn't anything to be concerned about - it's a recently introduced intermittent failure (#3016).

freakboy3742 avatar Dec 04 '24 23:12 freakboy3742

@aerickson Happy to give this another review; but it's currently showing a merge conflict that needs to be resolved. Also, you can flick this over to "ready for review" if you think it's ready.

Changed to 'ready for review'. Rebased.

The CI failure isn't anything to be concerned about - it's a recently introduced intermittent failure (#3016).

OK, thanks. :)

aerickson avatar Dec 05 '24 00:12 aerickson

Where would you like this documented?

https://toga.readthedocs.io/en/stable/how-to/topics/layout.html (aka docs/how-to/topics/layout.rst) maybe?

aerickson avatar Dec 05 '24 00:12 aerickson

Superseded by #3600

HalfWhitt avatar Jul 04 '25 03:07 HalfWhitt