PluginProbe
Extendify / trunk
Extendify vtrunk
3.2.1 3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 0.6.0 All 127 releases
← All changes | src/Agent/state/global.js +4 -1 3.1.1 → trunk View file →
@@ -2,8 +2,11 @@
2 2 import { isInTheFuture } from '@wordpress/date';
3 3 import { create } from 'zustand';
4 4 import { devtools, persist } from 'zustand/middleware';
5 5
6 +// Mirrors Tailwind's --breakpoint-md, where WP's admin bar goes big.
7 +export const DESKTOP_MIN_WIDTH = 783;
8 +
6 9 const url = new URL(window.location.href);
7 10 const openAgentFromUrl = url.searchParams.has('extendify-open-agent');
8 11 if (openAgentFromUrl) {
9 12 url.searchParams.delete('extendify-open-agent');
@@ -21,9 +24,9 @@
21 24 // e.g. floating, docked-left, docked-right ?
22 25 mode: window.extAgentData?.agentPosition,
23 26 queuedTour: null,
24 27 scratch: {},
25 - isMobile: window.innerWidth < 768,
28 + isMobile: window.innerWidth < DESKTOP_MIN_WIDTH,
26 29 setIsMobile: (isMobile) => {
27 30 if (get().isMobile === isMobile) return;
28 31 set({ isMobile });
29 32 },