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

Recent searches on mobile cause client-server mismatch #473

Closed
obulat opened this issue Jan 3, 2023 · 0 comments · Fixed by #2188
Closed

Recent searches on mobile cause client-server mismatch #473

obulat opened this issue Jan 3, 2023 · 0 comments · Fixed by #2188
Assignees
Labels
💻 aspect: code Concerns the software code in the repository 🛠 goal: fix Bug fix 🟨 priority: medium Not blocking but should be addressed soon 🧱 stack: frontend Related to the Nuxt frontend

Comments

@obulat
Copy link
Contributor

obulat commented Jan 3, 2023

Description

The Recent searches on mobile cause client-server mis-match and re-rendering.

Reproduction

  1. Open the `new header` version of the search on a mobile screen.
  2. See warnings in the console.

Screenshots

Parent:  
<ul id="recent-searches-list" role="listbox" aria-label="Recent searches">
[vue.common.dev.js:6908](webpack:///node_modules/.pnpm/vue@2.7.10/node_modules/vue/dist/vue.common.dev.js)
Mismatching childNodes vs. VNodes:  
NodeList [ li#option-0.description-regular.my-1.rounded-sm.border-1.5.p-2.hover:bg-dark-charcoal-10.border-tx
 ]
 
Array(4) [ {…}, {…}, {…}, {…} ]
[vue.common.dev.js:6909](webpack:///node_modules/.pnpm/vue@2.7.10/node_modules/vue/dist/vue.common.dev.js)
[Vue warn]: The client-side rendered virtual DOM tree is not matching server-rendered content. This is likely caused by incorrect HTML markup, for example nesting block-level elements inside <p>, or missing <tbody>. Bailing hydration and performing full client-side render.

Additional context

We should wrap the Recent searches component in the mobile header in a ClientOnly component.

@obulat obulat added 🟨 priority: medium Not blocking but should be addressed soon 🛠 goal: fix Bug fix 💻 aspect: code Concerns the software code in the repository labels Jan 3, 2023
@obulat obulat changed the title <Replace this with actual title> Recent searches on mobile cause client-server mismatch Jan 3, 2023
@obulat obulat transferred this issue from WordPress/openverse-frontend Feb 22, 2023
@obulat obulat added the 🧱 stack: frontend Related to the Nuxt frontend label Feb 22, 2023
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Openverse Backlog Feb 23, 2023
@obulat obulat self-assigned this May 25, 2023
@obulat obulat moved this from 📋 Backlog to 🏗 In progress in Openverse Backlog May 25, 2023
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Openverse Backlog May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💻 aspect: code Concerns the software code in the repository 🛠 goal: fix Bug fix 🟨 priority: medium Not blocking but should be addressed soon 🧱 stack: frontend Related to the Nuxt frontend
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant