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

Handling fixed position and refactoring validation #61

Merged
merged 15 commits into from
Dec 21, 2022
Merged

Conversation

sanajaved7
Copy link
Contributor

Description

  • Refactoring validation to use floating-ui's getOffsetParent method to get the correct containing block
  • Notable differences with floating-ui methods: they are asynchronous and the window object is returned in certain paths so we updated our logic, specifically when looking for the initial containing block and going up the containing block chain to account for this)
  • For testing this new asynchronous approach, I reworked the tests to be able to use the floating-ui methods and give enough time to wait for the validation to take place

@netlify
Copy link

netlify bot commented Dec 15, 2022

Deploy Preview for anchor-polyfill ready!

Name Link
🔨 Latest commit e63368f
🔍 Latest deploy log https://app.netlify.com/sites/anchor-polyfill/deploys/63a37a6cb51152000877d425
😎 Deploy Preview https://deploy-preview-61--anchor-polyfill.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@sanajaved7 sanajaved7 requested review from jgerigmeyer and removed request for jgerigmeyer December 15, 2022 11:58
@oddbird oddbird deleted a comment from netlify bot Dec 15, 2022
src/parse.ts Outdated Show resolved Hide resolved
src/validate.ts Outdated Show resolved Hide resolved
src/validate.ts Outdated Show resolved Hide resolved
src/validate.ts Outdated Show resolved Hide resolved
src/validate.ts Outdated Show resolved Hide resolved
src/validate.ts Outdated Show resolved Hide resolved
src/validate.ts Outdated Show resolved Hide resolved
jgerigmeyer and others added 4 commits December 15, 2022 15:37
* main:
  Use env vars to disable WPT result builds
Updating comments

Co-authored-by: Jonny Gerig Meyer <jonny@oddbird.net>
Updating function that's no longer async

Co-authored-by: Jonny Gerig Meyer <jonny@oddbird.net>
* main:
  Fix automatic WPT comment
  Run WPTs against browserslist
  clean up header styles
  wip header grid
  Update comment
  Specify the target repo
  Single quotes?
  Use the PR opened event
  Missing token
  Add link to WPT report
  move z index
  linting
  applied suggestions: stack button and nav, remove button from nav, add z-index
  linting
  remove change to tests
  header sticky and button moved to top
@sanajaved7
Copy link
Contributor Author

Copy link
Member

@jgerigmeyer jgerigmeyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sanajaved7 Nice work! Do you think it's worth adding a fixed-position demo, or can we point to a WPT test to demonstrate that this works? I was hoping this would fix the failing anchor-position-003.html test, but it doesn't seem to. 😕

src/validate.ts Outdated Show resolved Hide resolved
src/validate.ts Outdated Show resolved Hide resolved
src/validate.ts Outdated Show resolved Hide resolved
src/validate.ts Outdated Show resolved Hide resolved
src/validate.ts Outdated Show resolved Hide resolved
Copy link
Member

@jgerigmeyer jgerigmeyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great -- and thanks for fixing that WPT! 🎉

@jgerigmeyer jgerigmeyer merged commit 31ec612 into main Dec 21, 2022
@jgerigmeyer jgerigmeyer deleted the fixed-position branch December 21, 2022 21:40
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.

2 participants