(cardId)
| 645 | } |
| 646 | |
| 647 | function resolveTargetZoneForExpand(cardId) { |
| 648 | const layout = readLayout(); |
| 649 | const saved = layout[cardId]; |
| 650 | const isUpload = (cardId === 'uploadCard'); |
| 651 | |
| 652 | // 🔒 If the user explicitly pinned this card to the HEADER, |
| 653 | // it should remain a header-only icon and NEVER fly out. |
| 654 | if (saved === ZONES.HEADER) { |
| 655 | return null; // caller will skip animation + placement |
| 656 | } |
| 657 | |
| 658 | let zone = saved || null; |
| 659 | |
| 660 | // No saved zone yet: mirror applyUserLayoutOrDefault defaults |
| 661 | if (!zone) { |
| 662 | if (isSmallScreen()) { |
| 663 | zone = isUpload ? ZONES.TOP_LEFT : ZONES.TOP_RIGHT; |
| 664 | } else { |
| 665 | zone = ZONES.SIDEBAR; |
| 666 | } |
| 667 | } |
| 668 | |
| 669 | // On small screens, anything targeting SIDEBAR gets lifted into the top cols |
| 670 | if (isSmallScreen() && zone === ZONES.SIDEBAR) { |
| 671 | zone = isUpload ? ZONES.TOP_LEFT : ZONES.TOP_RIGHT; |
| 672 | } |
| 673 | |
| 674 | return zone; |
| 675 | } |
| 676 | |
| 677 | function getZoneHost(zoneId) { |
| 678 | switch (zoneId) { |
no test coverage detected