[251216] fix: Panel logs update - 1
🕐 커밋 시간: 2025. 12. 16. 12:39:11 📊 변경 통계: • 총 파일: 3개 • 추가: +20줄 • 삭제: -8줄 📝 수정된 파일: ~ com.twin.app.shoptime/src/middleware/panelHistoryMiddleware.js ~ com.twin.app.shoptime/src/views/DetailPanel/DetailPanel.jsx ~ com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx 🔧 주요 변경 내용: • 핵심 비즈니스 로직 개선
This commit is contained in:
@@ -81,7 +81,7 @@ export const panelHistoryMiddleware = (store) => (next) => (action) => {
|
||||
const isGNB = isGNBCall();
|
||||
const isOnTop = calculateIsOnTop(panelName); // 🎯 isOnTop 계산
|
||||
if (DEBUG_MODE)
|
||||
console.log('[PANEL] PUSH_PANEL:', {
|
||||
console.log(`[PANEL] PUSH_PANEL: ${panelName}`, {
|
||||
panelName,
|
||||
panelInfo,
|
||||
isGNB,
|
||||
@@ -126,7 +126,7 @@ export const panelHistoryMiddleware = (store) => (next) => (action) => {
|
||||
if (panels.length > 0) {
|
||||
const topPanel = panels[panels.length - 1];
|
||||
if (DEBUG_MODE) {
|
||||
console.log('[PANEL-TRACE] POP_PANEL middleware stack', {
|
||||
console.log(`[PANEL-TRACE] POP_PANEL middleware stack: ${topPanel?.name}`, {
|
||||
stack: panels.map((p) => p.name),
|
||||
topPanel: topPanel?.name,
|
||||
payload: action.payload,
|
||||
@@ -137,7 +137,7 @@ export const panelHistoryMiddleware = (store) => (next) => (action) => {
|
||||
const isGNB = isGNBCall();
|
||||
const isOnTop = calculateIsOnTop(topPanel.name); // 🎯 isOnTop 계산
|
||||
if (DEBUG_MODE)
|
||||
console.log('[PANEL] POP_PANEL:', {
|
||||
console.log(`[PANEL] POP_PANEL: ${topPanel.name}`, {
|
||||
panelName: topPanel.name,
|
||||
panelInfo: topPanel.panelInfo || {},
|
||||
isGNB,
|
||||
@@ -185,7 +185,7 @@ export const panelHistoryMiddleware = (store) => (next) => (action) => {
|
||||
const isGNB = isGNBCall();
|
||||
const isOnTop = calculateIsOnTop(panelName); // 🎯 isOnTop 계산
|
||||
if (DEBUG_MODE)
|
||||
console.log('[PANEL] UPDATE_PANEL:', {
|
||||
console.log(`[PANEL] UPDATE_PANEL: ${panelName}`, {
|
||||
panelName,
|
||||
panelInfo,
|
||||
isGNB,
|
||||
@@ -226,11 +226,15 @@ export const panelHistoryMiddleware = (store) => (next) => (action) => {
|
||||
|
||||
// RESET_PANELS: GNB 네비게이션 또는 완전 초기화
|
||||
case types.RESET_PANELS: {
|
||||
if (DEBUG_MODE)
|
||||
console.log('[PANEL] RESET_PANELS:', {
|
||||
if (DEBUG_MODE) {
|
||||
const resetPanelNameForLog = (action.payload && action.payload.length > 0)
|
||||
? action.payload[0].name
|
||||
: 'homepanel';
|
||||
console.log(`[PANEL] RESET_PANELS: ${resetPanelNameForLog}`, {
|
||||
payload: action.payload,
|
||||
timestamp: new Date().toISOString(),
|
||||
});
|
||||
}
|
||||
if (DEBUG_MODE)
|
||||
console.log('[PANEL_HISTORY] Before RESET_PANELS:', store.getState().panelHistory);
|
||||
|
||||
|
||||
@@ -322,7 +322,7 @@ export default function DetailPanel({ panelInfo, isOnTop, spotlightId }) {
|
||||
switch (sourcePanel) {
|
||||
case panel_names.PLAYER_PANEL: {
|
||||
// PlayerPanel에서 온 경우: PlayerPanel에 detailPanelClosed flag 전달
|
||||
console.log('[DetailPanel] unmount - PlayerPanel에 detailPanelClosed flag 전달');
|
||||
console.log('[PANEL][DetailPanel] unmount - PlayerPanel에 detailPanelClosed flag 전달');
|
||||
dispatch(
|
||||
updatePanel({
|
||||
name: panel_names.PLAYER_PANEL,
|
||||
@@ -434,7 +434,7 @@ export default function DetailPanel({ panelInfo, isOnTop, spotlightId }) {
|
||||
|
||||
if (shouldUpdatePanel) {
|
||||
console.log(
|
||||
'[DetailPanel] onBackClick - PlayerPanel에 detailPanelClosed flag 전달'
|
||||
'[PANEL][DetailPanel] onBackClick - PlayerPanel에 detailPanelClosed flag 전달'
|
||||
);
|
||||
dispatch(
|
||||
updatePanel({
|
||||
|
||||
@@ -431,6 +431,7 @@ const PlayerPanel = ({ isTabActivated, panelInfo, isOnTop, spotlightId, ...props
|
||||
};
|
||||
}
|
||||
|
||||
console.log('[PANEL] PlayerPanel updatePanel - detailPanelClosed reset');
|
||||
dispatch(
|
||||
updatePanel({
|
||||
name: panel_names.PLAYER_PANEL,
|
||||
@@ -647,6 +648,7 @@ const PlayerPanel = ({ isTabActivated, panelInfo, isOnTop, spotlightId, ...props
|
||||
useEffect(() => {
|
||||
if (currentLiveShowInfo && Object.keys(currentLiveShowInfo).length > 0) {
|
||||
if (currentLiveShowInfo.showId !== panelInfo?.showId) {
|
||||
console.log('[PANEL] PlayerPanel updatePanel - LIVE showId update');
|
||||
dispatch(
|
||||
updatePanel({
|
||||
name: panel_names.PLAYER_PANEL,
|
||||
@@ -1146,6 +1148,7 @@ const PlayerPanel = ({ isTabActivated, panelInfo, isOnTop, spotlightId, ...props
|
||||
videoPlayer.current?.hideControls();
|
||||
setSelectedIndex(backupInitialIndex);
|
||||
if (panelInfo.shptmBanrTpNm === 'MEDIA') {
|
||||
console.log('[PANEL] PlayerPanel updatePanel - DETAIL_PANEL launchedFromPlayer false');
|
||||
dispatch(
|
||||
updatePanel({
|
||||
name: panel_names.DETAIL_PANEL,
|
||||
@@ -1858,6 +1861,7 @@ const PlayerPanel = ({ isTabActivated, panelInfo, isOnTop, spotlightId, ...props
|
||||
window.requestAnimationFrame(() => {
|
||||
window.requestAnimationFrame(() => {
|
||||
dlog('[PlayerPanel] Condition 2.5: Removing skipFlag after DOM render');
|
||||
console.log('[PANEL] PlayerPanel updatePanel - skipModalStyleRecalculation remove');
|
||||
dispatch(
|
||||
updatePanel({
|
||||
name: panel_names.PLAYER_PANEL,
|
||||
@@ -1898,6 +1902,7 @@ const PlayerPanel = ({ isTabActivated, panelInfo, isOnTop, spotlightId, ...props
|
||||
scale = width / window.innerWidth;
|
||||
setModalScale(scale);
|
||||
}
|
||||
console.log('[PANEL] PlayerPanel updatePanel - modalStyle and scale update');
|
||||
dispatch(
|
||||
updatePanel({
|
||||
name: panel_names.PLAYER_PANEL,
|
||||
@@ -2223,6 +2228,7 @@ const PlayerPanel = ({ isTabActivated, panelInfo, isOnTop, spotlightId, ...props
|
||||
);
|
||||
Spotlight.focus('playVideoShopNowBox');
|
||||
} else {
|
||||
console.log('[PANEL] PlayerPanel updatePanel - handleIndicatorDownClick');
|
||||
dispatch(
|
||||
updatePanel({
|
||||
name: panel_names.PLAYER_PANEL,
|
||||
@@ -2270,6 +2276,7 @@ const PlayerPanel = ({ isTabActivated, panelInfo, isOnTop, spotlightId, ...props
|
||||
);
|
||||
Spotlight.focus('playVideoShopNowBox');
|
||||
} else {
|
||||
console.log('[PANEL] PlayerPanel updatePanel - handleIndicatorUpClick');
|
||||
dispatch(
|
||||
updatePanel({
|
||||
name: panel_names.PLAYER_PANEL,
|
||||
@@ -2389,6 +2396,7 @@ const PlayerPanel = ({ isTabActivated, panelInfo, isOnTop, spotlightId, ...props
|
||||
const onEnded = useCallback(
|
||||
(e) => {
|
||||
if (panelInfoRef.current.shptmBanrTpNm === 'MEDIA') {
|
||||
console.log('[PANEL] PlayerPanel updatePanel - DETAIL_PANEL video ended');
|
||||
dispatch(
|
||||
updatePanel({
|
||||
name: panel_names.DETAIL_PANEL,
|
||||
|
||||
Reference in New Issue
Block a user