Skip to content

Conversation

@BeomBeom2
Copy link
Contributor

@BeomBeom2 BeomBeom2 commented Oct 14, 2025

개요

[[Chore] 16KB 페이지 지원을 위한 lib 버전 업그레이드]


PR 유형

어떤 변경 사항이 있나요?

  • 새로운 기능 추가
  • 버그 수정
  • 사용자 UI 디자인 변경
  • 코드에 영향을 주지 않는 변경사항(오타 수정, 변수명 변경 등)
  • 코드 리팩토링
  • 주석 추가 및 수정
  • 문서 수정
  • 테스트 추가, 테스트 리팩토링
  • 빌드 부분 혹은 패키지 매니저 수정
  • 파일 혹은 폴더명 수정
  • 파일 혹은 폴더 삭제

Summary by CodeRabbit

  • New Features

    • Modernized image picker in community post composer using the system photo picker.
  • Improvements

    • Added accessibility descriptions for community icons (new strings).
    • Adjusted comment text sizing, button spacing, and button sizing to prevent layout issues.
  • Chores

    • Updated map SDK to v3.23.0 and enabled build-time injection of the map client ID.

@BeomBeom2 BeomBeom2 self-assigned this Oct 14, 2025
@BeomBeom2 BeomBeom2 added the chore 세팅 관련입니다. label Oct 14, 2025
@BeomBeom2 BeomBeom2 linked an issue Oct 14, 2025 that may be closed by this pull request
@imtaejugkim
Copy link
Contributor

늦은 코드리뷰 죄송합니다!

전체적으로 확인해보니 이미지 권한 수정과 네이버 맵 버전 업데이트를 하신 것 같더라구요
다른 16KB 대응 체크리스트가 혹시 또 있을까요?

@BeomBeom2
Copy link
Contributor Author

늦은 코드리뷰 죄송합니다!

전체적으로 확인해보니 이미지 권한 수정과 네이버 맵 버전 업데이트를 하신 것 같더라구요 다른 16KB 대응 체크리스트가 혹시 또 있을까요?

다른 16KB 대응 체크리스트가 어떤걸 말하는건가요??
일단 16KB 페이지 관련 공식 문서에서 단계에 따라 진행했습니다

@coderabbitai
Copy link

coderabbitai bot commented Nov 3, 2025

Walkthrough

Replaced legacy image-picking with the Android Photo Picker API, introduced a build-time NAVER_MAP_ID manifest placeholder and bumped the Naver Maps library, and applied small layout/accessibility and button sizing adjustments.

Changes

Cohort / File(s) Summary
Naver Maps config & versions
app/build.gradle.kts, app/src/main/AndroidManifest.xml, gradle/libs.versions.toml
Added NAVER_MAP_ID manifest placeholder wired from properties in defaultConfig; replaced hard-coded com.naver.maps.map.CLIENT_ID meta-data value with ${NAVER_MAP_ID}; updated naverMaps version from 3.17.0 to 3.23.0.
Image selection migration
app/src/main/java/com/kust/kustaurant/presentation/ui/community/CommunityPostWriteActivity.kt
Replaced StartActivityForResult and manual permission flow with Android Photo Picker (PickVisualMedia / PickVisualMediaRequest); added pickMedia launcher; removed onRequestPermissionsResult and related permission handling; retains URI upload and insert-at-cursor logic.
Accessibility & layout tweaks
app/src/main/res/layout/activity_community_post_detail.xml, app/src/main/res/values/strings.xml
Added contentDescription string resources and applied them to three ImageViews; changed comment input textSize from 14dp to 14sp; adjusted padding on comment confirm button.
Button sizing refinement
app/src/main/res/layout/fragment_community_post_list.xml
Changed commu_btn_write_post width from 104dp to wrap_content and enforced single-line display (maxLines="1" / singleLine).

Sequence Diagram

sequenceDiagram
    participant User
    participant Activity as CommunityPostWriteActivity
    participant Picker as Android Photo Picker
    participant Upload as Image Upload Service

    User->>Activity: tap "select gallery"
    Activity->>Picker: launch(PickVisualMediaRequest ImageOnly)
    Note right of Picker #DDEBF7: system photo picker UI shown
    User->>Picker: pick image or cancel
    Picker-->>Activity: returns URI or null
    alt URI returned
        Activity->>Upload: upload(uri)
        Upload-->>Activity: returns uploaded image URL
        Activity->>Activity: insert image URL at cursor
    else Cancelled / no selection
        Activity-->>User: no change / handle gracefully
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Review URI permission/grant behavior and lifecycle of the pickMedia launcher in CommunityPostWriteActivity.kt.
  • Verify NAVER_MAP_ID placeholder wiring in build.gradle.kts and resolution in AndroidManifest.xml.
  • Confirm naverMaps version bump compatibility and the layout unit change (dp → sp) and new contentDescription strings for localization.

Poem

🐰 I hopped to pick a photo bright,
Swapped old intents for picker light,
A key at build-time stitched in play,
Buttons snug and icons say,
Tiny hops, the code feels right. ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The PR description fails to adequately fill the required template. The 개요 (Overview) section only repeats the PR title "[[Chore] 16KB 페이지 지원을 위한 lib 버전 업그레이드]" instead of providing a meaningful summary of what was changed and why. The PR 유형 (PR Type) section presents the full checklist of change categories but has no items selected, despite the changeset clearly containing multiple types of changes including build/package manager modifications, code refactoring (Photo Picker API migration), and UI/layout adjustments. This represents a significantly incomplete description that does not meet the template requirements. The author should expand the 개요 section with a detailed explanation of the changes beyond the title—describing what libraries were upgraded, why the Photo Picker API was adopted, and what accessibility improvements were added. Additionally, the PR 유형 section should have appropriate checkboxes selected, such as "빌드 부분 혹은 패키지 매니저 수정" for the gradle and API configuration changes, and "코드 리팩토링" for the Photo Picker API modernization.
✅ Passed checks (1 passed)
Check name Status Explanation
Title Check ✅ Passed The PR title "[Chore] 16KB 페이지 지원을 위한 lib 버전 업그레이드" (Library version upgrade to support 16KB pages) directly relates to the changeset's primary objective. The raw summary shows multiple changes that align with this purpose: upgrading the Naver Maps library from 3.17.0 to 3.23.0, migrating from legacy StartActivityForResult to the modern Android Photo Picker API, adding accessibility improvements, and configuring API key injection. These changes represent a comprehensive modernization effort to support 16KB page allocation, which is a well-defined goal in the Android development context. The title clearly and specifically communicates this intent without being vague or misleading.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
app/src/main/res/layout/fragment_community_post_list.xml (1)

155-156: Remove deprecated singleLine attribute.

android:singleLine="true" (line 155) is deprecated and functionally redundant with android:maxLines="1" (line 156). Keep only maxLines="1".

-            android:text="글쓰기"
-            android:elevation="4dp"
-            android:textColor="@color/white"
-            android:textSize="15sp"
-            android:textStyle="bold"
-            android:singleLine="true"
-            android:maxLines="1"
+            android:text="글쓰기"
+            android:elevation="4dp"
+            android:textColor="@color/white"
+            android:textSize="15sp"
+            android:textStyle="bold"
+            android:maxLines="1"
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 67d0da6 and 0fe9b38.

📒 Files selected for processing (6)
  • app/build.gradle.kts (1 hunks)
  • app/src/main/AndroidManifest.xml (2 hunks)
  • app/src/main/java/com/kust/kustaurant/presentation/ui/community/CommunityPostWriteActivity.kt (5 hunks)
  • app/src/main/res/layout/activity_community_post_detail.xml (5 hunks)
  • app/src/main/res/layout/fragment_community_post_list.xml (2 hunks)
  • gradle/libs.versions.toml (1 hunks)
🔇 Additional comments (8)
app/src/main/res/layout/fragment_community_post_list.xml (1)

139-139: Verify wrap_content width aligns with 16KB page support objective.

The button width was changed from fixed 104dp to wrap_content. With the existing end constraint to the guideline, the button will now size dynamically based on content. Please clarify whether this layout change is necessary for 16KB page size support or if it's a separate UI refinement.

app/src/main/res/layout/activity_community_post_detail.xml (2)

371-371: Confirm textSize unit change supports 16KB page size compatibility.

Line 371 shows a textSize change on the EditText. Ensure this was changed to sp (scale-independent pixels) rather than dp, as sp respects user font size preferences and is the recommended unit for text sizing in Android. This aligns with the PR's goal of supporting 16KB page sizes on compatible devices.


391-393: Padding adjustments for confirm button are appropriate.

The added paddingStart="0dp" and paddingEnd="3dp" on the confirm button's ImageView provide fine-tuned visual alignment. Ensure this padding adjustment doesn't cause visual misalignment or overflow on different screen densities.

app/src/main/AndroidManifest.xml (1)

120-122: LGTM! Secure API key management.

Moving the Naver Maps client ID to a build-time placeholder keeps sensitive credentials out of version control and aligns with Android security best practices.

app/build.gradle.kts (1)

44-44: LGTM! Manifest placeholder correctly configured.

The NAVER_MAP_ID placeholder is properly configured and follows the same pattern as the existing KAKAO_NATIVE_KEY. Ensure that naver_map_id is documented in your setup instructions or README for other developers.

app/src/main/java/com/kust/kustaurant/presentation/ui/community/CommunityPostWriteActivity.kt (2)

16-16: Excellent migration to Photo Picker API.

The migration from the legacy startActivityForResult pattern to the modern Photo Picker API is the correct approach for Android 13+ and aligns with 16KB page support requirements. This provides better user privacy and requires fewer permissions.

Also applies to: 38-38


163-183: Well-implemented Photo Picker integration.

The implementation correctly uses ActivityResultContracts.PickVisualMedia with:

  • Proper registration in initPhotoPicker()
  • ImageOnly filter for appropriate media selection
  • Coroutine-based async upload handling
  • Clean separation of concerns

This eliminates the need for manual permission handling on Android 13+ while maintaining backward compatibility through the READ_EXTERNAL_STORAGE permission (maxSdkVersion="32") in the manifest.

gradle/libs.versions.toml (1)

24-24: I need to search more specifically for GitHub release information to verify the 16KB page support claim and check for any documented breaking changes.

Let me search more specifically for 16KB page support and NDK-related compatibility:

Based on my verification, I can now provide the rewritten review comment.

Verify Naver Maps SDK compatibility and test thoroughly before publishing.

The upgrade from 3.17.0 to 3.23.0 spans six minor versions. Starting November 1st, 2025, all new apps and updates to existing apps submitted to Google Play and targeting Android 15+ devices must support 16 KB page sizes, and if your app uses any NDK libraries, either directly or indirectly through an SDK, then you will need to rebuild your app for it to work on these 16 KB devices. Naver Maps SDK contains native code (.so files), making this upgrade likely necessary for Google Play compliance.

Ensure that:

  • The upgrade has been tested with your map features
  • Any API changes or deprecations have been addressed
  • The new version is stable in your target environments

android:id="@+id/community_iv_user_icon"
android:layout_width="16dp"
android:layout_height="16dp"
android:contentDescription="유저 아이콘 입니다."
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

Externalizing contentDescription strings to strings.xml for consistency and localization.

The PR adds contentDescription attributes to three ImageViews (lines 131, 282, 309) as accessibility improvements, which is good. However, the implementation is inconsistent: some ImageViews in this file reference string resources (e.g., line 45: @string/back_btn_info, line 151: @string/community_post_img_info), while the new ones use inline Korean strings.

For consistency and to support localization, move these inline contentDescription strings to strings.xml:

<!-- In strings.xml -->
<string name="community_user_icon_info">유저 아이콘 입니다.</string>
<string name="community_like_icon_info">좋아요 아이콘 입니다.</string>
<string name="community_scrap_icon_info">스크랩 아이콘입니다.</string>

Then update the layout:

- android:contentDescription="유저 아이콘 입니다."
+ android:contentDescription="@string/community_user_icon_info"

- android:contentDescription="좋아요 아이콘 입니다."
+ android:contentDescription="@string/community_like_icon_info"

- android:contentDescription="스크랩 아이콘입니다."
+ android:contentDescription="@string/community_scrap_icon_info"

Also applies to: 282-282, 309-309

🤖 Prompt for AI Agents
In app/src/main/res/layout/activity_community_post_detail.xml at lines 131, 282
and 309, three ImageView contentDescription attributes use inline Korean strings
which breaks consistency with other entries and prevents localization; move
those inline strings into app/src/main/res/values/strings.xml using resource
names like community_user_icon_info, community_like_icon_info and
community_scrap_icon_info (with the provided Korean values), then replace the
inline contentDescription values in the layout with references to
@string/community_user_icon_info, @string/community_like_icon_info and
@string/community_scrap_icon_info respectively so all contentDescription
attributes consistently use string resources and support localization.

@coderabbitai
Copy link

coderabbitai bot commented Nov 3, 2025

Note

Unit test generation is an Early Access feature. Expect some limitations and changes as we gather feedback and continue to improve it.


Generating unit tests... This may take up to 20 minutes.

@coderabbitai
Copy link

coderabbitai bot commented Nov 3, 2025

Caution

The CodeRabbit agent failed during execution: Clone operation failed

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0fe9b38 and 6afd7e3.

📒 Files selected for processing (3)
  • app/src/main/res/layout/activity_community_post_detail.xml (5 hunks)
  • app/src/main/res/layout/fragment_community_post_list.xml (2 hunks)
  • app/src/main/res/values/strings.xml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/src/main/res/layout/activity_community_post_detail.xml
🔇 Additional comments (2)
app/src/main/res/layout/fragment_community_post_list.xml (1)

137-157: Button sizing improvements support responsive layout.

The change from fixed width (104dp) to wrap_content increases layout flexibility across screen densities and text variations (including i18n). The maxLines="1" constraint ensures text stays single-line, maintaining the compact button design. With horizontal padding (20dp start/end) and a drawable end, the button will size appropriately based on content while respecting the fixed 37dp height and visual constraints.

app/src/main/res/values/strings.xml (1)

34-36: Accessibility strings added for community icon descriptions.

The three new content-description strings (community_user_icon_info, community_like_icon_info, community_scrap_icon_info) are appropriate additions to support screen reader and accessibility features for community icons. The strings follow the existing accessibility pattern in the file and integrate well with the PR's broader UI/accessibility improvements.

Copy link

@coderabbitai coderabbitai bot left a 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)
app/src/main/res/values/strings.xml (1)

34-36: Inconsistent spacing in Korean text—consider adding space before "입니다".

The three new Community string entries (lines 34–36) read "X 아이콘입니다" (no space before "입니다"), which is inconsistent with existing similar entries on lines 9–11, which follow the pattern "X 아이콘 입니다" (with space). For consistency with the existing "아이콘" entries, consider updating these to include a space.

Apply this diff to align with existing entries:

-    <string name="community_user_icon_info">유저 아이콘입니다.</string>
-    <string name="community_like_icon_info">좋아요 아이콘입니다.</string>
-    <string name="community_scrap_icon_info">스크랩 아이콘입니다.</string>
+    <string name="community_user_icon_info">유저 아이콘 입니다.</string>
+    <string name="community_like_icon_info">좋아요 아이콘 입니다.</string>
+    <string name="community_scrap_icon_info">스크랩 아이콘 입니다.</string>
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6afd7e3 and 40e4d57.

📒 Files selected for processing (1)
  • app/src/main/res/values/strings.xml (1 hunks)

@BeomBeom2 BeomBeom2 merged commit 1b17701 into kustaurant:main Nov 4, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore 세팅 관련입니다.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Chore] 16KB 페이지 지원을 위한 lib 버전 업그레이드

2 participants