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

Gallery pattern: caption title, link is rendered for playable media #327

Closed
kp77 opened this issue May 3, 2023 · 2 comments · Fixed by #361
Closed

Gallery pattern: caption title, link is rendered for playable media #327

kp77 opened this issue May 3, 2023 · 2 comments · Fixed by #361
Labels
enhancement New feature or request

Comments

@kp77
Copy link
Contributor

kp77 commented May 3, 2023

In the BCL example, the gallery component never has a caption overlay for videos. This is probably because with the caption overlay, the video controls are not usable.

In the Gallery pattern, this is handled, but only for the item.caption property. If the item has caption_title or link property, the caption overlay is displayed, making the video controls unusable.

The issue is mitigated by the fact that we can map the video media name to the caption property instead of the caption_title, but I think the correct solution would be if the caption overlay is never displayed for playable media in the pattern.

Suggestion for https://github.com/openeuropa/oe_bootstrap_theme/blob/1.3.0/templates/patterns/gallery/pattern-gallery.html.twig#L24-L26:

    items: items|map(_item => _item|merge({
      caption: _item.is_playable ? '' : _item.caption,
      caption_title: _item.is_playable ? '' : _item.caption_title,
      link: _item.is_playable ? '' : _item.link
    })),

Or another option would be to move this logic to the bcl_gallery_items twig function.

@tibi2303
Copy link
Contributor

tibi2303 commented May 8, 2023

Thank you for this, we will actually fix this in this pr from BCL. openeuropa/bootstrap-component-library#509. Where we will be able to display the captions without any issue on videos

We can actually use this issue to display the caption that it's removed after we will have the BCL pr merged and released.

@AaronGilMartinez AaronGilMartinez added the enhancement New feature or request label Jun 14, 2024
@tibi2303
Copy link
Contributor

Do we still need this issue?
Please have a look here: https://github.com/openeuropa/bootstrap-component-library/blob/development/src/compositions/bcl-gallery/gallery.html.twig#L173

We manage it in BCL and we hide them if it's an iframe or video. I don't see any other use case to hide them. Close this if you agree and if it's fixed, please.

@AaronGilMartinez AaronGilMartinez linked a pull request Sep 30, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
3 participants