[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 isGNB = isGNBCall();
|
||||||
const isOnTop = calculateIsOnTop(panelName); // 🎯 isOnTop 계산
|
const isOnTop = calculateIsOnTop(panelName); // 🎯 isOnTop 계산
|
||||||
if (DEBUG_MODE)
|
if (DEBUG_MODE)
|
||||||
console.log('[PANEL] PUSH_PANEL:', {
|
console.log(`[PANEL] PUSH_PANEL: ${panelName}`, {
|
||||||
panelName,
|
panelName,
|
||||||
panelInfo,
|
panelInfo,
|
||||||
isGNB,
|
isGNB,
|
||||||
@@ -126,7 +126,7 @@ export const panelHistoryMiddleware = (store) => (next) => (action) => {
|
|||||||
if (panels.length > 0) {
|
if (panels.length > 0) {
|
||||||
const topPanel = panels[panels.length - 1];
|
const topPanel = panels[panels.length - 1];
|
||||||
if (DEBUG_MODE) {
|
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),
|
stack: panels.map((p) => p.name),
|
||||||
topPanel: topPanel?.name,
|
topPanel: topPanel?.name,
|
||||||
payload: action.payload,
|
payload: action.payload,
|
||||||
@@ -137,7 +137,7 @@ export const panelHistoryMiddleware = (store) => (next) => (action) => {
|
|||||||
const isGNB = isGNBCall();
|
const isGNB = isGNBCall();
|
||||||
const isOnTop = calculateIsOnTop(topPanel.name); // 🎯 isOnTop 계산
|
const isOnTop = calculateIsOnTop(topPanel.name); // 🎯 isOnTop 계산
|
||||||
if (DEBUG_MODE)
|
if (DEBUG_MODE)
|
||||||
console.log('[PANEL] POP_PANEL:', {
|
console.log(`[PANEL] POP_PANEL: ${topPanel.name}`, {
|
||||||
panelName: topPanel.name,
|
panelName: topPanel.name,
|
||||||
panelInfo: topPanel.panelInfo || {},
|
panelInfo: topPanel.panelInfo || {},
|
||||||
isGNB,
|
isGNB,
|
||||||
@@ -185,7 +185,7 @@ export const panelHistoryMiddleware = (store) => (next) => (action) => {
|
|||||||
const isGNB = isGNBCall();
|
const isGNB = isGNBCall();
|
||||||
const isOnTop = calculateIsOnTop(panelName); // 🎯 isOnTop 계산
|
const isOnTop = calculateIsOnTop(panelName); // 🎯 isOnTop 계산
|
||||||
if (DEBUG_MODE)
|
if (DEBUG_MODE)
|
||||||
console.log('[PANEL] UPDATE_PANEL:', {
|
console.log(`[PANEL] UPDATE_PANEL: ${panelName}`, {
|
||||||
panelName,
|
panelName,
|
||||||
panelInfo,
|
panelInfo,
|
||||||
isGNB,
|
isGNB,
|
||||||
@@ -226,11 +226,15 @@ export const panelHistoryMiddleware = (store) => (next) => (action) => {
|
|||||||
|
|
||||||
// RESET_PANELS: GNB 네비게이션 또는 완전 초기화
|
// RESET_PANELS: GNB 네비게이션 또는 완전 초기화
|
||||||
case types.RESET_PANELS: {
|
case types.RESET_PANELS: {
|
||||||
if (DEBUG_MODE)
|
if (DEBUG_MODE) {
|
||||||
console.log('[PANEL] RESET_PANELS:', {
|
const resetPanelNameForLog = (action.payload && action.payload.length > 0)
|
||||||
|
? action.payload[0].name
|
||||||
|
: 'homepanel';
|
||||||
|
console.log(`[PANEL] RESET_PANELS: ${resetPanelNameForLog}`, {
|
||||||
payload: action.payload,
|
payload: action.payload,
|
||||||
timestamp: new Date().toISOString(),
|
timestamp: new Date().toISOString(),
|
||||||
});
|
});
|
||||||
|
}
|
||||||
if (DEBUG_MODE)
|
if (DEBUG_MODE)
|
||||||
console.log('[PANEL_HISTORY] Before RESET_PANELS:', store.getState().panelHistory);
|
console.log('[PANEL_HISTORY] Before RESET_PANELS:', store.getState().panelHistory);
|
||||||
|
|
||||||
|
|||||||
@@ -322,7 +322,7 @@ export default function DetailPanel({ panelInfo, isOnTop, spotlightId }) {
|
|||||||
switch (sourcePanel) {
|
switch (sourcePanel) {
|
||||||
case panel_names.PLAYER_PANEL: {
|
case panel_names.PLAYER_PANEL: {
|
||||||
// PlayerPanel에서 온 경우: PlayerPanel에 detailPanelClosed flag 전달
|
// PlayerPanel에서 온 경우: PlayerPanel에 detailPanelClosed flag 전달
|
||||||
console.log('[DetailPanel] unmount - PlayerPanel에 detailPanelClosed flag 전달');
|
console.log('[PANEL][DetailPanel] unmount - PlayerPanel에 detailPanelClosed flag 전달');
|
||||||
dispatch(
|
dispatch(
|
||||||
updatePanel({
|
updatePanel({
|
||||||
name: panel_names.PLAYER_PANEL,
|
name: panel_names.PLAYER_PANEL,
|
||||||
@@ -434,7 +434,7 @@ export default function DetailPanel({ panelInfo, isOnTop, spotlightId }) {
|
|||||||
|
|
||||||
if (shouldUpdatePanel) {
|
if (shouldUpdatePanel) {
|
||||||
console.log(
|
console.log(
|
||||||
'[DetailPanel] onBackClick - PlayerPanel에 detailPanelClosed flag 전달'
|
'[PANEL][DetailPanel] onBackClick - PlayerPanel에 detailPanelClosed flag 전달'
|
||||||
);
|
);
|
||||||
dispatch(
|
dispatch(
|
||||||
updatePanel({
|
updatePanel({
|
||||||
|
|||||||
@@ -431,6 +431,7 @@ const PlayerPanel = ({ isTabActivated, panelInfo, isOnTop, spotlightId, ...props
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log('[PANEL] PlayerPanel updatePanel - detailPanelClosed reset');
|
||||||
dispatch(
|
dispatch(
|
||||||
updatePanel({
|
updatePanel({
|
||||||
name: panel_names.PLAYER_PANEL,
|
name: panel_names.PLAYER_PANEL,
|
||||||
@@ -647,6 +648,7 @@ const PlayerPanel = ({ isTabActivated, panelInfo, isOnTop, spotlightId, ...props
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (currentLiveShowInfo && Object.keys(currentLiveShowInfo).length > 0) {
|
if (currentLiveShowInfo && Object.keys(currentLiveShowInfo).length > 0) {
|
||||||
if (currentLiveShowInfo.showId !== panelInfo?.showId) {
|
if (currentLiveShowInfo.showId !== panelInfo?.showId) {
|
||||||
|
console.log('[PANEL] PlayerPanel updatePanel - LIVE showId update');
|
||||||
dispatch(
|
dispatch(
|
||||||
updatePanel({
|
updatePanel({
|
||||||
name: panel_names.PLAYER_PANEL,
|
name: panel_names.PLAYER_PANEL,
|
||||||
@@ -1146,6 +1148,7 @@ const PlayerPanel = ({ isTabActivated, panelInfo, isOnTop, spotlightId, ...props
|
|||||||
videoPlayer.current?.hideControls();
|
videoPlayer.current?.hideControls();
|
||||||
setSelectedIndex(backupInitialIndex);
|
setSelectedIndex(backupInitialIndex);
|
||||||
if (panelInfo.shptmBanrTpNm === 'MEDIA') {
|
if (panelInfo.shptmBanrTpNm === 'MEDIA') {
|
||||||
|
console.log('[PANEL] PlayerPanel updatePanel - DETAIL_PANEL launchedFromPlayer false');
|
||||||
dispatch(
|
dispatch(
|
||||||
updatePanel({
|
updatePanel({
|
||||||
name: panel_names.DETAIL_PANEL,
|
name: panel_names.DETAIL_PANEL,
|
||||||
@@ -1858,6 +1861,7 @@ const PlayerPanel = ({ isTabActivated, panelInfo, isOnTop, spotlightId, ...props
|
|||||||
window.requestAnimationFrame(() => {
|
window.requestAnimationFrame(() => {
|
||||||
window.requestAnimationFrame(() => {
|
window.requestAnimationFrame(() => {
|
||||||
dlog('[PlayerPanel] Condition 2.5: Removing skipFlag after DOM render');
|
dlog('[PlayerPanel] Condition 2.5: Removing skipFlag after DOM render');
|
||||||
|
console.log('[PANEL] PlayerPanel updatePanel - skipModalStyleRecalculation remove');
|
||||||
dispatch(
|
dispatch(
|
||||||
updatePanel({
|
updatePanel({
|
||||||
name: panel_names.PLAYER_PANEL,
|
name: panel_names.PLAYER_PANEL,
|
||||||
@@ -1898,6 +1902,7 @@ const PlayerPanel = ({ isTabActivated, panelInfo, isOnTop, spotlightId, ...props
|
|||||||
scale = width / window.innerWidth;
|
scale = width / window.innerWidth;
|
||||||
setModalScale(scale);
|
setModalScale(scale);
|
||||||
}
|
}
|
||||||
|
console.log('[PANEL] PlayerPanel updatePanel - modalStyle and scale update');
|
||||||
dispatch(
|
dispatch(
|
||||||
updatePanel({
|
updatePanel({
|
||||||
name: panel_names.PLAYER_PANEL,
|
name: panel_names.PLAYER_PANEL,
|
||||||
@@ -2223,6 +2228,7 @@ const PlayerPanel = ({ isTabActivated, panelInfo, isOnTop, spotlightId, ...props
|
|||||||
);
|
);
|
||||||
Spotlight.focus('playVideoShopNowBox');
|
Spotlight.focus('playVideoShopNowBox');
|
||||||
} else {
|
} else {
|
||||||
|
console.log('[PANEL] PlayerPanel updatePanel - handleIndicatorDownClick');
|
||||||
dispatch(
|
dispatch(
|
||||||
updatePanel({
|
updatePanel({
|
||||||
name: panel_names.PLAYER_PANEL,
|
name: panel_names.PLAYER_PANEL,
|
||||||
@@ -2270,6 +2276,7 @@ const PlayerPanel = ({ isTabActivated, panelInfo, isOnTop, spotlightId, ...props
|
|||||||
);
|
);
|
||||||
Spotlight.focus('playVideoShopNowBox');
|
Spotlight.focus('playVideoShopNowBox');
|
||||||
} else {
|
} else {
|
||||||
|
console.log('[PANEL] PlayerPanel updatePanel - handleIndicatorUpClick');
|
||||||
dispatch(
|
dispatch(
|
||||||
updatePanel({
|
updatePanel({
|
||||||
name: panel_names.PLAYER_PANEL,
|
name: panel_names.PLAYER_PANEL,
|
||||||
@@ -2389,6 +2396,7 @@ const PlayerPanel = ({ isTabActivated, panelInfo, isOnTop, spotlightId, ...props
|
|||||||
const onEnded = useCallback(
|
const onEnded = useCallback(
|
||||||
(e) => {
|
(e) => {
|
||||||
if (panelInfoRef.current.shptmBanrTpNm === 'MEDIA') {
|
if (panelInfoRef.current.shptmBanrTpNm === 'MEDIA') {
|
||||||
|
console.log('[PANEL] PlayerPanel updatePanel - DETAIL_PANEL video ended');
|
||||||
dispatch(
|
dispatch(
|
||||||
updatePanel({
|
updatePanel({
|
||||||
name: panel_names.DETAIL_PANEL,
|
name: panel_names.DETAIL_PANEL,
|
||||||
|
|||||||
Reference in New Issue
Block a user