Option for bigger sized previous/next buttons#3352
Merged
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
🚀 New features to boost your workflow:
|
tinohager
reviewed
May 19, 2025
tinohager
reviewed
May 22, 2025
Contributor
There was a problem hiding this comment.
The name of the enum is not good for future sizes, perhaps it makes sense to call it PhotoNavigationPreviewSize, for example
Member
Author
There was a problem hiding this comment.
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.
JasonMillward
approved these changes
May 25, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
SmallLargeTypeenum to manage the size options.Backend Changes:
SmallLargeTypeenum withSMALLandLARGEoptions to represent button sizes. (app/Enum/SmallLargeType.php)InitConfigto include thephoto_previous_next_sizeproperty, reading its value from the configuration. (app/Http/Resources/GalleryConfigs/InitConfig.php) [1] [2] [3]photo_previous_next_sizeconfiguration option, with a default value ofsmall. (database/migrations/2025_05_17_075632_optional-bigger-left-right-icons.php)Frontend Changes:
NextPrevious.vuecomponent to apply size-specific styles based on thephoto_previous_next_sizevalue. (resources/js/components/gallery/photoModule/NextPrevious.vue)LycheeStatestore to includephoto_previous_next_sizeand synchronize it with the backend configuration. (resources/js/stores/LycheeState.ts) [1] [2]