Skip to content

Rows in the grid have the wrong height #2774

Closed

Description

@Malte-Neu

Steps To Reproduce

  • Create a board with the size 100x100

  • Activate the grid with rows

  • Configure the grid as following:

    • Rows: 9
    • Type: Top (when selecting the type, the pop-up window is positioned incorrectly.)
    • Height: 10px
    • Gutter: 1px
    • Margin: 0px
  • Create another board with the size 100x100 with the same grid settings, but this time use 50 rows.

Expected behavior

The rows are identical in both views and 10px high.

Actual behavior

The rows of the second grid are much smaller and not the 10px high as defined.
grafik
grafik

It looks like the stretch type is always uses as soon as the rows no longer fit on the board. Changing the type has no effect on the display.

Screenshots or video

No response

Desktop (please complete the following information)

Firefox 108.0.2 (64-Bit)

Smartphone (please complete the following information)

No response

Environment (please complete the following information)

Hosted https://design.penpot.app Version

Frontend Stack Trace

No response

Backend Stack Trace

No response

Additional context

No response

Activity

  1. added
    bugSomething isn't working as expected
    on Jan 13, 2023
  2. myfunnyandy commented on Jan 13, 2023

    @myfunnyandy
    Contributor

    The problem is that there's a collision between some of the settings. There is no way you can have 50 10px height rows separated by 1px in 100px. In this case you can have your height or your rows, but not both. Now rows are prioritized over height, but if we'd find a good reason we might rethink this decision.

  3. Malte-Neu commented on Jan 13, 2023

    @Malte-Neu
    Author

    From my point of view, it doesn't make sense at the moment, stretching only makes sense if I also select the "stretch" type. Otherwise I would like to have just a fixed size and not have to pay attention to whether my lines still fit into the board. My example was slightly over the top to show the effect, if it was only 12 lines you wouldn't see it right away, but the heights are already wrong.

    Especially if you want to create a line-oriented layout you have to take care that you don't specify one line too much.

    From my point of view it would be sufficient that the type is prioritized higher than the number of lines. If you want to make it perfect, you would have to hide certain combinations in the gui. If you select the height "auto", then the type is actually no longer interested. If you choose a certain height, stretch again makes no sense.

  4. myfunnyandy commented on Jan 17, 2023

    @myfunnyandy
    Contributor

    I see your point and agree that preserving the rows amount is not useful in almost any case. I've added an issue at our roadmap and we will change this behaviour: https://tree.taiga.io/project/penpot/issue/4685

    Thank you for taking the time of pointing it out and justifying it.

  5. self-assigned this
    on Jul 5, 2023
  6. added this to the milestone on Jul 5, 2023
  7. linked a pull request that will close this issueBugfixes #3382on Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working as expectedmanaged on taigaThis issue has been moved to our project at Taiga.io

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions