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(ssr): render hidden correctly #13125

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

chirokas
Copy link
Contributor

@chirokas chirokas commented Mar 31, 2025

Add support for hidden="until-found"

This PR fixes the issue where Vue treats the hidden attribute as a boolean, causing "until-found" to be incorrectly rendered.

export const isBooleanAttr: (key: string) => boolean = /*@__PURE__*/ makeMap(
specialBooleanAttrs +
`,async,autofocus,autoplay,controls,default,defer,disabled,hidden,` +

Example

Copy link

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 100 kB 38.1 kB 34.4 kB
vue.global.prod.js 158 kB 58.3 kB 51.9 kB

Usages

Name Size Gzip Brotli
createApp (CAPI only) 46.4 kB 18.2 kB 16.6 kB
createApp 54.4 kB 21.2 kB 19.4 kB
createSSRApp 58.6 kB 22.9 kB 20.9 kB
defineCustomElement 59.2 kB 22.7 kB 20.7 kB
overall 68.5 kB 26.4 kB 24 kB

Copy link

pkg-pr-new bot commented Mar 31, 2025

Open in Stackblitz

@vue/compiler-core

npm i https://pkg.pr.new/@vue/compiler-core@13125

@vue/compiler-dom

npm i https://pkg.pr.new/@vue/compiler-dom@13125

@vue/compiler-sfc

npm i https://pkg.pr.new/@vue/compiler-sfc@13125

@vue/compiler-ssr

npm i https://pkg.pr.new/@vue/compiler-ssr@13125

@vue/reactivity

npm i https://pkg.pr.new/@vue/reactivity@13125

@vue/runtime-core

npm i https://pkg.pr.new/@vue/runtime-core@13125

@vue/runtime-dom

npm i https://pkg.pr.new/@vue/runtime-dom@13125

@vue/server-renderer

npm i https://pkg.pr.new/@vue/server-renderer@13125

@vue/shared

npm i https://pkg.pr.new/@vue/shared@13125

vue

npm i https://pkg.pr.new/vue@13125

@vue/compat

npm i https://pkg.pr.new/@vue/compat@13125

commit: 1d1ae00

@edison1105
Copy link
Member

/ecosystem-ci run

@edison1105 edison1105 added has workaround A workaround has been found to avoid the problem 🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. labels Apr 1, 2025
@vue-bot
Copy link
Contributor

vue-bot commented Apr 1, 2025

📝 Ran ecosystem CI: Open

suite result latest scheduled
language-tools success success
quasar success success
nuxt success success
primevue success success
radix-vue success success
router success success
vitepress success success
vuetify success success
vant success success
pinia success success
vue-simple-compiler success success
vite-plugin-vue success success
test-utils success success
vue-macros success success
vueuse success success
vue-i18n success success

@edison1105 edison1105 added the ready to merge The PR is ready to be merged. label Apr 1, 2025
@edison1105
Copy link
Member

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. has workaround A workaround has been found to avoid the problem ready to merge The PR is ready to be merged. scope: ssr
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants