[251119] feat: FloatingGradientLayer..Experimental..2

🕐 커밋 시간: 2025. 11. 19. 19:24:28

📊 변경 통계:
  • 총 파일: 10개
  • 추가: +95줄
  • 삭제: -181줄

📝 수정된 파일:
  ~ com.twin.app.shoptime/src/App/App.js
  ~ com.twin.app.shoptime/src/actions/panelActions.js
  ~ com.twin.app.shoptime/src/views/DetailPanel/DetailPanel.jsx
  ~ com.twin.app.shoptime/src/views/DetailPanel/components/DetailPanelBackground/DetailPanelBackground.jsx
  ~ com.twin.app.shoptime/src/views/HomePanel/HomePanel.jsx
  ~ com.twin.app.shoptime/src/views/HomePanel/HomePanel.module.less
  ~ com.twin.app.shoptime/src/views/MainView/MainView.jsx
  ~ com.twin.app.shoptime/src/views/MediaPanel/MediaPanel.v3.jsx

🗑️ 삭제된 파일:
  - com.twin.app.shoptime/src/components/FloatingGradientBackground/FloatingGradientBackground.jsx
  - com.twin.app.shoptime/src/components/FloatingGradientBackground/FloatingGradientBackground.module.less

🔧 주요 변경 내용:
  • 핵심 비즈니스 로직 개선
  • UI 컴포넌트 아키텍처 개선
  • 소규모 기능 개선
  • 코드 정리 및 최적화
  • 모듈 구조 개선

Performance: 코드 최적화로 성능 개선 기대
This commit is contained in:
2025-11-19 19:24:29 +09:00
parent d8dce0a89d
commit 276ee65979
10 changed files with 95 additions and 181 deletions

View File

@@ -152,29 +152,37 @@ export default function DetailPanel({ panelInfo, isOnTop, spotlightId }) {
useEffect(() => {
// DOM이 렌더링된 후 약간의 지연 시간을 두고 그라데이션 숨김
const timer = setTimeout(() => {
if (window.hideFloatingGradient) {
window.hideFloatingGradient();
console.log('[DetailPanel] Floating gradient background hidden');
}
dispatch(updateHomeInfo({
name: panel_names.HOME_PANEL,
panelInfo: {
showGradientBackground: false,
}
}));
console.log('[TRACE-GRADIENT] 🔴 DetailPanel mounted 100ms timeout set showGradientBackground: false');
}, 100); // 100ms 지연으로 DOM 렌더링 완료 후 실행
return () => {
clearTimeout(timer); // 컴포넌트 언마운트 시 타이머 정리
console.log('[TRACE-GRADIENT] 🔴 DetailPanel unmount - gradient timer cleared');
};
}, []); // 마운트 시 한 번만 실행
}, [dispatch]); // dispatch 포함
// ✅ [251118] DetailPanel이 사라질 때 HomePanel의 비디오 재생 활성화
// ✅ [251118] DetailPanel이 사라질 때 HomePanel 활성화
useEffect(() => {
return () => {
// DetailPanel이 unmount되는 시점
console.log('[DetailPanel] unmount - HomePanel 활성화 신호 전송');
// HomePanel에서 비디오 재생을 다시 시작하도록 신호 보내기
console.log('[TRACE-GRADIENT] 🔶 DetailPanel unmount - Creating new panelInfo');
console.log('[TRACE-GRADIENT] 🔶 DetailPanel unmount - Existing panelInfo before update:', JSON.stringify(panelInfo));
dispatch(updateHomeInfo({
name: panel_names.HOME_PANEL,
panelInfo: {
shouldResumeVideo: true, // ✅ 신호
lastDetailPanelClosed: Date.now(), // ✅ 시점 기록
showGradientBackground: false, // ✅ 명시적으로 그라데이션 끔기
}
}));
};