[251111] fix: MediaPlayer OverlayState-1

🕐 커밋 시간: 2025. 11. 11. 17:17:07

📊 변경 통계:
  • 총 파일: 3개
  • 추가: +55줄
  • 삭제: -15줄

📝 수정된 파일:
  ~ com.twin.app.shoptime/src/views/DetailPanel/ProductContentSection/ProductVideo/ProductVideo.v2.jsx
  ~ com.twin.app.shoptime/src/views/MainView/MainView.jsx
  ~ com.twin.app.shoptime/src/views/PlayerPanel/PlayerOverlay/PlayerOverlayContents.jsx

🔧 주요 변경 내용:
  • 소규모 기능 개선
This commit is contained in:
2025-11-11 17:17:09 +09:00
parent bca5e4afde
commit ff9fd163ac
3 changed files with 55 additions and 15 deletions

View File

@@ -79,6 +79,9 @@ import UserReviewPanel from '../UserReview/UserReviewPanel';
import WelcomeEventPanel from '../WelcomeEventPanel/WelcomeEventPanel';
import css from './MainView.module.less';
// DEBUG_MODE 상수 - true일 때만 console.log 출력
const DEBUG_MODE = false;
const preloadImages = [
LoadingPreloadImage,
LoadingAnimation,
@@ -160,7 +163,7 @@ export default function MainView({ className, initService }) {
const [imagePreloaded, setImagePreloaded] = useState(false);
const [ariaHidden, setAriaHidden] = useState(false);
const [showEndOfServicePopup, setShowEndOfServicePopup] = useState(false);
const topPanel = panels[panels.length - 1];
// BUYNOW_CONFIG 초기화 (마운트 시 한 번만 실행)
@@ -201,13 +204,17 @@ export default function MainView({ className, initService }) {
const topPanel = panels[panels.length - 1];
// 단독 패널 체크 - CheckOutPanel, CartPanel 등 단독으로 렌더링되어야 하는 패널들
console.log(`[MainView] 🔍 Top panel name: ${topPanel?.name}`);
console.log(`[MainView] 🔍 isStandalonePanel check:`, isStandalonePanel(topPanel?.name));
console.log(`[MainView] 🔍 STANDALONE_PANELS:`, STANDALONE_PANELS);
console.log(`[MainView] 🔍 All panels:`, panels.map(p => ({ name: p.name, hasModal: !!p.panelInfo?.modal })));
if (DEBUG_MODE) {
console.log(`[MainView] 🔍 Top panel name: ${topPanel?.name}`);
console.log(`[MainView] 🔍 isStandalonePanel check:`, isStandalonePanel(topPanel?.name));
console.log(`[MainView] 🔍 STANDALONE_PANELS:`, STANDALONE_PANELS);
console.log(`[MainView] 🔍 All panels:`, panels.map(p => ({ name: p.name, hasModal: !!p.panelInfo?.modal })));
}
if (isStandalonePanel(topPanel?.name)) {
console.log(`[MainView] ✅ Standalone panel detected: ${topPanel?.name} - rendering independently`);
if (DEBUG_MODE) {
console.log(`[MainView] ✅ Standalone panel detected: ${topPanel?.name} - rendering independently`);
}
renderingPanels = [topPanel]; // 단독 패널만 단독으로 렌더링
}
// 기존 3-layer 구조 체크: PlayerPanel + DetailPanel + MediaPanel(modal)
@@ -224,9 +231,11 @@ export default function MainView({ className, initService }) {
panels[panels.length - 1]?.panelInfo?.modal === true;
if (hasThreeLayerStructure) {
console.log(
'[MainView] Rendering 3-layer structure: PlayerPanel + DetailPanel + MediaPanel'
);
if (DEBUG_MODE) {
console.log(
'[MainView] Rendering 3-layer structure: PlayerPanel + DetailPanel + MediaPanel'
);
}
renderingPanels = panels.slice(-3);
} else if (
panels[panels.length - 1]?.name === Config.panel_names.PLAYER_PANEL ||
@@ -256,14 +265,18 @@ export default function MainView({ className, initService }) {
// 단독 패널은 항상 onTop
if (isStandalonePanel(panel.name)) {
isPanelOnTop = true;
console.log(`[MainView] Standalone panel ${panel.name} is always onTop`);
if (DEBUG_MODE) {
console.log(`[MainView] Standalone panel ${panel.name} is always onTop`);
}
}
// 3-layer 케이스: 중간 패널(DetailPanel)이 onTop
else if (renderingPanels.length === 3) {
if (index === 1) {
// DetailPanel (중간)
isPanelOnTop = true;
console.log('[MainView] 3-layer: DetailPanel is onTop');
if (DEBUG_MODE) {
console.log('[MainView] 3-layer: DetailPanel is onTop');
}
}
// PlayerPanel (index 0): isOnTop = false (백그라운드)
// MediaPanel (index 2): isOnTop = false (modal overlay)
@@ -328,7 +341,9 @@ export default function MainView({ className, initService }) {
if (response.retCode === 0 && typeof window === 'object') {
window.location.reload();
} else {
console.error('unknown error', response.retCode);
if (DEBUG_MODE) {
console.error('unknown error', response.retCode);
}
}
}
}
@@ -383,7 +398,9 @@ export default function MainView({ className, initService }) {
panels[panels.length - 2]?.name === Config.panel_names.DETAIL_PANEL
) {
panel = panels[panels.length - 2]; // DetailPanel로 포커스
console.log('[MainView] 3-layer: Focus on DetailPanel');
if (DEBUG_MODE) {
console.log('[MainView] 3-layer: Focus on DetailPanel');
}
}
// 2-layer modal 구조
else if (
@@ -698,7 +715,9 @@ export default function MainView({ className, initService }) {
}
}, [webOSVersion]);
const handleErrorPopupClose = useCallback(() => {
console.log('handleErrorPopupClose 호출됨! activePopup:', activePopup, 'popupData:', popupData);
if (DEBUG_MODE) {
console.log('handleErrorPopupClose 호출됨! activePopup:', activePopup, 'popupData:', popupData);
}
if (popupData?.shouldPopPanel) {
dispatch(popPanel());
}