Closed arkivanov closed 3 months ago
The recent changes enhance the application's image handling and navigation capabilities. By shifting from an ImageType
enumeration to a more flexible ImageResourceId
approach, the codebase improves its modularity and clarity. New components for shared transitions and galleries have been introduced, streamlining interactive features. These adjustments not only optimize resource management but also enrich user experience through better-defined navigation paths.
File Path | Change Summary |
---|---|
KittenView.swift |
Modified image handling logic to use imageResourceId . Removed PreviewKittenComponent for cleaner code. |
PainterResource.kt |
Introduced painterResource function to retrieve images as Painter objects in a type-safe manner. |
KittenContent.kt |
Refactored image handling to use painterResource directly. Added KittenContentPreview for enhanced previews. |
MenuContent.kt |
Added a new button for "Shared Transitions" to enhance interactivity. |
PagesContent.kt |
Changed visibility of PagesContent to internal . Refactored close button implementation for clarity. |
RootContent.kt |
Introduced SharedTransitionsChild for handling shared transitions in navigation. |
ImageResourceId.kt |
Defined ImageResourceId enum for better image resource management with serialization support. |
DefaultCustomNavigationComponent.kt |
Replaced ImageType with ImageResourceId for configuration flexibility. |
DefaultKittenComponent.kt |
Updated parameter from imageType to imageResourceId for clarity. |
KittenComponent.kt |
Replaced imageType with imageResourceId . Removed ImageType enum. |
PreviewKittenComponent.kt |
Introduced a new class for previews, implementing KittenComponent . |
DefaultMenuComponent.kt |
New parameter for handling shared transitions in menu interactions. |
MenuComponent.kt |
Added onSharedTransitionsItemSelected callback to enhance menu functionality. |
DefaultPagesComponent.kt |
Updated navigation logic to use ImageResourceId . |
DefaultRootComponent.kt |
Added navigation item for shared transitions and updated methods for new configurations. |
RootComponent.kt |
Introduced SharedTransitionsChild for managing shared transitions. |
DefaultSharedTransitionsComponent.kt |
Created a component for managing navigation between gallery and photo views. |
SharedTransitionsComponent.kt |
Defined interface for managing shared transitions with a stack of components. |
DefaultGalleryComponent.kt |
Implemented gallery management functionality with dynamic image creation. |
GalleryComponent.kt |
Introduced an interface for gallery functionality. |
DefaultPhotoComponent.kt |
Created a component for managing photo display with close functionality. |
Image.kt |
Defined Image data class with serialization support for handling image data. |
PhotoComponent.kt |
Introduced interface for photo-related functionality. |
PreviewPhotoComponent.kt |
Added a preview component for photo display with basic functionality. |
DefaultTabsComponent.kt |
Added new parameter for handling shared transitions in tabs. |
TabsComponentIntegrationTest.kt |
Introduced test for verifying shared transitions functionality in tabs. |
sequenceDiagram
participant User
participant MenuComponent
participant SharedTransitionsComponent
participant GalleryComponent
participant PhotoComponent
User->>MenuComponent: Selects Shared Transitions
MenuComponent->>SharedTransitionsComponent: Trigger Transition
SharedTransitionsComponent->>GalleryComponent: Navigate to Gallery
GalleryComponent->>User: Display Images
User->>GalleryComponent: Select Image
GalleryComponent->>SharedTransitionsComponent: Transition to Photo
SharedTransitionsComponent->>PhotoComponent: Display Photo
User->>PhotoComponent: Close Photo
PhotoComponent->>SharedTransitionsComponent: Notify Closed
π° In a world of images and dreams so bright,
A rabbit hops through code, full of delight.
With transitions shared and resources anew,
We dance in the gallery, just me and you.
So letβs celebrate changes, both big and small,
For every new feature brings joy to us all! π₯β¨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
As part of #690.
Summary by CodeRabbit
New Features
DefaultSharedTransitionsComponent
to manage transitions between gallery and photo views.Refactor
KittenContent
andKittenComponent
, promoting clarity.Bug Fixes
Tests
TabsComponent
.