Skip to content

Add autoScroll toggle to media carousel component#8

Merged
Pho3niX90 merged 5 commits intomasterfrom
feature/mobile-improvement
Dec 25, 2025
Merged

Add autoScroll toggle to media carousel component#8
Pho3niX90 merged 5 commits intomasterfrom
feature/mobile-improvement

Conversation

@Pho3niX90
Copy link
Owner

@Pho3niX90 Pho3niX90 commented Dec 25, 2025

User description

…ing behavior


PR Type

Enhancement


Description

  • Introduce autoScroll toggle property

  • Conditionally start scrolling in ngAfterViewInit


File Walkthrough

Relevant files
Enhancement
media-carousel.component.ts
Introduce autoScroll toggle and conditional start               

frontend/src/app/shared/components/media-carousel/media-carousel.component.ts

  • Added private autoScroll boolean property
  • Wrapped startScroll() call in if (this.autoScroll) check
+3/-1     

@Pho3niX90 Pho3niX90 added the enhancement New feature or request label Dec 25, 2025
@Pho3niX90 Pho3niX90 changed the title Add autoScroll toggle to media carousel component to control scroll… Add autoScroll toggle to media carousel component Dec 25, 2025
@Pho3niX90
Copy link
Owner Author

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Missing @Input Decorator

The newly added autoScroll property lacks an @Input() decorator, so consumers of this component cannot toggle it via template bindings. Consider marking it as an input to make the toggle functional.

private autoScroll = false;
Missing Braces in Conditional

The if (this.autoScroll) block is not wrapped in braces. Adding braces will improve readability and prevent potential bugs when extending the block.

if (this.autoScroll)
  this.startScroll();

@Pho3niX90
Copy link
Owner Author

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
General
Expose autoScroll as input

Decorate autoScroll with @Input() and make it public so that parent components can
enable or disable auto-scrolling via template binding.

frontend/src/app/shared/components/media-carousel/media-carousel.component.ts [40]

-private autoScroll = false;
+@Input() autoScroll = false;
Suggestion importance[1-10]: 7

__

Why: Decorating autoScroll with @Input() correctly exposes it for binding and changing visibility to public is necessary for parent components to control auto-scrolling.

Medium
Add braces to if block

Wrap the if statement in braces to ensure the correct scope and prevent errors when
adding more statements in the future.

frontend/src/app/shared/components/media-carousel/media-carousel.component.ts [43-44]

-if (this.autoScroll)
+if (this.autoScroll) {
   this.startScroll();
+}
Suggestion importance[1-10]: 3

__

Why: Wrapping the if body in braces is a minor style improvement that prevents potential scope errors but has limited impact on functionality.

Low

- Unified rating structure for Radarr, Sonarr, and Trakt integrations.
- Added support for "bottomLeftBadge" and "bottomCenterOverlay" in media components.
- Integrated star icons and improved color classes for better visual representation.
- Introduced next/previous scroll navigation in media carousel with smooth scrolling.
- Updated JWT expiration in auth module to 7 days.
- Refactored templates to align with new badge and overlay rendering standards.
@Pho3niX90 Pho3niX90 merged commit 2275094 into master Dec 25, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Review effort 2/5

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant