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: floating vue hydration mismatch #3526

Merged
merged 1 commit into from
Mar 21, 2024

Conversation

connoratrug
Copy link
Contributor

@connoratrug connoratrug commented Mar 20, 2024

The VDropdown component from the floating-vue lib results in a hydration errors due to the way the lib edits the dom issue is reported: Akryum/floating-vue#1006

Workaround implemented as proposed in: Akryum/floating-vue#1006 (comment)

how to test:

  • load nuxt app page that contains VDropdown component in dev mode before this pr and check the console log; lots of warnings about hydration mismatch in vdropdown ( popper )
    something like: Screenshot 2024-03-20 at 14 53 02

  • load nuxt app page that contains VDropdown component in dev mode from pr and check the console log; hydration error related to vdropdown should be gone

todo:

  • updated docs in case of new feature
  • added tests

The VDropdown component from the floating-vue lib results in a hydration errors due to the way the lib edits the dom
issue is reported: Akryum/floating-vue#1006

Workaround implemented as proposed in: Akryum/floating-vue#1006 (comment)
Copy link

sonarcloud bot commented Mar 20, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link
Contributor

@davidruvolo51 davidruvolo51 left a comment

Choose a reason for hiding this comment

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

Looks good. I'm able to reproduce this locally. The hydration warnings for <VDropdown> are gone.

I get one hydration warning when the <MainNavigation> is loaded. The <VMenu> component is used here instead. Could the same fix apply here?

@connoratrug
Copy link
Contributor Author

Looks good. I'm able to reproduce this locally. The hydration warnings for <VDropdown> are gone.

I get one hydration warning when the <MainNavigation> is loaded. The <VMenu> component is used here instead. Could the same fix apply here?

o yea good catch , i'll merge this and create a new pr , if these warnings are gone it will be easer to see other warnings , and i'll try to do a search for all the V.... components that might have similar issues , not sure of all of the floating vue components use the generated id ( that leads to the warning)

@connoratrug connoratrug merged commit b5f364c into master Mar 21, 2024
5 checks passed
@connoratrug connoratrug deleted the fix/floating-vue-hydration-mismatch branch March 21, 2024 08:39
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.

None yet

2 participants