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

feat: vapor component base #5

Merged
merged 4 commits into from
Nov 29, 2023
Merged

Conversation

ubugeeei
Copy link
Member

@ubugeeei ubugeeei commented Nov 26, 2023

related: #4


I have implemented some foundational aspects of components.

I've made changes to manage setup~render execution, which was on the playground side in the existing implementation, and effectScope, which was a local variable in the render function, as component instances.

These instances are planned to be implemented in the future to register lifecycle hooks and manage provides, similar to traditional components.

Also, regarding the setup and render options, they are treated only as compile outputs this time and were not intended to be public for users, so I have named them InternalOption.
Please let me know if these APIs (Options) were supposed to be treated as public, and I will make the necessary adjustments.

  • Some points of uncertainty:
    • How to write tests regarding runtime
    • When using existing Vue packages, should I use @vue/* or vue?

@ubugeeei ubugeeei mentioned this pull request Nov 26, 2023
28 tasks
@sxzz
Copy link
Member

sxzz commented Nov 26, 2023

The design of the components has not yet been discussed. We have to put this PR on hold.

Copy link
Member

@sxzz sxzz left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution. However, we have to wait until the team discusses component design.
One of the goals is to simplify the current complexity. Maybe we have to explore it in mainline (Vue Core) first...

packages/runtime-vapor/src/componentInternalOptions.ts Outdated Show resolved Hide resolved
packages/runtime-vapor/src/render.ts Outdated Show resolved Hide resolved
@ubugeeei
Copy link
Member Author

Ok, that’s fine.
I was curious about the meaning of this post before the repository went public, but it seems there are some issues around that area now.

I’ll wait for further updates! (I can't get to sleep because of…)

@ubugeeei ubugeeei force-pushed the feat/vapor-component branch 4 times, most recently from 316a903 to 990eb68 Compare November 26, 2023 23:44
@ubugeeei ubugeeei marked this pull request as draft November 27, 2023 13:31
@sxzz sxzz force-pushed the feat/vapor-component branch 2 times, most recently from 69ca76e to ffd91d9 Compare November 27, 2023 15:51
Copy link

github-actions bot commented Nov 27, 2023

Size Report

Bundles

File Size Gzip Brotli
runtime-dom.global.prod.js 87.9 kB 33.4 kB (-17 B) 30.2 kB
runtime-vapor.global.prod.js 15.1 kB (+269 B) 5.58 kB (+98 B) 5.11 kB (+101 B)
vue-vapor.global.prod.js 43.9 kB (+270 B) 14.5 kB (+161 B) 13.1 kB (+90 B)
vue.global.prod.js 144 kB 52.4 kB (+12 B) 46.9 kB

Usages

Name Size Gzip Brotli
createApp 48.6 kB 19 kB (-11 B) 17.4 kB
createSSRApp 51.8 kB 20.3 kB (+4 B) 18.6 kB
defineCustomElement 50.9 kB 19.8 kB (-10 B) 18.1 kB
vapor 15 kB (+265 B) 5.58 kB (+102 B) 5.12 kB (+100 B)
overall 61.9 kB 23.9 kB (+7 B) 21.8 kB

@ubugeeei ubugeeei marked this pull request as ready for review November 28, 2023 14:27
@ubugeeei ubugeeei marked this pull request as draft November 28, 2023 14:30
@ubugeeei ubugeeei marked this pull request as ready for review November 28, 2023 16:13
@sxzz sxzz merged commit 61f339c into vuejs:main Nov 29, 2023
4 checks passed
@ubugeeei ubugeeei deleted the feat/vapor-component branch November 29, 2023 20:08
@ubugeeei ubugeeei mentioned this pull request Dec 8, 2023
@baiwusanyu-c
Copy link
Member

I get an error
NotFoundError: The node to be removed is not a child of this node.

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.

3 participants