-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feat: Grid tiles automatically size to fill grid #186
Conversation
7f2940a
to
b1baefc
Compare
Previously axes elements would use absolute positioning, and the svg container would not effect sizing. This caused issues with dynamic grid tile sizes and caused the verification grid to overflow its container creating scrollbars on the host application
This reverts commit da7a414.
This reverts commit e324c2e.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
while reviewing I checked out the code and did some interactive testing. It's hard to describe what is going on, but on more than one occasion I managed to cause the tab to lock up (in i'm assuming what was an infinite loop of some kind).
We also need some indication to the user that their desired grid size is being ignored. I.e. if I set grid-size to 32 a but am only showed 12 items then that's confusing. One way to do this would be to set a maximum (and maybe issue a notice) on the grid-size ui. Another way could be to show the desired size and the current limit on the slider (again with a warning about not being able to show the requested amount).
This is some really great work, but we need another pass for reliability and edge cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Close. So close.
We talked offline about how this does not handle scenarios where the aspect ratio looks terrible, but the next candidate is not triggered because everything fits and target grid size in the only thing considered.
this.intersectionObserver.observe(this.slotWrapper); | ||
this.intersectionObserver.observe(this.contentsWrapper); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why observing both?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…tics/web-components into dynamic-grid-tile-sizes
Feat: Grid tiles automatically size to fill grid
A short description of the pull request
Changes
Features
display: grid
layout--rows
and--columns
css variables (e.g.<oe-verification-grid style="--rows: 6; --collumns: 3;" />
(this comes for free and required no extra effort)oe-verification-grid
elementoe-verification-grid-tile
components can now advertise if they are overflowing from the verification gridBug Fixes
Code Quality
oe-verification-grid
's container to be a flex column instead of flex row. Better reflecting it's function of a container with elements of variable heightoe-verification-grid
container is now a flex column instead of flex rowVisual Changes
Screenshots of the verification grid at different device sizes can be found here
Related Issues
Fixes: #167
Fixes: #150
Fixes: #146
Fixes: #147
Fixes: #165
Final Checklist
pnpm lint
runs without any errorspnpm test
runs without any errors