-
Notifications
You must be signed in to change notification settings - Fork 63
Conversation
Storybook and Tailwind configuration previews: Ready Storybook: https://wordpress.github.io/openverse-frontend/_preview/1716 Please note that GitHub pages takes a little time to deploy newly pushed code, if the links above don't work or you see old versions, wait 5 minutes and try again. You can check the GitHub pages deployment action list to see the current status of the deployments. |
Size Change: +3.46 kB (0%) Total Size: 1.36 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The SSR docs for Vue Portal suggest disabling it on the server and only running it on the client side using <no-ssr>
.
I'm all for replacing a custom implementation with a tried and tested library (approving for that) but the docs seem to suggest that our issue with SSR wouldn't go away after the switch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I poked through the portal-vue
code to see what they had to do and it's a bit more involved than the naive approach our implementation had 😅
class="md:block md:truncate md:text-left md:ms-2" | ||
:class="isHeaderScrolled ? 'hidden' : 'block truncate text-left ms-2'" | ||
class="md:block md:truncate md:ms-2 md:text-start" | ||
:class="isHeaderScrolled ? 'hidden' : 'block truncate ms-2 text-start'" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, surprised the change didn't require updating snapshot tests though 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I caught myself using left
and right
classes a couple of days ago 🙈
@dhruvkb, I believe this part of docs refers to the specific (older than Nuxt) implementation, the SSR for Vue. The library also has a Nuxt module, and it works pretty well. At least, I didn't notice errors. |
Fixes
Hopefully:
Fixes #1078 by @ sarayourfriend
Fixes #615 by @ obulat
Fixes #1417 by @ AetherUnbound
Description
This PR replaces the custom implementation of Teleport with
vue-portal
library that hopefully handles the SSR better. The library hasn't been updated for some period of time, but it's probably caused by the fact that Vue 2 is not the default anymore, and Vue3 has a native implementation ofTeleport
.Testing Instructions
Currently, if you look at the CI Playwright tests' log, you'll see a lot of warnings like these:
The CI logs for this PR shouldn't have warnings about deleting portal targets, and the tests should not fail due to crashes.
Checklist
Update index.md
).main
) or a parent feature branch.Developer Certificate of Origin
Developer Certificate of Origin