Grid layout
- Dominant language
- Python
- Stars
- 5.4k
- Forks
- 827
- Avg merge
- 9h 45m
- Merged PRs (30d)
- 58
Description
### What is the problem or limitation you are having?
The Pack layout is nice, but sometimes you want a table-like layout.
A good example is a form, with labels on the left and input widgets on the right.
The labels should only take as much space as they require, and the input widgets should be left aligned.
### Describe the solution you'd like
A Grid widget that resembles the CSS Grid specification.
This will mean adapting the pack algorithm.
### Describe alternatives you've considered
1. A simpler Grid that does not try to follow the CSS Grid spec. Something that just lays out widgets in rows and columns, with colspans or rowspans. This would probably already cover most use cases.
2. A separate Grid layout from Pack (e.g. specified in a widget as `style=Grid(...)`. This would avoid further complexity in the pack algorithm. But a refactoring of pack.py would probably be required to maximise code reuse.
### Additional context
_No response_
Contributor guide
Research direction
Start by reading pack.py, then compare the proposed CSS Grid-like design with the simpler rows-and-columns alternative and the separate Grid layout option described in the issue. Done requires an agreed scope and API for a Grid widget or layout that supports the table-like form arrangement without leaving the implementation direction unresolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100