adafruit / adafruit/Adafruit_CircuitPython_DisplayIO_Layout
Suggestions based on current status.
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 13
- Forks
- 16
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
@FoamyGuy @kmatch98 Thank you so much for writing this! It made my project much simpler. Here are a few thoughts!
For context, I am currently working with [this file](https://gist.github.com/FoamyGuy/3d5826ede385554b54175b66c624113a).
The project I am using it in can be found [here](https://github.com/kattni/light_box/blob/main/light_box.py).
In terms of `add_sub_view`:
* The naming of the function `add_sub_view` doesn't make it clear to me what it's doing - the example did that. I do not know, however, from where the name was derived, so it could be a `displayio` thing, in which case proceed as is. Really, I am unclear on what the concept of a `view` is - this may be a concept I'm simply unfamiliar with in which case education will resolve the issue. Otherwise, consider a naming change to make things more clear.
* Along those lines, `view` could be clearer. That or we supplement with excellent documentation. :)
* `view_grid_size` should default to `(1, 1)` as that seems like a sane default. It would significantly shorten up a basic constructor.
In the `GridLayout` constructor:
* `child_padding` could be more clearly named, I had to mess with it to figure out what it did, and I'm still not sure I really know.
* `max_children` could default to the grid size `x` * `y`.
* Looking at it, I'm wondering what `child_padding` does versus what setting `x` and `y` do?
Feature requests:
* I would appreciate a way to nudge or "pad" columns or rows. I did it initially by adding spaces into all of the text elements, then went back and created a grid that included empty columns as padding. Basically I have a column on each side of the display that is only a few characters wide, and the ones in the middle are much wider. So I "padded" it with empty columns. The results were successful, but I'm wondering if there's some way to control subsections of the grid without making everything a lot more complicated. (That last bit is important!)
These are the things that occurred to me while using the version linked above in a project. I'm sure I'll come up with more as we work through it!
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Start by reviewing the linked gist and light_box.py example, then inspect how add_sub_view and GridLayout currently expose view_grid_size, child_padding, and max_children. The issue contains several naming, default, documentation, and layout-padding ideas, so first narrow it to one agreed change; done should be defined for that selected request before implementation.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- design, embedded-iot
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100