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(list-components): fix list components, migrate infinite-scroll directive and deprecated layouts #1576

Merged

Conversation

joseacabaneros
Copy link
Member

@joseacabaneros joseacabaneros commented Jul 25, 2024

3 things done here:

  1. Getting rid of NoElement usage in -list components (ResultsList, PromotedsList, BannersList and NextQueriesList). It fixes warnings regarding attrs inheritance to the root node.
<template>
  <NoElement>
    <!--
      @slot Customize ResultsList.
        @binding {Result[]} items - Results to render.
        @binding {Vue | string} animation - Animation to animate the elements.
    -->
    <slot v-bind="{ items, animation }">
      <ItemsList :animation="animation" :items="items">
        <template v-for="(_, slotName) in slots" v-slot:[slotName]="{ item }">
          <slot :name="slotName" :item="item" />
        </template>
      </ItemsList>
    </slot>
  </NoElement>
</template>

is the same as the following render function

return () => {
  const innerProps = { items: items.value, animation: props.animation };
  return slots.default?.(innerProps)[0] ?? h(ItemsList, innerProps);
};
  1. Removing UseLayouts composable and refactor all deprecated layouts implied
  • Revert Home to use again MultiColumnMaxWidthLayout
  1. Migrate InfiniteScroll directive and make it simpler. Now, it doesn't depend on the component instance to emit UserReachedResultsListEnd event so onInfiniteScrollEnd function in ResultsList is no longer necessary.

diegopf and others added 6 commits July 23, 2024 17:11
@joseacabaneros joseacabaneros requested a review from a team as a code owner July 25, 2024 12:11
@joseacabaneros joseacabaneros merged commit 4b57f19 into vue3-update-rc Jul 26, 2024
0 of 2 checks passed
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