-
Notifications
You must be signed in to change notification settings - Fork 4
[REFACTOR] png to svg #18
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
[REFACTOR] png to svg #18
Conversation
Walkthroughํ ํ๋ฉด๊ณผ ๋ฉค๋ฒ ์์ดํ ์ ์ ์ ๋ฆฌ์์ค ์ด๋ฏธ์ง๋ฅผ Coil AsyncImage(URI ๊ธฐ๋ฐ)๋ก ์ ํํ๊ณ , Coil 3 SVG/๋คํธ์ํฌ ๊ด๋ จ ์์กด์ฑ๊ณผ iOS ์๋ฎฌ๋ ์ดํฐ ํ๊น์ ๋น๋ ์ค์ ์ ์ถ๊ฐํ์ต๋๋ค. ๊ณต๊ฐ API ์๊ทธ๋์ฒ์ ๋ก์ง ํ๋ฆ์ ๋ณ๊ฒฝ๋์ง ์์์ต๋๋ค. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant UI as Compose UI
participant AsyncImage as Coil AsyncImage
participant Coil as Coil Engine
participant Decoder as SVG Decoder
participant FS as Local Files
participant Net as Network (OkHttp/Ktor)
User->>UI: ํ๋ฉด ๋ ๋๋ง ์์ฒญ
UI->>AsyncImage: model = Res.getUri("files/*.svg")
AsyncImage->>Coil: ์ด๋ฏธ์ง ์์ฒญ
alt ๋ก์ปฌ ํ์ผ URI
Coil->>FS: ํ์ผ ์ฝ๊ธฐ
FS-->>Coil: ๋ฐ์ดํธ ์คํธ๋ฆผ
else ์๊ฒฉ ์์ (ํด๋น ์)
Coil->>Net: ๋คํธ์ํฌ ์์ฒญ
Net-->>Coil: ์๋ต ์คํธ๋ฆผ
end
Coil->>Decoder: SVG ๋์ฝ๋ฉ
Decoder-->>Coil: ๋์ฝ๋ฉ ๊ฒฐ๊ณผ
Coil-->>AsyncImage: ๋ ๋๋ง ๊ฐ๋ฅํ ์ด๋ฏธ์ง ์ ๋ฌ
AsyncImage-->>UI: ์ปดํฌ์ง์
์ ๊ทธ๋ฆฌ๊ธฐ
Estimated code review effort๐ฏ 3 (Moderate) | โฑ๏ธ ~20 minutes Poem
Pre-merge checks and finishing touchesโ Failed checks (1 warning)
โ Passed checks (4 passed)
โจ Finishing touches
๐งช Generate unit tests
๐ Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro ๐ Files selected for processing (1)
๐ง Files skipped from review as they are similar to previous changes (1)
โฐ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
Tip ๐ฎ Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
๐งน Nitpick comments (1)
composeApp/src/commonMain/kotlin/org/whosin/client/presentation/home/HomeScreen.kt (1)
165-172: ์๋ก๊ณ ์นจ ์์ด์ฝ์ด AsyncImage๋ก ๋ณ๊ฒฝ๋์์ต๋๋ค์ผ๊ด์ฑ ์๊ฒ AsyncImage๋ก ๋ณํ๋์๋ค์. ๋ค๋ง Line 171์ ์ฃผ์ ์ฒ๋ฆฌ๋ ํด๋ฆญ ์ด๋ฒคํธ๊ฐ ์๋๋ฐ, ์ด๊ฒ๋ ํ์ฑํํ๋ฉด ์ข์ ๊ฒ ๊ฐ์ต๋๋ค.
๋ง์ฝ ์๋ก๊ณ ์นจ ๊ธฐ๋ฅ์ด ํ์ํ๋ค๋ฉด ์ฃผ์ ์ฒ๋ฆฌ๋ ํด๋ฆญ ์ด๋ฒคํธ๋ฅผ ํ์ฑํํด๋ณด์ธ์:
-// .clickable(onClick = onNavigateToMyPage) + .clickable(onClick = onRefresh)๊ทธ๋ฆฌ๊ณ HomeScreen์ ํ๋ผ๋ฏธํฐ์
onRefresh: () -> Unit์ ์ถ๊ฐํ๋ฉด ๋ฉ๋๋ค.
๐ Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
โ Files ignored due to path filters (14)
composeApp/src/commonMain/composeResources/drawable/ic_hamburger.pngis excluded by!**/*.pngcomposeApp/src/commonMain/composeResources/drawable/ic_profile.pngis excluded by!**/*.pngcomposeApp/src/commonMain/composeResources/drawable/ic_refresh.pngis excluded by!**/*.pngcomposeApp/src/commonMain/composeResources/drawable/img_eyes_closed.pngis excluded by!**/*.pngcomposeApp/src/commonMain/composeResources/drawable/img_eyes_half_closed.pngis excluded by!**/*.pngcomposeApp/src/commonMain/composeResources/drawable/img_eyes_half_opened.pngis excluded by!**/*.pngcomposeApp/src/commonMain/composeResources/drawable/img_eyes_opened.pngis excluded by!**/*.pngcomposeApp/src/commonMain/composeResources/files/ic_eyes_closed.svgis excluded by!**/*.svgcomposeApp/src/commonMain/composeResources/files/ic_eyes_half_closed.svgis excluded by!**/*.svgcomposeApp/src/commonMain/composeResources/files/ic_eyes_half_opened.svgis excluded by!**/*.svgcomposeApp/src/commonMain/composeResources/files/ic_eyes_opened.svgis excluded by!**/*.svgcomposeApp/src/commonMain/composeResources/files/ic_hamburger.svgis excluded by!**/*.svgcomposeApp/src/commonMain/composeResources/files/ic_profile.svgis excluded by!**/*.svgcomposeApp/src/commonMain/composeResources/files/ic_refresh.svgis excluded by!**/*.svg
๐ Files selected for processing (4)
composeApp/build.gradle.kts(1 hunks)composeApp/src/commonMain/kotlin/org/whosin/client/presentation/home/HomeScreen.kt(4 hunks)composeApp/src/commonMain/kotlin/org/whosin/client/presentation/home/component/PresentMembersItem.kt(3 hunks)gradle/libs.versions.toml(2 hunks)
โฐ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: android-build
๐ Additional comments (9)
composeApp/build.gradle.kts (1)
93-97: Coil SVG ์์กด์ฑ ์ถ๊ฐ๊ฐ ์ ๋์์ต๋๋คCoil 3์์ coil-svg ์ํฐํฉํธ๋ ๋ฉํฐํ๋ซํผ์ ์ง์ํ๊ณ , Coil 3๋ ์ด์ Android, JVM, iOS, macOS, Javascript, WASM์ ์ง์ํ๋ Kotlin Multiplatform ๋ผ์ด๋ธ๋ฌ๋ฆฌ์ ๋๋ค. ์ต์ ๋ฒ์ ์ธ 3.3.0์ ์ฌ์ฉํ๊ณ ์์ด ์ข๋ค์.
๋คํธ์ํน ์์กด์ฑ๋ ์ ์ ํ๊ฒ ์ถ๊ฐ๋์๊ณ , commonMain์ ์์น์์ผ ๋ชจ๋ ํ๋ซํผ์์ SVG๋ฅผ ์ฌ์ฉํ ์ ์๋๋ก ๊ตฌ์ฑ์ด ์ ๋์ด ์์ต๋๋ค.
gradle/libs.versions.toml (2)
12-12: Coil SVG ๋ฒ์ ์ค์ ์ด ์ ์ ํฉ๋๋คํ์ฌ ์ต์ ๋ฒ์ ์ธ 3.3.0์ ์ฌ์ฉํ๊ณ ์์ด ์ข์ต๋๋ค.
25-28: ๋ผ์ด๋ธ๋ฌ๋ฆฌ ์ ์ธ์ด ๊น๋ํ๊ฒ ์ ๋ฆฌ๋์์ต๋๋คํ์ํ Coil ๋ชจ๋๋ค์ด ๋ชจ๋ ํฌํจ๋์ด ์๊ณ , ๋ฒ์ ์ฐธ์กฐ๋ฅผ ํตํด ์ผ๊ด์ฑ ์๊ฒ ๊ด๋ฆฌ๋๊ณ ์์ต๋๋ค.
composeApp/src/commonMain/kotlin/org/whosin/client/presentation/home/HomeScreen.kt (3)
43-43: AsyncImage import๊ฐ ์ถ๊ฐ๋์์ต๋๋คCoil 3์ coil3.compose.AsyncImage๋ฅผ ์ฌ์ฉํ๋ ๊ฒ์ด ์ฌ๋ฐ๋ฅธ ์ ๊ทผ์ ๋๋ค.
118-129: ํ๋ฒ๊ฑฐ ๋ฉ๋ด ์์ด์ฝ์ด AsyncImage๋ก ๋ณ๊ฒฝ๋์์ต๋๋คPNG์์ SVG๋ก ๋ณํํ๋ ๋ชฉํ์ ๋ง๊ฒ ์ ๋ณ๊ฒฝ๋์์ต๋๋ค.
Res.getUri("files/ic_hamburger.svg")์ฌ์ฉ๋ฒ์ด ์ ์ ํฉ๋๋ค.
131-138: ํ๋กํ ์์ด์ฝ์ด AsyncImage๋ก ๋ณ๊ฒฝ๋์์ต๋๋ค๋ง์ฐฌ๊ฐ์ง๋ก SVG๋ก ์ ๋ณํ๋์์ต๋๋ค.
composeApp/src/commonMain/kotlin/org/whosin/client/presentation/home/component/PresentMembersItem.kt (3)
23-23: AsyncImage import๊ฐ ์ถ๊ฐ๋์์ต๋๋คcoil3.compose.AsyncImage๋ฅผ ์ฌ๋ฐ๋ฅด๊ฒ importํ์ต๋๋ค.
34-40: ํ๋กํ ์ด๋ฏธ์ง๋ค์ด SVG ๊ฒฝ๋ก๋ก ๋ณ๊ฒฝ๋์์ต๋๋คPNG ๋ฆฌ์์ค์์ SVG ํ์ผ ๊ฒฝ๋ก๋ก ์ ๋ณํ๋์์ต๋๋ค. "files/" prefix๋ฅผ ์ฌ์ฉํ๋ ๊ฒ์ด ์ผ๊ด๋ ํจํด์ด๋ค์.
73-77: AsyncImage๋ก ์ด๋ฏธ์ง ๋ก๋ฉ์ด ๋ณ๊ฒฝ๋์์ต๋๋ค
Res.getUri(imageRes)๋ฅผ ํตํด ๋๋ค ์ ํ๋ SVG ์ด๋ฏธ์ง๋ฅผ ๋ก๋ฉํ๋๋ก ์ ๋ณ๊ฒฝ๋์์ต๋๋ค. SVG์ ๋ฒกํฐ ํน์ฑ์ ๋์ด๋ง ์ง์ ํด๋ ๋น์จ์ด ์ ์ง๋์ด ์ข์ต๋๋ค.
๐ ์ด์๋ฒํธ
โ๏ธ ๋ณ๊ฒฝ์ฌํญ
๐ท ์คํฌ๋ฆฐ์ท
โ๏ธ ์ฌ์ฉ๋ฒ
Res.getUri("files/ic_hamburger.svg")์ด๋ฐ์์ผ๋ก ๋ฃ์ด์ ์ฐ๋ฉด ๋ฉ๋๋ค๐ธ ๊ธฐํ
Summary by CodeRabbit