Skip to content

[#190] adaptiveButtonStyle을 개선한다#195

Merged
opficdev merged 3 commits intodevelopfrom
feat/#190-adaptiveButtonStyleBorder
Mar 5, 2026
Merged

[#190] adaptiveButtonStyle을 개선한다#195
opficdev merged 3 commits intodevelopfrom
feat/#190-adaptiveButtonStyleBorder

Conversation

@opficdev
Copy link
Copy Markdown
Owner

@opficdev opficdev commented Mar 5, 2026

@opficdev opficdev self-assigned this Mar 5, 2026
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 adaptiveButtonStyle의 시각적 동작을 개선하는 데 중점을 둡니다. glassEffect 사용 시 클리핑 문제를 해결하고, 투명한 배경의 렌더링 방식을 표준화하여 UI의 전반적인 일관성과 미학을 향상시킵니다.

Highlights

  • UI 개선: adaptiveButtonStyle에 glassEffect가 적용될 때 뷰가 올바르게 잘리도록 clipShape 모디파이어를 추가했습니다.
  • 배경 색상 일관성: adaptiveButtonStyle에서 color가 .clear일 때 배경 채우기를 .ultraThinMaterial에서 Color(.systemGray5)로 변경하여 시각적 일관성을 높였습니다.
Changelog
  • DevLog/UI/Extension/View+.swift
    • adaptiveButtonStyle에 clipShape 모디파이어를 추가하여 뷰가 올바르게 잘리도록 했습니다.
    • color가 .clear일 때 배경 채우기를 .ultraThinMaterial에서 Color(.systemGray5)로 변경했습니다.
Activity
  • 이 PR은 이슈 #190을 닫는 것과 연결되어 있습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

adaptiveButtonStyle 수정을 검토했습니다. visionOS를 타겟으로 하는 것으로 보이는 코드 분기 조건에 심각한 오류가 있어 수정이 필요합니다. 이로 인해 visionOS에서 의도한 UI가 표시되지 않을 수 있습니다. 또한, 코드 가독성을 높이기 위한 작은 스타일 개선 사항도 제안했습니다. 자세한 내용은 각 주석을 확인해주세요.

self.foregroundStyle(Color(.label))
.padding(8)
.glassEffect(.regular.tint(color), in: shape)
.clipShape(shape)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

critical

이 코드가 포함된 if #available(iOS 26.0, *) 조건문은 glassEffect가 사용된 것으로 보아 visionOS를 대상으로 하는 것으로 보입니다. 하지만 iOS 26.0은 유효한 OS 버전이 아니므로 이 조건은 항상 거짓이 되어, 이 코드 블록은 절대로 실행되지 않습니다.

visionOS 용 코드를 분기하려면 #if os(visionOS) 전처리기 지시문을 사용하는 것이 올바른 방법입니다.

#if os(visionOS)
    self.foregroundStyle(Color(.label))
        .padding(8)
        .glassEffect(.regular.tint(color), in: shape)
        .clipShape(shape)
#else
    // ... 다른 OS를 위한 fallback 코드
#endif

현재 구현은 의도와 다르게 항상 else 블록의 코드를 실행하게 되므로, visionOS 특정 UI가 적용되지 않는 심각한 문제입니다. 상위의 if #available 문을 수정해주세요.

Comment thread DevLog/UI/Extension/View+.swift Outdated
if color == .clear {
shape
.fill(.ultraThinMaterial)
.fill((Color(.systemGray5)))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

.fill 메소드에 전달된 Color(.systemGray5)를 감싸는 불필요한 괄호가 있습니다. 코드 가독성을 위해 제거하는 것이 좋습니다.

Suggested change
.fill((Color(.systemGray5)))
.fill(Color(.systemGray5))

@opficdev opficdev merged commit 6a479f5 into develop Mar 5, 2026
1 check passed
@opficdev opficdev deleted the feat/#190-adaptiveButtonStyleBorder branch March 5, 2026 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

adapativeButtonStyle에 iOS 18 이하일 경우 + 라이트 모드일 경우 얇게 보이는 테두리를 추가한다

1 participant