Skip to content

Option for bigger sized previous/next buttons#3352

Merged
ildyria merged 2 commits intomasterfrom
bigger-left-right-icons
May 25, 2025
Merged

Option for bigger sized previous/next buttons#3352
ildyria merged 2 commits intomasterfrom
bigger-left-right-icons

Conversation

@ildyria
Copy link
Copy Markdown
Member

@ildyria ildyria commented May 17, 2025

This pull request introduces a new configuration option for customizing the size of the "previous" and "next" buttons in the photo view. It includes changes to both the backend and frontend to support this feature, leveraging a new SmallLargeType enum to manage the size options.

Backend Changes:

  • New Enum for Button Size: Added a SmallLargeType enum with SMALL and LARGE options to represent button sizes. (app/Enum/SmallLargeType.php)
  • Configuration Support: Updated InitConfig to include the photo_previous_next_size property, reading its value from the configuration. (app/Http/Resources/GalleryConfigs/InitConfig.php) [1] [2] [3]
  • Database Migration: Added a migration to introduce the photo_previous_next_size configuration option, with a default value of small. (database/migrations/2025_05_17_075632_optional-bigger-left-right-icons.php)

Frontend Changes:

  • Dynamic Button Styling: Updated the NextPrevious.vue component to apply size-specific styles based on the photo_previous_next_size value. (resources/js/components/gallery/photoModule/NextPrevious.vue)
  • State Management: Modified the LycheeState store to include photo_previous_next_size and synchronize it with the backend configuration. (resources/js/stores/LycheeState.ts) [1] [2]

@ildyria ildyria requested a review from a team as a code owner May 17, 2025 08:53
@ildyria ildyria added the Review: easy Easy review expected: probably just need a quick to go through. label May 17, 2025
@codecov
Copy link
Copy Markdown

codecov Bot commented May 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.99%. Comparing base (cce1d7b) to head (82ed09a).
Report is 9 commits behind head on master.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread app/Enum/SmallLargeType.php Outdated
@ildyria ildyria added the alpha-ready Branch is available in alpha label May 21, 2025
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name of the enum is not good for future sizes, perhaps it makes sense to call it PhotoNavigationPreviewSize, for example

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessarily, we can refactor this later. But at the moment it makes it possible to re-use the Enum for other options with similar domain.

@ildyria ildyria merged commit 19ee56e into master May 25, 2025
35 checks passed
@ildyria ildyria deleted the bigger-left-right-icons branch May 25, 2025 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

alpha-ready Branch is available in alpha Review: easy Easy review expected: probably just need a quick to go through.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants