From 11bfdc0825aae2e0c5732818658ac971b63ce1e1 Mon Sep 17 00:00:00 2001 From: optrader Date: Sat, 22 Nov 2025 17:43:05 +0900 Subject: [PATCH] [251122] fix: DetailPaneel->ProductAllSection Focus-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit πŸ• 컀밋 μ‹œκ°„: 2025. 11. 22. 17:43:05 πŸ“Š λ³€κ²½ 톡계: β€’ 총 파일: 2개 β€’ μΆ”κ°€: +123쀄 β€’ μ‚­μ œ: -89쀄 πŸ“ μˆ˜μ •λœ 파일: ~ com.twin.app.shoptime/src/views/DetailPanel/ProductAllSection/ProductAllSection.jsx ~ com.twin.app.shoptime/src/views/DetailPanel/ProductAllSection/ProductAllSection.module.less πŸ”§ ν•¨μˆ˜ λ³€κ²½ λ‚΄μš©: πŸ“„ com.twin.app.shoptime/src/views/DetailPanel/ProductAllSection/ProductAllSection.jsx (javascript): βœ… Added: SpotlightContainerDecorator() πŸ”„ Modified: extractProductMeta() --- .../ProductAllSection/ProductAllSection.jsx | 205 ++++++++++-------- .../ProductAllSection.module.less | 15 +- 2 files changed, 127 insertions(+), 93 deletions(-) diff --git a/com.twin.app.shoptime/src/views/DetailPanel/ProductAllSection/ProductAllSection.jsx b/com.twin.app.shoptime/src/views/DetailPanel/ProductAllSection/ProductAllSection.jsx index 30c5f3f3..68054800 100644 --- a/com.twin.app.shoptime/src/views/DetailPanel/ProductAllSection/ProductAllSection.jsx +++ b/com.twin.app.shoptime/src/views/DetailPanel/ProductAllSection/ProductAllSection.jsx @@ -134,6 +134,15 @@ const BuyNowContainer = SpotlightContainerDecorator( 'div' ); +const ButtonStackContainer = SpotlightContainerDecorator( + { + spotlightDirection: 'vertical', + enterTo: 'last-focused', + restrict: 'self-only', + }, + 'div' +); + const SpottableComponent = Spottable('div'); const getProductData = curry((productType, themeProductInfo, productInfo) => @@ -948,6 +957,11 @@ export default function ProductAllSection({ [] ); + const stackDefaultElement = useMemo( + () => shopByMobileId || firstStackElementId, + [shopByMobileId, firstStackElementId] + ); + // λ²„νŠΌ μŠ€νƒ(μœ„β†’μ•„λž˜) ꡬ성: μ‹€μ œ λ Œλ”λ§ μˆœμ„œμ— 맞좰 ν–‰(row) λ‹¨μœ„λ‘œ μ„€μ • const { focusDownMap, focusUpMap, focusOrder, focusRows } = useMemo(() => { const rows = []; @@ -1166,6 +1180,7 @@ export default function ProductAllSection({ }); } }, [focusRows]); + const firstStackElementId = focusRows[0]?.[0]; const scrollPositionRef = useRef(0); const prevScrollPositionRef = useRef(0); // 이전 슀크둀 μœ„μΉ˜ 좔적 const prevScrollTopRef = useRef(0); // HomePanel μŠ€νƒ€μΌ 슀크둀 μœ„μΉ˜ 좔적 @@ -1491,100 +1506,106 @@ export default function ProductAllSection({ - {userNumber && - promotions.map((promotion, idx) => { - const couponButtonId = `detail-coupon-button-${idx}`; - return ( -
-
-
SPECIAL PROMOTION
-
- Coupon only applicable to this product! -
-
- { - handleCouponClick(idx, promotion); - }} - onSpotlightUp={handleSpotlightUpFromCouponButtons} - onSpotlightDown={(e) => handleSpotlightDownFromCoupon(e, couponButtonId)} - data-spotlight-next-down={focusDownMap[couponButtonId]} - size="detail_very_small" - > -
COUPON
- -
-
- ); - })} - {isBillingProductVisible && ( - - -
{$L('BUY NOW')}
-
- -
{$L('ADD TO CART')}
-
-
- )} - - - {/* BUY NOW + ADD TO CART λ²„νŠΌλ“€ (결제 κ°€λŠ₯ μƒν’ˆμΌ λ•Œλ§Œ λ Œλ”λ§) */} - -
{$L('SHOP BY MOBILE')}
-
- {panelInfo && ( -
- -
+ {userNumber && + promotions.map((promotion, idx) => { + const couponButtonId = `detail-coupon-button-${idx}`; + return ( +
+
+
SPECIAL PROMOTION
+
+ Coupon only applicable to this product! +
+
+ { + handleCouponClick(idx, promotion); + }} + onSpotlightUp={handleSpotlightUpFromCouponButtons} + onSpotlightDown={(e) => handleSpotlightDownFromCoupon(e, couponButtonId)} + data-spotlight-next-down={focusDownMap[couponButtonId]} + size="detail_very_small" + > +
COUPON
+ +
+
+ ); + })} + {isBillingProductVisible && ( + + +
{$L('BUY NOW')}
+
+ +
{$L('ADD TO CART')}
+
+
)} -
+ + + {/* BUY NOW + ADD TO CART λ²„νŠΌλ“€ (결제 κ°€λŠ₯ μƒν’ˆμΌ λ•Œλ§Œ λ Œλ”λ§) */} + +
{$L('SHOP BY MOBILE')}
+
+ {panelInfo && ( +
+ +
+ )} +
+
{orderPhnNo && ( diff --git a/com.twin.app.shoptime/src/views/DetailPanel/ProductAllSection/ProductAllSection.module.less b/com.twin.app.shoptime/src/views/DetailPanel/ProductAllSection/ProductAllSection.module.less index 36ea3189..5accc675 100644 --- a/com.twin.app.shoptime/src/views/DetailPanel/ProductAllSection/ProductAllSection.module.less +++ b/com.twin.app.shoptime/src/views/DetailPanel/ProductAllSection/ProductAllSection.module.less @@ -605,6 +605,19 @@ } } +.buttonStackContainer { + width: 100%; + display: flex; + flex-direction: column; + + > * { + margin-bottom: 5px; + &:last-child { + margin-bottom: 0; + } + } +} + .favoriteBtnWrapper { width: 60px; height: 60px; @@ -825,4 +838,4 @@ } } } -} \ No newline at end of file +}