| @@ -2,11 +2,12 @@ | ||
| 2 | 2 | /** |
| 3 | 3 | * OpenStation — Shell markup injection. |
| 4 | 4 | * |
| 5 | 5 | * Emits the `<div id="os-shell">…</div>` skeleton at |
| 6 | - * `in_admin_header @ 5`. The shell floats on top of the classic | |
| 7 | - * admin via `position: fixed`; the body class added by | |
| 8 | - * `body-classes.php` triggers the CSS that hides classic chrome. | |
| 6 | + * `in_admin_header @ 5` on the shell screen (`includes/shell-screen.php`). | |
| 7 | + * The shell floats on top of the admin document via `position: fixed`; | |
| 8 | + * the body class added by `body-classes.php` triggers the CSS that | |
| 9 | + * hides classic chrome. | |
| 9 | 10 | * |
| 10 | 11 | * Extracted from `render.php` during the architecture-0.8.1 PHP |
| 11 | 12 | * slicing (phase 6). |
| 12 | 13 | * |
| @@ -25,9 +26,9 @@ | ||
| 25 | 26 | * classic sidebar, body, and footer are hidden with `body.os-active` |
| 26 | 27 | * selectors. |
| 27 | 28 | */ |
| 28 | 29 | function openstation_render_shell() { |
| 29 | - if ( openstation_is_chromeless_request() || ! openstation_is_enabled() || openstation_is_classic_request() ) { | |
| 30 | + if ( ! openstation_is_shell_request() ) { | |
| 30 | 31 | return; |
| 31 | 32 | } |
| 32 | 33 | |
| 33 | 34 | /** |
| @@ -49,10 +50,16 @@ | ||
| 49 | 50 | // system default (and nothing else about themes runs at all). |
| 50 | 51 | $desktop_theme = function_exists( 'openstation_active_desktop_theme_slug' ) |
| 51 | 52 | ? openstation_active_desktop_theme_slug() |
| 52 | 53 | : ''; |
| 54 | + | |
| 55 | + // A shell asked to boot into overview (a switch from another site's | |
| 56 | + // switcher) arrives with its desk hidden until overview is up, so the | |
| 57 | + // desk slides in as one piece instead of the bare desk flashing first. | |
| 58 | + // See `src/multisite/instance-transition.ts`. | |
| 59 | + $arriving = openstation_shell_lands_in_overview() ? ' os-shell--arriving' : ''; | |
| 53 | 60 | ?> |
| 54 | - <div id="os-shell" class="os-shell" data-os-scheme="<?php echo esc_attr( $scheme ); ?>"<?php echo '' !== $desktop_theme ? ' data-os-desktop-theme="' . esc_attr( $desktop_theme ) . '"' : ''; ?> role="application" aria-label="<?php esc_attr_e( 'Desktop shell', 'desktop-mode' ); ?>"> | |
| 61 | + <div id="os-shell" class="os-shell<?php echo esc_attr( $arriving ); ?>" data-os-scheme="<?php echo esc_attr( $scheme ); ?>"<?php echo '' !== $desktop_theme ? ' data-os-desktop-theme="' . esc_attr( $desktop_theme ) . '"' : ''; ?> role="application" aria-label="<?php esc_attr_e( 'Desktop shell', 'desktop-mode' ); ?>"> | |
| 55 | 62 | <?php |
| 56 | 63 | /* |
| 57 | 64 | * Wallpaper layer — sits behind both the dock and the desktop |
| 58 | 65 | * area so a translucent dock bleeds through to the wallpaper |
| @@ -63,9 +70,18 @@ | ||
| 63 | 70 | */ |
| 64 | 71 | ?> |
| 65 | 72 | <div id="os-wallpaper" class="os-wallpaper" aria-hidden="true"></div> |
| 66 | 73 | <div class="os-shell__body"> |
| 67 | - <nav id="os-dock" class="os-dock" role="toolbar" aria-label="<?php esc_attr_e( 'Admin navigation', 'desktop-mode' ); ?>"></nav> | |
| 74 | + <?php | |
| 75 | + /* | |
| 76 | + * `data-os-dock-behavior` is stamped here, not only by the | |
| 77 | + * shell's apply pass, so a `dynamic` dock is folded from the | |
| 78 | + * first paint instead of flashing on screen and folding once | |
| 79 | + * the JS lands. The Split layout's sidebar is synthesised by | |
| 80 | + * JS and stamped there. | |
| 81 | + */ | |
| 82 | + ?> | |
| 83 | + <nav id="os-dock" class="os-dock" role="toolbar" aria-label="<?php esc_attr_e( 'Admin navigation', 'desktop-mode' ); ?>" data-os-dock-behavior="<?php echo esc_attr( openstation_get_dock_behavior() ); ?>"></nav> | |
| 68 | 84 | <div id="os-area" class="os-area os-area--with-dock os-area--booting"> |
| 69 | 85 | <?php |
| 70 | 86 | /* |
| 71 | 87 | * Widget column — paints above the wallpaper but |