Closed bow closed 1 year ago
My apologies to you, Box, for interjecting in your issue problems as defined here, as I am also encountering problems with the grid control. I am having the same/similar problems with grid control items not maintaining their dimension size integrity. Especially, when the grid has a column of 3 x 4 boxes placed with it. It does not seem to matter what dimension variations are placed within it, the grid control seems to be limited to having only 9 boxes placed within it. - Even then, there are "severe" size limitations to the box dimensions, otherwise everything becomes unstable. More importantly, the boxes then can only be set at a size where they are not practical to be used.
I have tested your code in Windows 10. My terminal has 237 columns, as seen here:
Lines: 9001
Columns: 237
Keyboard rate: 31
Keyboard delay: 1
Code page: 850`
Everything displays correctly.
@bow Indeed, the Grid
component did not resolve overlapping grid items correctly. This should be fixed with the latest commit.
@WhipMeHarder If your problem persists after this bugfix, please open a separate issue, along with demo code to reproduce it.
Thanks a lot @rivo. I can confirm the problem does not occur anymore with that commit.
I am encountering a problem with how grids handle different screen sizes. When grids contain other containers (e.g. other grids or flex containers), it seems to respond to the screen size only intermittently. That is, sometimes it shows the correct items, sometimes it show items meant for other sizes.
My starting point is the
grid
demo. I can run that perfectly fine; the visible items do change based on my terminal size. I am running on Linux, using Alacritty version 0.12.3.The problem then showed up when running the following code:
The problem showed up when running the code in a terminal wider than 150 columns (the
minGridWidth
value set above):Wide
boxes) are rendered.h
) multiple times. Sometimes the narrow layout will be shown instead.There is also another case, that is when resizing from a smaller terminal to a larger one. This, too, sometimes results in the narrow layout being rendered.
I could not reproduce these two problems with the
demos/grid/main.go
file. There, all the components are always rendered correctly. This lead me to think that it is the flex containers being nested inside a grid that is the problem (the demo file nests non-containers instead). However, I am not sure if this is it nor how to fix / work around this.Any pointers and / or suggestions?
(P.S. Thanks for developing
tview
by the way!)