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(ebay-carousel): fix width calculation for last pill when font not loaded (#2344) #2352

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/strong-grapes-work.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ebay/ebayui-core": minor
---

fix(ebay-carousel): fix width calculation for last pill when font not loaded (#2344)
10 changes: 5 additions & 5 deletions src/components/ebay-carousel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
</span>
</h1>

Descrete or Continuious carousel component. Can show items as a slide or various widths.
Discrete or Continuous carousel component. Can show items as a slide or various widths.

## Examples and Documentation

- [Storybook](https://ebay.github.io/ebayui-core/?path=/story/navigation-disclosure-ebay-carousel)
- [Storybook Docs](https://ebay.github.io/ebayui-core/?path=/docs/navigation-disclosure-ebay-carousel)
- [Code Examples](https://github.com/eBay/ebayui-core/tree/master/src/components/ebay-carousel/examples)
- [Storybook](https://ebay.github.io/ebayui-core/?path=/story/navigation-disclosure-ebay-carousel)
- [Storybook Docs](https://ebay.github.io/ebayui-core/?path=/docs/navigation-disclosure-ebay-carousel)
- [Code Examples](https://github.com/eBay/ebayui-core/tree/master/src/components/ebay-carousel/examples)

## Preserving tabindex for focusable elements

Expand All @@ -22,4 +22,4 @@ In order to preserve the tabindex on an item, pass `data-carousel-tabindex="-1"`

## Reduced motion

The carousel doesnot autoplay by respecting the `prefers-reduced-motion` media query. Toggle your reduced motion settings to view autoplay example with the default behavior and reduced motion behavior.
The carousel does not autoplay by respecting the `prefers-reduced-motion` media query. Toggle your reduced motion settings to view autoplay example with the default behavior and reduced motion behavior.
9 changes: 7 additions & 2 deletions src/components/ebay-carousel/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ class Carousel extends Marko.Component<Input, State> {
if (!config.scrollTransitioning) {
this.handleScroll(this.listEl.scrollLeft);
}
}),
})
);
} else {
this.subscribeTo(this.listEl).on("transitionend", ({ target }) => {
Expand All @@ -540,8 +540,13 @@ class Carousel extends Marko.Component<Input, State> {
}
});
}

this.onRenderLegacy();

document.fonts.ready.then(() => {
this.cleanupAsync();
this.onRenderLegacy();
});

}

onUpdate() {
Expand Down
Loading