add a layout debug mode that sets background colors
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
Throwing this up for initial feedback, will complete docs and tests once things are looking good.
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 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.
The CI failure isn't anything to be concerned about - it's a recently introduced intermittent failure (#3016).
@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. :)
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?
Superseded by #3600