Skip to content

fix: carousel tidy #1509

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

Merged
merged 1 commit into from
Jun 6, 2025
Merged

fix: carousel tidy #1509

merged 1 commit into from
Jun 6, 2025

Conversation

eleanorreem
Copy link
Contributor

What changes did you make and why did you make them?

This pull request introduces updates to the Carousel component and its related implementations, focusing on improving customization, fixing layout issues, and cleaning up unused code. Key changes include the addition of a theme property for better styling flexibility, adjustments to slide width calculations, and the removal of unnecessary components and dependencies.

Carousel Component Enhancements:

  • Added a carouselTheme prop to the CustomDots component and a theme prop to the Carousel component to allow for primary or secondary theme customization. Updated the background color logic in CustomDots to reflect the selected theme. ([[1]](https://github.com/chaynHQ/bloom-frontend/pull/1509/files#diff-3c40c606598b0bcbf1d19e82de166ea6292030ea712eec4cb138570acc6c752dR27-R50), [[2]](https://github.com/chaynHQ/bloom-frontend/pull/1509/files#diff-3c40c606598b0bcbf1d19e82de166ea6292030ea712eec4cb138570acc6c752dR129), [[3]](https://github.com/chaynHQ/bloom-frontend/pull/1509/files#diff-3c40c606598b0bcbf1d19e82de166ea6292030ea712eec4cb138570acc6c752dL136-R151))
  • Introduced a new tabletSlidesToWidthMap for improved slide width calculations on tablet devices, replacing the use of numberSlidesToWidthMap in the getSlideWidth function. Added a note warning about potential layout issues when using this function in flexible layouts. ([[1]](https://github.com/chaynHQ/bloom-frontend/pull/1509/files#diff-3c40c606598b0bcbf1d19e82de166ea6292030ea712eec4cb138570acc6c752dR27-R50), [[2]](https://github.com/chaynHQ/bloom-frontend/pull/1509/files#diff-3c40c606598b0bcbf1d19e82de166ea6292030ea712eec4cb138570acc6c752dL156-R183))

ResourceCarousel Updates:

  • Added a minWidth property and padding adjustments to the ResourceCarousel component for better layout consistency. ([components/common/ResourceCarousel.tsxR82-R84](https://github.com/chaynHQ/bloom-frontend/pull/1509/files#diff-9c11a2d1a5bdf644d4ddd33fb5b21515faf0bb0906fa14fb6913f61c12be1a21R82-R84))

Code Cleanup:

  • Removed unused Row and Column components from the CoursesPage file, simplifying the layout structure. ([[1]](https://github.com/chaynHQ/bloom-frontend/pull/1509/files#diff-8a2df8b2d675c290897006246a1a404fe3bfa6c323dbfe06216a9799a8aa787cL6-L8), [[2]](https://github.com/chaynHQ/bloom-frontend/pull/1509/files#diff-8a2df8b2d675c290897006246a1a404fe3bfa6c323dbfe06216a9799a8aa787cL200-L219))
  • Eliminated unused imports and variables (useWidth and useTheme) from the StoryblokCarousel component for cleaner and more efficient code. ([[1]](https://github.com/chaynHQ/bloom-frontend/pull/1509/files#diff-1ee0fe1c8a8527aff5b58b5bd2d1986ea7a47b8b1d80368fc4196295b32205d9L4-R4), [[2]](https://github.com/chaynHQ/bloom-frontend/pull/1509/files#diff-1ee0fe1c8a8527aff5b58b5bd2d1986ea7a47b8b1d80368fc4196295b32205d9L36-L37))
  • Added a title prop to the StoryblokCarousel component for better identification of carousel instances. ([components/storyblok/StoryblokCarousel.tsxR46](https://github.com/chaynHQ/bloom-frontend/pull/1509/files#diff-1ee0fe1c8a8527aff5b58b5bd2d1986ea7a47b8b1d80368fc4196295b32205d9R46))

Copy link

vercel bot commented Jun 6, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
bloom-frontend ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 6, 2025 2:37pm

@eleanorreem eleanorreem merged commit 0ec9cca into develop Jun 6, 2025
8 checks passed
@eleanorreem eleanorreem deleted the carousel-tidy branch June 6, 2025 14:41
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.

1 participant