@iasiv5/dsh-quota-watch 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/client.js +5 -2
- package/package.json +1 -1
- package/src/client.mjs +12 -2
package/lib/client.js
CHANGED
|
@@ -960,11 +960,14 @@ function mountQuotaCard({
|
|
|
960
960
|
const syncCardVisibility = () => {
|
|
961
961
|
syncFootNarrowness();
|
|
962
962
|
const cardOn = !surfaceFlags.cardHidden;
|
|
963
|
-
const
|
|
964
|
-
const
|
|
963
|
+
const narrowOrCollapsed = footTooNarrow || sidebarCollapsed;
|
|
964
|
+
const showCard = cardOn && !narrowOrCollapsed && !noDataHidden;
|
|
965
|
+
const showRail = cardOn && narrowOrCollapsed && !noDataHidden;
|
|
965
966
|
container.hidden = !showCard && !showRail;
|
|
966
967
|
if (showRail) container.dataset.dshQuotaWatchSidebarCollapsed = "";
|
|
967
968
|
else delete container.dataset.dshQuotaWatchSidebarCollapsed;
|
|
969
|
+
card.style.display = showCard ? "" : "none";
|
|
970
|
+
railTrigger.style.display = showRail ? "inline-flex" : "none";
|
|
968
971
|
};
|
|
969
972
|
const footResizeObserver = typeof win.ResizeObserver === "function" ? new win.ResizeObserver(() => {
|
|
970
973
|
syncCardVisibility();
|
package/package.json
CHANGED
package/src/client.mjs
CHANGED
|
@@ -911,12 +911,22 @@ export function mountQuotaCard({
|
|
|
911
911
|
}
|
|
912
912
|
const syncCardVisibility = () => {
|
|
913
913
|
syncFootNarrowness()
|
|
914
|
+
// Rail entry follows the WIDTH signal, not the host attribute: this DSH
|
|
915
|
+
// build (0.2.0-rc.2 web) never writes data-sidebar-collapsed on collapse
|
|
916
|
+
// (verified via CDP + bundle grep), but the foot container measurably
|
|
917
|
+
// narrows — and the 36px gauge icon fits any rail.
|
|
914
918
|
const cardOn = !surfaceFlags.cardHidden
|
|
915
|
-
const
|
|
916
|
-
const
|
|
919
|
+
const narrowOrCollapsed = footTooNarrow || sidebarCollapsed
|
|
920
|
+
const showCard = cardOn && !narrowOrCollapsed && !noDataHidden
|
|
921
|
+
const showRail = cardOn && narrowOrCollapsed && !noDataHidden
|
|
917
922
|
container.hidden = !showCard && !showRail
|
|
918
923
|
if (showRail) container.dataset.dshQuotaWatchSidebarCollapsed = ''
|
|
919
924
|
else delete container.dataset.dshQuotaWatchSidebarCollapsed
|
|
925
|
+
// The card ↔ rail swap is driven by INLINE styles: know-how 017's lesson —
|
|
926
|
+
// critical visibility state must not depend on stylesheet rules that
|
|
927
|
+
// external actors (aggressive extensions) may neuter in the user's browser.
|
|
928
|
+
card.style.display = showCard ? '' : 'none'
|
|
929
|
+
railTrigger.style.display = showRail ? 'inline-flex' : 'none'
|
|
920
930
|
}
|
|
921
931
|
const footResizeObserver = typeof win.ResizeObserver === 'function'
|
|
922
932
|
? new win.ResizeObserver(() => { syncCardVisibility() })
|