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

Get rid of NoElement component and useNoElementRender composable #1583

Merged
merged 8 commits into from
Aug 6, 2024

Conversation

joseacabaneros
Copy link
Member

@joseacabaneros joseacabaneros commented Aug 2, 2024

  • Sync v-bind="$attrs" and inheritAttrs: false in components when it is not the root node
  • Get rid of NoElement component and useNoElementRender composable in favour of Vue3 way for inheritance. No longer available to use them in components or templates.
  • Create NoAnimation as alternative for NoElement with the aim of using it as default value in animation props.
  • Minor refactors

Note: With this PR, no more warnings pending, except 2 from xBus from infiniteScroll directive fixed here #1584

@joseacabaneros joseacabaneros requested a review from a team as a code owner August 2, 2024 10:48
Copy link
Contributor

@victorcg88 victorcg88 left a comment

Choose a reason for hiding this comment

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

🔥 NoElement 🔥

the component itself. It is the alternative for the NoElement antipattern. */
const innerProps = { closeModal };
return (
slots.closingElement ? () => slots.closingElement?.(innerProps)[0] : innerProps
Copy link
Contributor

Choose a reason for hiding this comment

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

Previously we were using the slot name as kebab case and I think we should keep doing the same here to not introduce an additional breaking change. So I'd refactor it to slots['closing-element']

Copy link
Member Author

Choose a reason for hiding this comment

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

I could have sworn I tried it in kebab-case but for some reason/error, I finally chose this way.
Now, I have tried in kebab-case and everything works, so consider it refactored together with openingElement.

@diegopf diegopf merged commit 059eecc into vue3-update-rc Aug 6, 2024
0 of 2 checks passed
@diegopf diegopf deleted the get-rid-of-no-element-component branch August 6, 2024 13:42
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