Remove dependency on parent-id and directly extract from the url#3355
Merged
Remove dependency on parent-id and directly extract from the url#3355
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
🚀 New features to boost your workflow:
|
JasonMillward
approved these changes
May 25, 2025
3703cc3 to
e813c38
Compare
e813c38 to
273a3f3
Compare
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 refactors the handling of
parentIdin various Vue components by replacing theparentIdprop with a newgetParentIdmethod from theusePhotoRoutecomposable. This change simplifies the codebase by centralizing the logic for determining the current parent album ID and removes the need to passparentIdas a prop across multiple components. Additionally, minor improvements and cleanups are included.Refactoring of
parentIdhandling:Centralized
parentIdlogic:getParentIdmethod in theusePhotoRoutecomposable to fetch the current album ID from the router'scurrentRouteparams. [1] [2]AlbumCreateDialog,AlbumMergeDialog,DeleteDialog,MoveDialog, and others to usegetParentIdinstead of relying on theparentIdprop. [1] [2] [3] [4] [5]Removal of
parentIdprop:parentIdprop from components where it was previously passed, simplifying their interfaces. [1] [2] [3] [4]Updated service calls:
parentIdwith calls togetParentIdin service methods like album creation, deletion, moving, and merging. [1] [2] [3] [4] [5]Code cleanup and minor improvements:
Improved
PhotoService.movemethod:PhotoService.movemethod to accept a structuredPhotoMoveobject for better clarity and type safety. [1] [2]Removed unnecessary watchers:
props.parentIdthat are no longer needed due to the centralizedgetParentIdlogic.UI adjustments:
parentIdbindings in templates across various components, reducing redundancy. [1] [2] [3]This refactor improves maintainability by consolidating logic, reducing prop dependencies, and simplifying component interfaces.