Skip to content

[#499] MainView의 selectedTab에서 옵셔널을 제거한다#524

Merged
opficdev merged 1 commit into
developfrom
refactor/#499-selectedTab
Jun 3, 2026
Merged

[#499] MainView의 selectedTab에서 옵셔널을 제거한다#524
opficdev merged 1 commit into
developfrom
refactor/#499-selectedTab

Conversation

@opficdev
Copy link
Copy Markdown
Owner

@opficdev opficdev commented Jun 3, 2026

🔗 연관된 이슈

🎯 의도

  • MainView의 최초 선택 탭을 .home으로 고정하기 위한 탭 선택 상태 단순화

📝 작업 내용

📌 요약

  • RootView의 selectedMainTab 기본값을 .home으로 설정
  • MainView의 selectedTab 바인딩 타입을 non-optional MainTab으로 변경
  • TabView tag와 탭 변경 처리에서 optional 분기 제거

🔍 상세

  • compact layout에서는 non-optional selectedTab 기반으로 TabView 선택 처리
  • regular layout에서는 동일한 selectedTab 값으로 sidebarView 구성
  • 로그인 성공 시 selectedMainTab.home으로 재설정하여 재진입 시 초기 탭 보장

📸 영상 / 이미지 (Optional)

@opficdev opficdev self-assigned this Jun 3, 2026
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

This pull request refactors selectedTab and selectedMainTab from optional MainTab? to non-optional MainTab types in MainView and RootView, simplifying the layout rendering and tab change handling by removing unnecessary optional unwrapping. The reviewer suggested refactoring the onChange handler in MainView to use a switch statement for better safety and readability now that the tab type is non-optional.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread Application/DevLogPresentation/Sources/Main/MainView.swift
@opficdev opficdev merged commit 35aa2e4 into develop Jun 3, 2026
1 check passed
@opficdev opficdev deleted the refactor/#499-selectedTab branch June 3, 2026 00: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.

MainView의 selectedTab에서 옵셔널을 제거한다

1 participant