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

Fix: Make CSS Grid algorithm correctly apply max width/height and available space when it is the root node #491

Merged

Conversation

nicoburns
Copy link
Collaborator

@nicoburns nicoburns commented May 31, 2023

Objective

Fix bug that causes the CSS Grid algorithm to ignore:

  • Max width/height
  • Available space

when it is the root node.

Context

Feedback wanted

  • General code review
  • Whether the new mechanism for testing different viewport sizes (the top-level available_space parameter passed into compute_layout) makes sense. In future, I'd like to extend this to allow testing multiple viewport sizes in a single test, and potentially to enable this by default across all tests.

@nicoburns nicoburns added the bug Something isn't working label May 31, 2023
@nicoburns nicoburns force-pushed the fix/grid-respect-available-space branch 3 times, most recently from 2955c7c to 3c45374 Compare June 15, 2023 21:59
@nicoburns nicoburns added this to the 0.3.13 milestone Jul 17, 2023
@nicoburns nicoburns force-pushed the fix/grid-respect-available-space branch from 3c45374 to 7e48f23 Compare July 23, 2023 11:53
@nicoburns nicoburns force-pushed the fix/grid-respect-available-space branch 3 times, most recently from 549b513 to be7aeb1 Compare August 13, 2023 18:04
@nicoburns nicoburns marked this pull request as ready for review August 13, 2023 18:09
@nicoburns nicoburns changed the title WIP: Fix: grid respect available space Fix: Make Grid algorithm respect max width/height and available space when it is the root node Aug 13, 2023
@nicoburns nicoburns changed the title Fix: Make Grid algorithm respect max width/height and available space when it is the root node Fix: Make CSS Grid algorithm respect max width/height and available space when it is the root node Aug 13, 2023
@nicoburns nicoburns changed the title Fix: Make CSS Grid algorithm respect max width/height and available space when it is the root node Fix: Make CSS Grid algorithm correctly apply max width/height and available space when it is the root node Aug 13, 2023
@alice-i-cecile alice-i-cecile enabled auto-merge (squash) August 14, 2023 13:14
@nicoburns nicoburns force-pushed the fix/grid-respect-available-space branch from be7aeb1 to cb7596b Compare August 14, 2023 14:19
@alice-i-cecile alice-i-cecile merged commit 9958624 into DioxusLabs:main Aug 14, 2023
@nicoburns nicoburns deleted the fix/grid-respect-available-space branch August 14, 2023 14:23
nicoburns added a commit that referenced this pull request Aug 14, 2023
…ilable space when it is the root node (#491)

* Add viewport control to gentest setup

* Add tests for max-width and available space on a CSS Grid root node

* Only treat definite available grid space as indefinite when container size
is indefinite, and only do so for the final two track sizing steps.
nicoburns added a commit that referenced this pull request Aug 14, 2023
…ilable space when it is the root node (#491)

* Add viewport control to gentest setup

* Add tests for max-width and available space on a CSS Grid root node

* Only treat definite available grid space as indefinite when container size
is indefinite, and only do so for the final two track sizing steps.
nicoburns added a commit that referenced this pull request Aug 14, 2023
…ilable space when it is the root node (#491)

* Add viewport control to gentest setup

* Add tests for max-width and available space on a CSS Grid root node

* Only treat definite available grid space as indefinite when container size
is indefinite, and only do so for the final two track sizing steps.
nicoburns added a commit that referenced this pull request Aug 14, 2023
…ilable space when it is the root node (#491)

* Add viewport control to gentest setup

* Add tests for max-width and available space on a CSS Grid root node

* Only treat definite available grid space as indefinite when container size
is indefinite, and only do so for the final two track sizing steps.

(cherry picked from commit 9958624)
nicoburns added a commit that referenced this pull request Aug 14, 2023
…ilable space when it is the root node (#491)

* Add viewport control to gentest setup

* Add tests for max-width and available space on a CSS Grid root node

* Only treat definite available grid space as indefinite when container size
is indefinite, and only do so for the final two track sizing steps.

(cherry picked from commit 9958624)
nicoburns added a commit that referenced this pull request Aug 14, 2023
…ilable space when it is the root node (#491)

* Add viewport control to gentest setup

* Add tests for max-width and available space on a CSS Grid root node

* Only treat definite available grid space as indefinite when container size
is indefinite, and only do so for the final two track sizing steps.

(cherry picked from commit 9958624)
nicoburns added a commit that referenced this pull request Aug 14, 2023
…ilable space when it is the root node (#491)

* Add viewport control to gentest setup

* Add tests for max-width and available space on a CSS Grid root node

* Only treat definite available grid space as indefinite when container size
is indefinite, and only do so for the final two track sizing steps.

(cherry picked from commit 9958624)
nicoburns added a commit that referenced this pull request Aug 14, 2023
…ilable space when it is the root node (#491)

* Add viewport control to gentest setup

* Add tests for max-width and available space on a CSS Grid root node

* Only treat definite available grid space as indefinite when container size
is indefinite, and only do so for the final two track sizing steps.

(cherry picked from commit 9958624)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants