PluginProbe
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin / 1.1.12
OpenStation: Desktop Windows, Dock & Virtual Desktops for WP Admin v1.1.12
1.1.12 1.1.11 1.1.10 1.1.9 1.1.8 1.1.7 1.1.6 1.1.5 1.1.4 1.1.3 1.1.2 1.1.1 1.1.0 1.0.1 1.0.0 0.9.8 0.9.7 0.9.6 0.9.4 0.9.5 0.9.3 0.9.2 0.9.1 0.9.0 0.8.9 All 36 releases
← All changes | includes/assets.php +108 -129 1.0.1 → 1.1.12 View file →
@@ -122,13 +122,14 @@
122 122 *
123 123 * window-chrome → window-states → effects → window-links
124 124 * → windows
125 125 *
126 - * `window-overview` and `os-settings` are deliberately NOT in this
127 - * chain — they are registered below, after `os-windows`,
128 - * so they can load deferred. Adding a sheet here means splicing it
129 - * into the chain, not appending an unrelated dependency: order is
130 - * the contract.
126 + * `window-overview` is deliberately NOT in this chain — it is
127 + * registered below, after `os-windows`, so it can load deferred.
128 + * Adding a sheet here means splicing it into the chain, not
129 + * appending an unrelated dependency: order is the contract.
130 + * (The Preferences window's sheet is not here at all: it rides
131 + * the `apps/os-settings/` app as a first-open companion style.)
131 132 */
132 133 $window_sheets = array(
133 134 'os-window-chrome' => 'assets/css/window-chrome.css',
134 135 'os-window-states' => 'assets/css/window-states.css',
@@ -154,14 +155,14 @@
154 155 OPENSTATION_URL . 'assets/css/windows.css',
155 156 $previous,
156 157 $built_version( 'assets/css/windows.css' )
157 158 );
158 - // These two load DEFERRED (see `openstation_defer_non_critical_styles()`):
159 - // the UI they style — the OS Settings panel and the window
160 - // overview — is lazy-loaded JS that can never be on screen at
161 - // first paint, so ~47 KB of CSS has no business blocking render.
162 - // They depend on `os-windows` so they print after it,
163 - // preserving the cascade position they had as `@import`s.
159 + // Loads DEFERRED (see `openstation_defer_non_critical_styles()`):
160 + // the UI it styles — the window overview — is lazy-loaded JS that
161 + // can never be on screen at first paint, so its CSS has no
162 + // business blocking render. It depends on `os-windows` so it
163 + // prints after it, preserving the cascade position it had as an
164 + // `@import`.
164 165 wp_register_style(
165 166 'os-window-overview',
166 167 OPENSTATION_URL . 'assets/css/window-overview.css',
167 168 array( 'os-windows' ),
@@ -166,14 +167,8 @@
166 167 OPENSTATION_URL . 'assets/css/window-overview.css',
167 168 array( 'os-windows' ),
168 169 $built_version( 'assets/css/window-overview.css' )
169 170 );
170 - wp_register_style(
171 - 'os-settings',
172 - OPENSTATION_URL . 'assets/css/os-settings.css',
173 - array( 'os-windows' ),
174 - $built_version( 'assets/css/os-settings.css' )
175 - );
176 171 // Solo mode — one window, no desk around it. Loads last so it can
177 172 // hide surfaces the sheets above declared, and only enqueues on a
178 173 // solo request, so a normal shell never pays for it.
179 174 wp_register_style(
@@ -193,8 +188,52 @@
193 188 OPENSTATION_URL . 'assets/css/dock-peek.css',
194 189 array( 'os-dock' ),
195 190 $built_version( 'assets/css/dock-peek.css' )
196 191 );
192 + // The phone layer. Every rule is scoped to
193 + // `html[data-os-mode="mobile"]`, so the sheet is inert on a
194 + // desktop and the first paint on a phone is already right (the
195 + // head stamp writes the attribute before any stylesheet applies).
196 + // Depends on the dock and window sheets because it overrides them.
197 + wp_register_style(
198 + 'os-mobile',
199 + OPENSTATION_URL . 'assets/css/mobile.css',
200 + array( 'os-variables', 'dashicons', 'os-dock', 'os-windows' ),
201 + $built_version( 'assets/css/mobile.css' )
202 + );
203 + // The workspace wizard. Scoped to `.os-workspace-wizard`, so it is
204 + // inert until the user opens it from the overview bar's `+` or a
205 + // tile's Edit. Those controls are styled with the rest of the bar
206 + // in `window-overview.css`.
207 + wp_register_style(
208 + 'os-workspaces',
209 + OPENSTATION_URL . 'assets/css/workspaces.css',
210 + array( 'os-variables', 'dashicons' ),
211 + $built_version( 'assets/css/workspaces.css' )
212 + );
213 + // Keyboard-shortcuts window. Scoped to `.os-shortcuts`, so it is
214 + // inert until the System menu opens the window, and unconditional
215 + // for the same reason the layout sheet is: the window can be
216 + // opened at any moment and a deferred sheet would paint it raw.
217 + wp_register_style(
218 + 'os-shortcuts',
219 + OPENSTATION_URL . 'assets/css/shortcuts.css',
220 + array( 'os-variables' ),
221 + $built_version( 'assets/css/shortcuts.css' )
222 + );
223 + // The OpenStation desktop layout — the core/plugin seam on the rail
224 + // plus the constellation hover-submenu flyout. Both surfaces are
225 + // scoped (`[data-os-layout="openstation"]` / `.os-constellation`),
226 + // so the sheet is inert in every other layout and is loaded
227 + // unconditionally rather than gated on the user's current pick:
228 + // the layout is switchable live from OpenStation Preferences, and a
229 + // conditional enqueue would leave the first switch unstyled.
230 + wp_register_style(
231 + 'os-openstation-layout',
232 + OPENSTATION_URL . 'assets/css/openstation-layout.css',
233 + array( 'os-dock' ),
234 + $built_version( 'assets/css/openstation-layout.css' )
235 + );
197 236 // `filemtime`-stamped — the chromeless overrides iterate faster
198 237 // than the plugin-wide version bumps (per-page compat shims and
199 238 // page-title-action exceptions land in patches), and a stale
200 239 // cached copy means the user sees yesterday's rules. Without the
@@ -236,40 +275,10 @@
236 275 array( 'os-variables', 'dashicons' ),
237 276 file_exists( $recycle_bin_css ) ? (string) filemtime( $recycle_bin_css ) : $version
238 277 );
239 278
240 - // `filemtime` for the native Posts window CSS — same rationale as
241 - // the recycle-bin CSS: bundle iterates faster than the plugin
242 - // version and stale caches are worse than the cost of a 304.
243 - $posts_window_css = OPENSTATION_DIR . 'assets/css/posts-window.css';
244 - wp_register_style(
245 - 'os-posts-window',
246 - OPENSTATION_URL . 'assets/css/posts-window.css',
247 - array( 'os-variables', 'dashicons' ),
248 - file_exists( $posts_window_css ) ? (string) filemtime( $posts_window_css ) : $version
249 - );
250 -
251 - // Native Plugins window CSS — same `filemtime`-cache-bust posture
252 - // as the Posts/Recycle Bin styles.
253 - $plugins_window_css = OPENSTATION_DIR . 'assets/css/plugins-window.css';
254 - wp_register_style(
255 - 'os-plugins-window',
256 - OPENSTATION_URL . 'assets/css/plugins-window.css',
257 - array( 'os-variables', 'dashicons' ),
258 - file_exists( $plugins_window_css ) ? (string) filemtime( $plugins_window_css ) : $version
259 - );
260 -
261 - // Native Comments window CSS — same `filemtime` posture.
262 - $comments_window_css = OPENSTATION_DIR . 'assets/css/comments-window.css';
263 - wp_register_style(
264 - 'os-comments-window',
265 - OPENSTATION_URL . 'assets/css/comments-window.css',
266 - array( 'os-variables', 'dashicons' ),
267 - file_exists( $comments_window_css ) ? (string) filemtime( $comments_window_css ) : $version
268 - );
269 -
270 279 // Files-on-the-Desktop tile + layer styles. `filemtime` for the
271 - // same reason as the recycle-bin / posts-window CSS: this file
280 + // same reason as the recycle-bin CSS: this file
272 281 // iterates faster than the plugin version, and a stale cache
273 282 // would mask a real fix.
274 283 $desktop_files_css = OPENSTATION_DIR . 'assets/css/desktop-files.css';
275 284 wp_register_style(
@@ -305,14 +314,17 @@
305 314 );
306 315
307 316 // Pinned-notes layer styles (paper, pushpin, pastel tokens, pin
308 317 // animations). Same `filemtime` cache-bust posture as the other
309 - // fast-iterating feature stylesheets above.
318 + // fast-iterating feature stylesheets above. Depends on `os-files`
319 + // because a pinned note dresses the canonical `.os-file-tile`
320 + // chrome — anything that restyles a tile has to print after the
321 + // file that declares one.
310 322 $notes_css = OPENSTATION_DIR . 'assets/css/notes.css';
311 323 wp_register_style(
312 324 'os-notes',
313 325 OPENSTATION_URL . 'assets/css/notes.css',
314 - array( 'os-variables', 'dashicons' ),
326 + array( 'os-variables', 'dashicons', 'os-files' ),
315 327 file_exists( $notes_css ) ? (string) filemtime( $notes_css ) : $version
316 328 );
317 329
318 330 // Announcement-dialog styles (scrim, hero card, buttons). Registered
@@ -376,8 +388,49 @@
376 388 $built_version( 'assets/js/iframe-bridge' . $suffix . '.js' ),
377 389 true
378 390 );
379 391
392 + // `os-deactivation-feedback` — the dialog that asks one optional
393 + // question when an admin deactivates OpenStation. Enqueued on
394 + // `plugins.php` (classic, chromeless and network admin) by
395 + // `includes/feedback/deactivation.php`, and lazy-loaded by the
396 + // native Plugins app from its config block. Plain DOM on purpose:
397 + // the classic screen has no `<os-*>` kit.
398 + wp_register_script(
399 + 'os-deactivation-feedback',
400 + OPENSTATION_URL . 'assets/js/deactivation-feedback' . $suffix . '.js',
401 + array( 'wp-i18n' ),
402 + $built_version( 'assets/js/deactivation-feedback' . $suffix . '.js' ),
403 + true
404 + );
405 + wp_set_script_translations(
406 + 'os-deactivation-feedback',
407 + 'desktop-mode',
408 + OPENSTATION_DIR . 'languages'
409 + );
410 + $feedback_css = OPENSTATION_DIR . 'assets/css/deactivation-feedback.css';
411 + wp_register_style(
412 + 'os-deactivation-feedback',
413 + OPENSTATION_URL . 'assets/css/deactivation-feedback.css',
414 + array(),
415 + file_exists( $feedback_css ) ? (string) filemtime( $feedback_css ) : $version
416 + );
417 +
418 + // `os-chromeless-bridge` — the iframe side of every window,
419 + // enqueued on `admin_footer` by
420 + // `openstation_chromeless_bridge_script()` with its per-request
421 + // data attached as a `before` inline block. Registered here (not
422 + // there) so the handle exists before the enqueue and so the asset
423 + // guard's OPENSTATION_URL snapshot protects it like every other
424 + // bundle of ours.
425 + wp_register_script(
426 + 'os-chromeless-bridge',
427 + OPENSTATION_URL . 'assets/js/chromeless-bridge' . $suffix . '.js',
428 + array(),
429 + $built_version( 'assets/js/chromeless-bridge' . $suffix . '.js' ),
430 + true
431 + );
432 +
380 433 // `os-gutenberg-drop-receiver` — iframe-side bundle
381 434 // enqueued only on the Block Editor screens (`post.php` /
382 435 // `post-new.php`) for openstation users. Listens for
383 436 // `os-drop` postMessages from the parent shell (see
@@ -393,30 +446,13 @@
393 446 $built_version( 'assets/js/gutenberg-drop-receiver' . $suffix . '.js' ),
394 447 true
395 448 );
396 449
397 - // `desktop-mode-recycle-bin` — small bundle for the Recycle Bin
398 - // native window. Lazy-loaded by the native-window sync the first
399 - // time the bin opens; registers a render callback on
400 - // `window.openStationNativeWindows['desktop-mode-recycle-bin']`.
401 - $recycle_bin_js = OPENSTATION_DIR . 'assets/js/recycle-bin' . $suffix . '.js';
402 - wp_register_script(
403 - 'desktop-mode-recycle-bin',
404 - OPENSTATION_URL . 'assets/js/recycle-bin' . $suffix . '.js',
405 - // `heartbeat` + `jquery` — the bin opts in to the WordPress
406 - // Heartbeat API while its window is open as the catch-all
407 - // real-time channel for deletes that don't render an admin
408 - // footer (REST/AJAX/other tabs/WP-CLI). See
409 - // `src/recycle-bin/realtime.ts` for the subscriber.
410 - array( 'wp-i18n', 'heartbeat', 'jquery' ),
411 - file_exists( $recycle_bin_js ) ? (string) filemtime( $recycle_bin_js ) : $version,
412 - true
413 - );
414 - wp_set_script_translations(
415 - 'desktop-mode-recycle-bin',
416 - 'desktop-mode',
417 - OPENSTATION_DIR . 'languages'
418 - );
450 + // The Recycle Bin window is an App Framework app (`apps/trash/`);
451 + // its client view rides the app-bundle pipeline, so no dedicated
452 + // script handle. The `desktop-mode-recycle-bin` STYLE handle above
453 + // stays — the drag-to-trash drop-target highlight must be present
454 + // at boot (dropping on the closed bin's dock tile), not window-open.
419 455
420 456 // `desktop-mode-games` — bundle for the Games hub native window
421 457 // (launcher grid, scoreboard, challenges client). Lazy-loaded by
422 458 // the native-window sync the first time the hub opens; registers a
@@ -468,65 +504,8 @@
468 504 true
469 505 );
470 506 wp_set_script_translations(
471 507 'os-game-alphabet-soup',
472 - 'desktop-mode',
473 - OPENSTATION_DIR . 'languages'
474 - );
475 -
476 - // `os-posts-window` — small bundle for the native Posts
477 - // window. Lazy-loaded by the native-window sync the first time the
478 - // window opens (via the dock-click swap when the user opts in);
479 - // registers a render callback on
480 - // `window.openStationNativeWindows['desktop-mode-posts']`.
481 - $posts_window_js = OPENSTATION_DIR . 'assets/js/posts-window' . $suffix . '.js';
482 - wp_register_script(
483 - 'os-posts-window',
484 - OPENSTATION_URL . 'assets/js/posts-window' . $suffix . '.js',
485 - array( 'wp-i18n' ),
486 - file_exists( $posts_window_js ) ? (string) filemtime( $posts_window_js ) : $version,
487 - true
488 - );
489 - wp_set_script_translations(
490 - 'os-posts-window',
491 - 'desktop-mode',
492 - OPENSTATION_DIR . 'languages'
493 - );
494 -
495 - // `os-plugins-window` — small bundle for the native
496 - // Plugins window. Lazy-loaded by the native-window sync the first
497 - // time the window opens (via the dock-click swap when the user
498 - // opts in); registers a render callback on
499 - // `window.openStationNativeWindows['desktop-mode-plugins']`.
500 - $plugins_window_js = OPENSTATION_DIR . 'assets/js/plugins-window' . $suffix . '.js';
501 - wp_register_script(
502 - 'os-plugins-window',
503 - OPENSTATION_URL . 'assets/js/plugins-window' . $suffix . '.js',
504 - array( 'wp-i18n' ),
505 - file_exists( $plugins_window_js ) ? (string) filemtime( $plugins_window_js ) : $version,
506 - true
507 - );
508 - wp_set_script_translations(
509 - 'os-plugins-window',
510 - 'desktop-mode',
511 - OPENSTATION_DIR . 'languages'
512 - );
513 -
514 - // `os-comments-window` — small bundle for the native
515 - // Comments window. Lazy-loaded by the native-window sync the first
516 - // time the window opens (via the dock-click swap when the user
517 - // opts in); registers a render callback on
518 - // `window.openStationNativeWindows['desktop-mode-comments']`.
519 - $comments_window_js = OPENSTATION_DIR . 'assets/js/comments-window' . $suffix . '.js';
520 - wp_register_script(
521 - 'os-comments-window',
522 - OPENSTATION_URL . 'assets/js/comments-window' . $suffix . '.js',
523 - array( 'wp-i18n' ),
524 - file_exists( $comments_window_js ) ? (string) filemtime( $comments_window_js ) : $version,
525 - true
526 - );
527 - wp_set_script_translations(
528 - 'os-comments-window',
529 508 'desktop-mode',
530 509 OPENSTATION_DIR . 'languages'
531 510 );
532 511