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

account for hidden footers, no layout rounding, header track to use minmax #709

Merged
merged 5 commits into from
Oct 25, 2024

Conversation

wibjorn
Copy link
Contributor

@wibjorn wibjorn commented Oct 24, 2024

Fix bug where a hidden footer element would still register a height. Account for a few more small bugfixes too.

  • Layout now always expects a header, but not necessarily a footer, since footers can be rendered within containers too.
  • Stop accounting for rounding in calculations and remove -1px in the --atlas-contained-height property.
  • Stop rounding in the measurements in JS.
  • The header now has a track value of minmax(auto, max-content), which helps when switching between different layouts.

Testing

  1. Visit page. http://localhost:1111/components/layout.html
  2. There should be not up/down scroll on contained layouts on tablet +.
  3. Scroll around, values of atlas-header-visible-height and atlas-footer-visible-height variables should update. When the respective elements go out of view.
  4. If you put "display-none" on the footer and scroll or resize the header height vars should be zero.

Contributor checklist

  • Did you update the description of this pull request with a review link and test steps?
  • Did you submit a changeset? Changesets are required for all code changes.
  • Does your pull request implement complex UI logic (js/ts)? Consider adding an integration test to test your user flow.
  • Does your pull request add a new page to the documentation site? Add your new page for automated accessibility testing in /integration/tests/accessibility.

@wibjorn wibjorn requested a review from a team as a code owner October 24, 2024 18:41
Copy link

changeset-bot bot commented Oct 24, 2024

🦋 Changeset detected

Latest commit: 21f2bcf

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@microsoft/atlas-css Patch
@microsoft/atlas-js Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@wibjorn wibjorn marked this pull request as draft October 24, 2024 18:54
@wibjorn wibjorn marked this pull request as ready for review October 24, 2024 22:52
@wibjorn wibjorn changed the title account for hidden footers, remove unnecessary rounding account for hidden footers, no layout rounding, header track to use minmax Oct 24, 2024
@wibjorn wibjorn merged commit 6de95c8 into main Oct 25, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants