-
-
Notifications
You must be signed in to change notification settings - Fork 998
feat(nuxt3): add <NuxtLink> component
#3544
Conversation
|
βοΈ Deploy Preview for nuxt3-docs ready! π¨ Explore the source changes: 3ad68ba π Inspect the deploy log: https://app.netlify.com/sites/nuxt3-docs/deploys/622f43ddf1bdd700083c1184 π Browse the preview: https://deploy-preview-3544--nuxt3-docs.netlify.app |
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.
Alright, here's a first MVP of the <NuxtLink /> component. It includes the base component and tests for it as described in the RFC (#2086)
As mentioned in the PR first post here are the points that are missing to me now:
- Slot API: I think we need to discuss/agree on the desired API. It can also be postponed if needed and added later as a new feature.
- Documentation PR: I'll work on it when we're confident about this PR.
- Prefetching support: I'm not aware of the current status of Nuxt regarding this feature. If available I'll sync with @danielroe for some guidance, else we can wait for it or delay this feature.
ps. I'm not able to build bridge on Windows because symlinks like this one: https://github.com/nuxt/framework/blob/main/packages/bridge/src/runtime/asyncData.ts aren't supported there (or I'm doing something wrong). Because of that I'm not sure what the compiler really expects in the issue on the CI here: https://github.com/nuxt/framework/runs/5465287878?check_suite_focus=true Do you have any idea?
|
Thanks for the updates @lihbr π₯ Adding replies here as cannot reply to outdated comment anymore:
Both vue-router and HTML spec do not require
Makese sense. Then at least can we please ignore both null and undefined equally as falsy values and allow one way (empty string) to disable default value with |
OK indeed wasn't thinking about that. Should it default to
I'm fine with it, the reason I was pushing for |
null seems good idea! |
β¦feat/add-nuxt-link
|
Actually I like it now that I'm writing doc. It's nice to define |
Hey there, indeed! I just synced with Daniel to fix the two last critical issues (bridge build failing + overwrite issue) With that in mind, the Slot API and prefetching feature can be postponed until available within the framework |
danielroe
left a comment
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.
This is really nice! β€οΈ A few tiny stylistic changes. I think merging the examples together would be helpful too.
| } | ||
|
|
||
| describe('define-nuxt-link:to', () => { | ||
| it('renders link with `to` prop', () => { |
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.
It would be nice if add e2e tests with basic fixture as well to test actual component's rendering behavior...
|
Issue for prefetch support: nuxt/nuxt#13482 |
<NuxtLink /><NuxtLink> component
pi0
left a comment
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.
Amazing work π₯ Looking forward to the next steps!
π Linked issue
#2086
β Type of change
π Description
TODO:
π Checklist
<NuxtLink />Β #3594 (merged into this one)