Skip to content

fix(TopNavigation): TrailingContents, LeadingButton contentShape를 고정 패딩으로 변경#456

Merged
knine79 merged 1 commit intomainfrom
fix/topnavigation-contentshape-padding
Apr 7, 2026
Merged

fix(TopNavigation): TrailingContents, LeadingButton contentShape를 고정 패딩으로 변경#456
knine79 merged 1 commit intomainfrom
fix/topnavigation-contentshape-padding

Conversation

@knine79
Copy link
Copy Markdown
Contributor

@knine79 knine79 commented Apr 6, 2026

개요

수정사항

  • TopNavigation.TrailingContentsLeadingButtoncontentShape(Rectangle().scale(2))contentShape(Rectangle().inset(by: -10))으로 변경
  • 2배 스케일링 대신 고정 10pt 패딩으로 터치 영역을 확장하여, 넓은 커스텀 버튼(예: 이력서 상세의 리뷰 버튼)이 인접 버튼과 접근성 프레임이 겹치는 문제 해결

미리보기

N/A (접근성 프레임 변경으로 시각적 차이 없음)

Summary by CodeRabbit

릴리스 노트

  • 버그 수정
    • 상단 네비게이션 버튼의 터치 타겟 영역을 개선하여 더 정확한 탭 인식성을 제공합니다.

@knine79 knine79 self-assigned this Apr 6, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 6, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: bc0c7e07-3df0-4c2e-9ce4-bf4da0055da7

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • ✅ Review completed - (🔄 Check again to review again)
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/topnavigation-contentshape-padding

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

Copy link
Copy Markdown

@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.

🧹 Nitpick comments (1)
Sources/Montage/1 Components/6 Navigations/TopNavigation.swift (1)

506-506: -10 인셋 값을 공용 상수로 추출해두는 것을 권장합니다.

동일 매직 넘버가 두 위치에 중복되어 있어, 추후 hit area 조정 시 한쪽만 수정될 위험이 있습니다.

제안 diff
 public struct TopNavigation: View {
+    private static let hitAreaInset: CGFloat = -10
@@
     struct TrailingContents: View {
@@
                     contents[index]()
-                        .contentShape(Rectangle().inset(by: -10)) // 터치영역 확장 (고정 패딩)
+                        .contentShape(Rectangle().inset(by: TopNavigation.hitAreaInset)) // 터치영역 확장 (고정 패딩)
                 }
             }
         }
     }
@@
                 }
-                .contentShape(Rectangle().inset(by: -10)) // 터치영역 확장 (고정 패딩)
+                .contentShape(Rectangle().inset(by: TopNavigation.hitAreaInset)) // 터치영역 확장 (고정 패딩)
             } else {

Also applies to: 563-563

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@Sources/Montage/1` Components/6 Navigations/TopNavigation.swift at line 506,
Extract the magic value -10 into a shared constant (e.g., TOUCH_AREA_INSET or
touchAreaInset: CGFloat) defined near the TopNavigation view (file-level private
or static property on TopNavigation) and replace the two occurrences of
.contentShape(Rectangle().inset(by: -10)) with
.contentShape(Rectangle().inset(by: TOUCH_AREA_INSET)); ensure both instances
(the one currently at contentShape with inset and the other occurrence around
line 563) use the same constant so future hit-area adjustments require changing
only that single definition.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@Sources/Montage/1` Components/6 Navigations/TopNavigation.swift:
- Line 506: Extract the magic value -10 into a shared constant (e.g.,
TOUCH_AREA_INSET or touchAreaInset: CGFloat) defined near the TopNavigation view
(file-level private or static property on TopNavigation) and replace the two
occurrences of .contentShape(Rectangle().inset(by: -10)) with
.contentShape(Rectangle().inset(by: TOUCH_AREA_INSET)); ensure both instances
(the one currently at contentShape with inset and the other occurrence around
line 563) use the same constant so future hit-area adjustments require changing
only that single definition.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4a2d3c9c-3d3b-46d8-9ef4-0b3500e57695

📥 Commits

Reviewing files that changed from the base of the PR and between 615ffb4 and 7e2781b.

📒 Files selected for processing (1)
  • Sources/Montage/1 Components/6 Navigations/TopNavigation.swift

@github-actions github-actions bot added the in review This issue requires a review. label Apr 6, 2026
@knine79 knine79 marked this pull request as ready for review April 6, 2026 09:58
@knine79 knine79 requested a review from a team as a code owner April 6, 2026 09:58
@knine79 knine79 requested review from deholic, jhseo and szzang-kr and removed request for a team April 6, 2026 09:58
@knine79 knine79 added this to the 3.4.5 milestone Apr 7, 2026
@github-actions github-actions bot added accepted This issue has been reviewed. and removed in review This issue requires a review. labels Apr 7, 2026
@knine79 knine79 merged commit 9b7fb28 into main Apr 7, 2026
5 checks passed
@knine79 knine79 deleted the fix/topnavigation-contentshape-padding branch April 7, 2026 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accepted This issue has been reviewed. AI Review Completed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants