-
-
Notifications
You must be signed in to change notification settings - Fork 340
Backend implementation for timeline page #3251
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
Open
ildyria
wants to merge
1
commit into
master
Choose a base branch
from
backend-timeline
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
5c39470
to
dde31e5
Compare
172b60c
to
751207d
Compare
Codecov ReportAttention: Patch coverage is
🚀 New features to boost your workflow:
|
Will need to be parked until refactoring of link between photos and albums, otherwise we are spammed by duplicates in the timeline... |
9ba1a70
to
916e593
Compare
916e593
to
bcca8f7
Compare
6cbc89d
to
6e39bb0
Compare
ildyria
commented
May 28, 2025
ildyria
commented
May 28, 2025
6e39bb0
to
b68cb45
Compare
7198efb
to
00c717b
Compare
6eefc2a
to
6829366
Compare
6829366
to
08bf005
Compare
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 comprehensive implementation of a new "Timeline" feature for photo albums, including backend logic, API endpoints, and supporting structures. The changes span multiple files and focus on enabling granular timeline views, handling requests, and providing configuration options. Below is a summary of the most important changes grouped by theme:
Timeline Feature Implementation
app/Actions/Photo/Timeline.php
: Added a newTimeline
class that provides methods to query photos by timeline granularity, count photos younger than a given date or photo, and retrieve distinct timeline dates. This class integrates with configurations and policies to apply filters and sorting.app/Http/Controllers/Gallery/TimelineController.php
: Introduced a new controller to handle timeline-related API requests, including fetching photos, initializing the timeline, and retrieving timeline dates.app/Http/Requests/Timeline/IdOrDatedTimelineRequest.php
andapp/Http/Requests/Timeline/GetTimelineRequest.php
: Added request validation classes to handle timeline-specific parameters such as photo IDs and dates, ensuring proper authorization and validation. [1] [2]Timeline Granularity and Formatting
app/Enum/TimelinePhotoGranularity.php
andapp/Enum/TimelineAlbumGranularity.php
: Extended enums to include aformat()
method for returning ISO date formats based on granularity (e.g., year, month, day, hour). These changes support the dynamic formatting of timeline data. [1] [2]app/Exceptions/Internal/TimelineGranularityException.php
: Added a custom exception to handle invalid timeline granularities, ensuring robust error handling for unsupported configurations.Configuration and Initialization
app/Http/Resources/GalleryConfigs/InitConfig.php
: Updated the initialization resource to include timeline-specific configurations, such as the default homepage and whether the timeline page is enabled. [1] [2]app/Http/Resources/Timeline/InitResource.php
: Added a new resource to initialize the timeline view, providing layout configurations and user rights.Utility and Middleware Updates
app/Http/Resources/Models/Utils/TimelineData.php
: Enhanced the utility class to include methods for generating timeline data from dates and photos, supporting multiple granularities.app/Http/Middleware/ConfigIntegrity.php
: Added new configuration keys for timeline quick access date formats, ensuring integrity checks for these settings.Minor Enhancements
app/Contracts/Http/Requests/RequestAttribute.php
: Added a new constantDATE_ATTRIBUTE
to standardize the handling of date attributes in requests.app/Http/Controllers/VueController.php
: Introduced a new methodviewNoArgs()
for rendering the Vue app without arguments, likely for timeline-related views.