Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FrameGrid: relationship of frame property to resulting layout is not obvious #86

Open
airtonix opened this issue Feb 17, 2023 · 1 comment
Assignees
Labels
question Further information is requested

Comments

@airtonix
Copy link

Description

Trying to work this out through playing with it.

https://naver.github.io/egjs-grid/storybook/?path=/story/examples-framegrid--frame-grid-template
image

  • default says 1,1,2,2,3,3,2,2,4,4,4,5 but when i put that in, there's a storybook form validation error (the input field is red) and nothing is rendered
  • when i change it to [[1,1,2,2,3,3],[2,2,4,4,4,5]] then it renders

Looking at the resulting output
image

edit it just dawned on my that you're using frame to define named grid slots:

https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template


Steps to check or reproduce

@malangfox malangfox self-assigned this Feb 18, 2023
@malangfox malangfox added the question Further information is requested label Feb 18, 2023
@malangfox
Copy link
Contributor

Hello @airtonix.

In [[1,1,2,2,3,3],[2,2,4,4,4,5]] you gave as an example, it seems that the frames with index 2 are not adjacent to each other.
We recommend using it with [[1,1,2,2,3,3],[4,4,5,5,5,6]]. If you do, the items will be in the correct order.

The demo you left as a link shows 10 items.
After 6 items are displayed according to the rules, only 4 items below will be displayed according to the rules.
There seems to be no problem with this behavior. How about setting the non-adjacent frame indexes differently?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants