From a528b623b971aa99274c8b940f8edfbd06103d83 Mon Sep 17 00:00:00 2001 From: grtsinry43 Date: Wed, 8 Oct 2025 17:16:33 +0800 Subject: [PATCH] feat: Implement Design System screen and enhance UI/UX MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit introduces a new "Design System" screen for developers and designers, refines navigation animations for a smoother experience, and improves typography consistency across various UI components. **Key Changes:** * **feat(Design System):** * Added a new `DesignSystemScreen.kt` to visually showcase the app's color palette, typography styles, and shape system. * The screen features animated guides and detailed specifications for each design token (e.g., font size, weight, color roles). * A new "About Tangyuan Design System" menu item has been added to the `UserScreen` (for both logged-in and logged-out states), navigating to this new screen. * **refactor(Navigation):** * Replaced default navigation transitions with custom animations using `CubicBezierEasing` for a more fluid and responsive feel (e.g., quick spring and fade effects). * Detail screens (`PostDetail`, `UserDetail`, `ImageDetail`) now use a `fadeIn`/`fadeOut` transition to prevent conflicts with shared element animations. * Side-panel screens (`About`, `DesignSystem`) now use a horizontal slide transition. * Navigation between main tabs (`Talk`, `Message`, `User`) is now animated with a horizontal slide and fade. * **refactor(Typography & UI):** * Standardized the font weight for titles and important text to `SemiBold` across `PostCardItem`, `PostDetailScreen`, and `CommentComponents` for better visual hierarchy. * Updated the `PostDetailScreen` top bar title to "帖子详情" for clarity. * Replaced the literary font with the general-purpose font in some UI elements like comment interaction labels for improved readability. * Enabled image click navigation from the `UserDetailScreen`'s post feed. * **feat(Create Post):** * Introduced `CreatePostDto.kt` and `CreatePostRepository.kt` to support post creation. * The repository now handles fetching categories and creating posts through a two-step process: creating post metadata and then the post body. * Added `CreatePostState` to manage the UI state for the post creation screen, including validation for content length and image limits. --- .idea/deploymentTargetSelector.xml | 2 +- .idea/deviceManager.xml | 13 + .../main/java/com/qingshuige/tangyuan/App.kt | 282 ++++++++- .../tangyuan/model/CreatePostDto.kt | 67 ++ .../qingshuige/tangyuan/navigation/Screen.kt | 2 + .../repository/CreatePostRepository.kt | 66 ++ .../ui/components/CommentComponents.kt | 11 +- .../tangyuan/ui/components/PostCardItem.kt | 2 +- .../tangyuan/ui/screens/DesignSystemScreen.kt | 591 ++++++++++++++++++ .../tangyuan/ui/screens/PostDetailScreen.kt | 6 +- .../tangyuan/ui/screens/UserDetailScreen.kt | 7 +- .../tangyuan/ui/screens/UserScreen.kt | 82 ++- 12 files changed, 1103 insertions(+), 28 deletions(-) create mode 100644 .idea/deviceManager.xml create mode 100644 app/src/main/java/com/qingshuige/tangyuan/model/CreatePostDto.kt create mode 100644 app/src/main/java/com/qingshuige/tangyuan/repository/CreatePostRepository.kt create mode 100644 app/src/main/java/com/qingshuige/tangyuan/ui/screens/DesignSystemScreen.kt diff --git a/.idea/deploymentTargetSelector.xml b/.idea/deploymentTargetSelector.xml index d912518..bf30898 100644 --- a/.idea/deploymentTargetSelector.xml +++ b/.idea/deploymentTargetSelector.xml @@ -4,7 +4,7 @@