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
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.
Summary
Replace
UIViewControllerRepresentable'sPhotoPickerViewwith.photoPickerAs of iOS 16, we now have access to utilize the SwiftUI modifier for
.photoPickeropposed to using our customUIViewControllerRepresentablePhotoPickerView.The current process is we go from
PhotoPickerViewtoPhotoCropViewto utilize Mantis to drop our images. This PR introduces overload for.photoPickerthat directly routes the results into Mantis for cropping in a self contained.sheet. This takes both thePhotoPickerViewandPhotoCropViewout of the navigation stack. I took this as an opportunity to bump Mantis to 2.29 from 2.28.PhotoCropViewCleanupI've updated cropping to utilize our toolbar buttons and added preset aspect ratios as most images for posters (our primary usage outside of user images) are set values like 16:9 or 2:3. This is kind of just extra fluff but it's nice for Item Images. This also the same
FilterDrawerButtonstyling so I've turned that into aButtonStyleand shared it betweenPhotoCropViewandFilterDrawerView.User Profile still only allows 1:1 so this only shows for Item Images.
Unify Photo
ViewModelLogicInstead of a thin wrapper around
PhotoCropViewfor User and Image, I've created aImageViewModelwhich is extended byUserImageViewModelandItemImageViewModel. ThePhotoCropViewlooks for a genericImageViewModelso the save functionalities are the sameViewModelActionbut overriden based onUserDataorBaseItemDto.ItemImagesViewReworkThese have had their
ViewModelsupdating (Minus thePaginLibraryViewModelone) so these were all updated to use the update@StatefulAPIs. While there, I made some changes. I will go from smallest changes to largest:RemoteImageDetailViewRenamed from
ItemImageDetailView. This was renamed as I am no longer using it for bothImageInfo(existing images) andRemoteImageInfo(searched, remote images). Instead, I am purely using this forRemoteImageInfoto see search results in more detail. TheImageInfo(existing images) version of this was replaced by just a confirmation dialog for deletion (seeItemImagesViewHide labels for details both if the values are nil OR if the values are empty. Most commonly, language was returning "" so it would just be an empty row.
This is otherwise unchanged.
RemoteImageSearchViewSimilar renaming as
RemoteImageDetailViewto better match the other view.Force 3 columns on iOS for square and portrait and 2 for landscape. iPadOS use dynamic sizing.
Remove all the custom Poster Button in favor of just using the
PosterButtonsince this conforms toPoster.Routing to
RemoteImageDetailViewnow uses a push zoom instead of a .sheet. This was previously 3 stacked sheets so, IMO this works better and there are no longer circumstances where all 3 .sheet get dismissed at once. IMO, the zoom just looks nicer as well.ItemImagesViewThis was a complete overhaul! The previous view was functional but I believe the new view is much much better:
SeriesEpisodePicker, to only show selected items. Default to.Primaryas it's the most used/important instead of having to scroll to it.Generic Cleanup
ServerLogViewhad a hardcoded URL I moved to URLs while I was adding a new one.LocalUserViewto use aStateAdapterwhile I was removing thePhotoPickerViewrouting in favor of the modifer.Posterconformance forRemoteImageInfowhere we default theCollectionVGridto use theThumbnailURLin the image sources instead of the full image.Videos
User Profile
User.Profile.mov
Item Images
Search
Search.mov
Upload File
File.Upload.mov
Upload Photo
Photo.Upload.mov
Delete
Delete.mov