Enhancements to Carousel Functionality in Breniapp

The Breniapp project focuses on providing innovative solutions. Recent development efforts have centered on improving the carousel feature, addressing formatting issues, data capture, and download capabilities.

Carousel Enhancements

The latest updates to the carousel functionality in Breniapp include several key improvements:

Dynamic Aspect Ratio

The carousel now dynamically adjusts its aspect ratio based on the format passed through the carousel-generation-started and carousel-generation-completed events. This ensures that the CarouselCanvas component uses the correct aspect ratio, avoiding the previous default of 1:1. This enhancement improves the visual presentation of carousel content across different devices and screen sizes.

Selective Data Capture

A data-capture-hide attribute has been added to slide purpose badges. This allows html2canvas to exclude specific elements, such as "Portada" or "CTA" labels, from downloads. This provides more control over the content included in the downloaded carousel slides.

Library Integration

Carousel slides are now fully supported in the library. This includes eager loading of slides, displaying a slide count badge, and enabling navigation of slides within the detail dialog. This enhancement makes it easier to manage and access carousel content within the library.

Improved Download Process

The carousel download process has been updated to fetch all slide images by URL, instead of relying on a single visible html2canvas container. This ensures that all slides are included in the download, regardless of their visibility.

Code Example: Setting Aspect Ratio

Here's an example of how the aspect ratio might be set in the carousel-generation-completed event:

<?php

$eventData = [
    'format' => '16:9',
    'width'  => 1920,
    'height' => 1080,
];

event('carousel-generation-completed', $eventData);

?>

This code snippet illustrates how the format, width, and height are passed as event data, allowing the CarouselCanvas to adjust accordingly.

Conclusion

These enhancements collectively improve the functionality and usability of the carousel feature in Breniapp. By addressing formatting issues, providing selective data capture, integrating with the library, and improving the download process, the updated carousel delivers a more robust and user-friendly experience.

Enhancements to Carousel Functionality in Breniapp
GERARDO RUIZ

GERARDO RUIZ

Author

Share: