Skip to content

[feature] 메뉴 페이지#1633

Open
seongwon030 wants to merge 5 commits into
feature/web-shell-migrationfrom
feature/#1624-add-menu-page-MOA-927
Open

[feature] 메뉴 페이지#1633
seongwon030 wants to merge 5 commits into
feature/web-shell-migrationfrom
feature/#1624-add-menu-page-MOA-927

Conversation

@seongwon030
Copy link
Copy Markdown
Member

@seongwon030 seongwon030 commented Jun 1, 2026

요약

바텀 네비 웹뷰 이관(MOA-923)의 메뉴 탭 구현. /webview/menu에서 서비스 소개·총동아리연합회·개인정보 처리방침과 앱 버전을 보여준다.

변경

  • WebviewMenuPage — 메뉴 항목 3개 + 앱 버전
  • useNavigator(handleLink)로 인앱(requestNavigateWebview)/웹(navigate)/외부 URL 분기 재사용
  • webviewBridgeREQUEST_APP_VERSION/APP_VERSION 메시지 + requestAppVersion() 추가
  • useAppVersion 훅 신규 (브릿지로 앱 버전 수신, 웹에서는 미표시)
  • PAGE_VIEW.WEBVIEW_MENU_PAGE, USER_EVENT.WEBVIEW_MENU_CLICKED 추가

의존성

- WebviewBottomNav(홈/구독/메뉴) 신규, 상단 필터칩(동아리/홍보)과 별개 config
- WebviewLayout에 영구 바텀바 장착 + 콘텐츠 하단 패딩
- /webview/subscribed, /webview/menu 라우트 추가 (페이지는 placeholder, 후속 구현)
- 동아리 상세에서 바텀바 숨김, 홈 탭은 main/promotions에서 활성
- /webview/menu: 서비스 소개/총동아리연합회/개인정보 처리방침 + 앱 버전
- useNavigator로 인앱/웹 네비게이션 분기 재사용
- webviewBridge APP_VERSION 메시지 + requestAppVersion, useAppVersion 훅 추가
- PAGE_VIEW.WEBVIEW_MENU_PAGE, USER_EVENT.WEBVIEW_MENU_CLICKED 추가
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
moadong Ready Ready Preview, Comment Jun 1, 2026 2:27pm

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 1, 2026

Warning

Review limit reached

@seongwon030, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 7 minutes and 59 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 80034834-e96f-442a-abc6-ea4e21703793

📥 Commits

Reviewing files that changed from the base of the PR and between b7439f5 and 7a5b0b8.

📒 Files selected for processing (12)
  • frontend/src/components/common/WebviewBottomNav/WebviewBottomNav.styles.ts
  • frontend/src/components/common/WebviewBottomNav/WebviewBottomNav.tsx
  • frontend/src/constants/eventName.ts
  • frontend/src/hooks/useAppVersion.ts
  • frontend/src/pages/WebviewLayout/WebviewLayout.styles.ts
  • frontend/src/pages/WebviewLayout/WebviewLayout.tsx
  • frontend/src/pages/WebviewMenuPage/WebviewMenuPage.styles.ts
  • frontend/src/pages/WebviewMenuPage/WebviewMenuPage.tsx
  • frontend/src/pages/WebviewSubscribedPage/WebviewSubscribedPage.tsx
  • frontend/src/routes/webviewBottomNavConfig.ts
  • frontend/src/routes/webviewRoutes.tsx
  • frontend/src/utils/webviewBridge.ts

Warning

.coderabbit.yaml has a parsing error

The CodeRabbit configuration file in this repository has a parsing error and default settings were used instead. Please fix the error(s) in the configuration file. You can initialize chat with CodeRabbit to get help with the configuration file.

💥 Parsing errors (1)
Validation error: Invalid regex pattern for base branch. at "reviews.auto_review.base_branches[0]"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/#1624-add-menu-page-MOA-927

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
Copy Markdown

@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 introduces a webview bottom navigation bar, layout adjustments, and a new menu page that displays the app version using a custom hook and webview bridge. The review feedback highlights a potential runtime error in the message handler of useAppVersion when processing unexpected event data, and suggests safer parsing. Additionally, the reviewer recommends dynamically adjusting the layout's bottom padding so that pages without the bottom navigation bar do not display unnecessary empty space.

Comment on lines +9 to +20
const handleMessage = (event: MessageEvent) => {
let data: AppToWebMessage;
try {
data =
typeof event.data === 'string' ? JSON.parse(event.data) : event.data;
} catch {
return;
}
if (data.type === 'APP_VERSION') {
setVersion(data.payload.version);
}
};
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

외부 스크립트, 브라우저 확장 프로그램, 또는 개발 서버(Webpack Dev Server 등)에서 전송되는 message 이벤트의 event.datanull이거나 예상치 못한 형식일 경우, try-catch 블록 외부에서 data.type에 접근하면서 TypeError가 발생하여 스크립트가 크래시될 수 있습니다.

안전한 예외 처리를 위해 메시지 파싱과 타입 검사, 상태 업데이트 로직 전체를 try-catch 블록 내부로 포함하고, data가 유효한 객체인지 검증하는 방어 코드를 추가하는 것이 좋습니다.

    const handleMessage = (event: MessageEvent) => {
      try {
        const data = (typeof event.data === 'string' ? JSON.parse(event.data) : event.data) as AppToWebMessage | null;
        if (data && typeof data === 'object' && data.type === 'APP_VERSION') {
          setVersion(data.payload.version);
        }
      } catch {
        return;
      }
    };

Comment on lines 1 to 16
import { Outlet } from 'react-router-dom';
import WebviewBottomNav from '@/components/common/WebviewBottomNav/WebviewBottomNav';
import WebviewGlobalStyles from '@/styles/WebviewGlobal.styles';
import * as Styled from './WebviewLayout.styles';

const WebviewLayout = () => {
return (
<>
<WebviewGlobalStyles />
<Outlet />
<Styled.ContentArea>
<Outlet />
</Styled.ContentArea>
<WebviewBottomNav />
</>
);
};
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

WebviewBottomNav 컴포넌트 내부에서 /webview/club으로 시작하는 경로(동아리 상세 등)일 때는 바텀바를 렌더링하지 않도록 처리되어 있습니다. 하지만 WebviewLayoutContentArea는 항상 고정된 padding-bottom을 가지고 있어, 바텀바가 없는 풀스크린 페이지에서도 하단에 불필요한 여백이 생기게 됩니다.

현재 경로에 따라 ContentArea$hasBottomNav와 같은 transient prop을 전달하여 조건부로 padding-bottom을 적용하도록 개선하는 것이 좋습니다.

Suggested change
import { Outlet } from 'react-router-dom';
import WebviewBottomNav from '@/components/common/WebviewBottomNav/WebviewBottomNav';
import WebviewGlobalStyles from '@/styles/WebviewGlobal.styles';
import * as Styled from './WebviewLayout.styles';
const WebviewLayout = () => {
return (
<>
<WebviewGlobalStyles />
<Outlet />
<Styled.ContentArea>
<Outlet />
</Styled.ContentArea>
<WebviewBottomNav />
</>
);
};
import { Outlet, useLocation } from 'react-router-dom';
import WebviewBottomNav from '@/components/common/WebviewBottomNav/WebviewBottomNav';
import WebviewGlobalStyles from '@/styles/WebviewGlobal.styles';
import * as Styled from './WebviewLayout.styles';
const WebviewLayout = () => {
const { pathname } = useLocation();
const hasBottomNav = !pathname.startsWith('/webview/club');
return (
<>
<WebviewGlobalStyles />
<Styled.ContentArea $hasBottomNav={hasBottomNav}>
<Outlet />
</Styled.ContentArea>
<WebviewBottomNav />
</>
);
};

Comment on lines +4 to +8
export const ContentArea = styled.div`
padding-bottom: calc(
${WEBVIEW_BOTTOM_NAV_HEIGHT}px + env(safe-area-inset-bottom)
);
`;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

WebviewLayout에서 전달받은 $hasBottomNav prop에 따라 조건부로 하단 패딩을 적용하도록 스타일을 수정합니다.

Suggested change
export const ContentArea = styled.div`
padding-bottom: calc(
${WEBVIEW_BOTTOM_NAV_HEIGHT}px + env(safe-area-inset-bottom)
);
`;
export const ContentArea = styled.div<{ $hasBottomNav: boolean }>(({ $hasBottomNav }) => ({
paddingBottom: $hasBottomNav
? "calc(" + WEBVIEW_BOTTOM_NAV_HEIGHT + "px + env(safe-area-inset-bottom))"
: "0",
}));

@seongwon030 seongwon030 changed the title feat: 메뉴 페이지 (#1624) [feature] 메뉴 페이지 Jun 1, 2026
- 동아리 상세에서 바텀바 숨김 + 하단 패딩 제거를 WebviewLayout에서 일괄 제어
- WebviewBottomNav 중복 경로 체크 제거, isActive 타입을 WebviewBottomNavPath로
- NavButton에 aria-current 추가, 스타일 theme를 ThemeProvider accessor로
- 파싱/타입검사/상태업데이트를 try 블록 내부로 이동
- data 객체 유효성 가드로 예기치 못한 message 이벤트의 TypeError 방지
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.

1 participant