-
- Notifications
You must be signed in to change notification settings - Fork 8.8k
feat(compiler): compiler supports search tag #9249
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
base: minor
Are you sure you want to change the base?
feat(compiler): compiler supports search tag #9249
Conversation
Size ReportBundles
Usages
|
The way we handle built-in HTML tags makes this technically a breaking change if someone was previously having a component named Right now:
Considering there might be more tags being added in the future, we might need to have a separate list of "late added tags". For these tags:
|
To provide a concrete example of more new tag names that might get added. https://open-ui.org/components/selectlist/ OpenUI is currently working on a new stylable select element, as part of that proposal at least 3 new Html elements are currently proposed to be added. And it's likely that more such elements will be added as time goes on. So search is definitely not going to be a one of or even necessarily a rarity. |
e69964d
to be735d7
Compare 13329f8
to 3b41769
Compare Because the minor branch is 2 commits ahead of main. We should update the minor branch first. |
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File ( |
749266e
to 6d1f90e
Compare 6d1f90e
to 835fc82
Compare @vue/compiler-core
@vue/compiler-dom
@vue/compiler-sfc
@vue/compiler-ssr
@vue/compiler-vapor
@vue/reactivity
@vue/runtime-core
@vue/runtime-dom
@vue/runtime-vapor
@vue/server-renderer
@vue/shared
vue
@vue/compat
commit: |
This pr adds a preview |
We should also consider the following cases: |
@@ -98,6 +101,7 @@ export const helperNameMap: Record<symbol, string> = { | |||
[CREATE_TEXT]: `createTextVNode`, | |||
[CREATE_STATIC]: `createStaticVNode`, | |||
[RESOLVE_COMPONENT]: `resolveComponent`, | |||
[RESOLVE_SETUP_RETURNED]: `resolveSetupReturned`, |
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 think resolveLateAddedTag
would be a more appropriate name. Perhaps this runtimehelper isn't necessary, for late add tag we can directly use resolveComponent
: `$setup[${JSON.stringify(fromConst)}]` | ||
: `${helper(getSetupReturnedHelper())}(${JSON.stringify( | ||
fromConst, | ||
)}, $setup)` |
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 $setup
parameter is unnecessary to pass, as it can be obtained during runtime via currentRenderingInstance.setupState
, which also helps reduce bundle size.
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.
Here we should use isLateTag
to check fromConst
, and only use setupReturnedHelper or just use resolveComponent
when it's a late added tag. Otherwise, it should remain unchanged.
if ( | ||
__DEV__ && | ||
value && | ||
(value as ComponentInternalInstance).render && |
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.
In the 'setup script', the component value comes from the 'props' or 'setupState', and when it is an object with a render function, can it be considered a component? If it can be judged that it is a component in this way, then report a warning, otherwise leave it as is
close: #9247