Automattic / Automattic/jetpack
Enhancement: carousel gallery filter to disable `carousel slideshows` for custom gallery styles
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
### Impacted plugin
Jetpack
### What
I have enabled `Display images in a full-screen carousel gallery` feature from jetpack which is adding `full-screen carousel slideshows` to every gallery styles which is not intentional. I have created some gallery styles for which I don't want this feature so I want to know is there any filter to disable this `carousel slideshows` for particular gallery styles. right now I have to do this using JS and changing dom attributes is not ideal I think.
### How
Right now to disable `carousel slideshows` for particular gallery styles I am using this JS and removing `data-carousel-extra` attribute set by jetpack.
```JS
document.addEventListener( 'DOMContentLoaded', function() {
const styles = [ 'is-style-client-logos', 'is-style-our-team', 'is-style-key-areas-of-expertise', 'is-style-our-team-normal', 'is-style-client-logos-2x2' ];
styles.forEach( ( style ) => {
const galleryClass = document.querySelectorAll( `.${ style }` );
galleryClass.forEach( ( gallery ) => {
gallery.removeAttribute( 'data-carousel-extra' );
} );
} );
} );
```
Contributor guide
Research direction
No source file or test is named in the report. Start by locating Jetpack’s carousel gallery integration and the hook or filter that adds carousel metadata, then verify that a custom gallery style can opt out without the DOM workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, php, wordpress
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100