Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,16 +171,18 @@ npm install

The plugin uses **[Vite](https://vitejs.dev/)** in library mode. esbuild handles transpile and minify, so builds finish in ~70 ms per bundle.

**Full build** — produces both bundles:
**Full build** — produces every bundle (`npm run build:desktop`, `:iframe-bridge`, `:recycle-bin`, `:posts-window`):

```bash
npm run build
```

Writes:

- `assets/js/desktop.js` — unminified IIFE, loaded when `SCRIPT_DEBUG` is `true`.
- `assets/js/desktop.min.js` — esbuild-minified IIFE, loaded otherwise.
- `assets/js/desktop.js` / `.min.js` — main shell bundle (loaded based on `SCRIPT_DEBUG`).
- `assets/js/iframe-bridge.js` / `.min.js` — opt-in bridge that gives any same-origin iframe access to `wp.desktop.iframe.*`.
- `assets/js/recycle-bin.js` / `.min.js` — Recycle Bin native window.
- `assets/js/posts-window.js` / `.min.js` — Native Posts window (the `<wpd-table>` replacement for the `edit.php` iframe; opt-in per user via OS Settings → Features).

**Development watch** — auto-recompiles the unminified bundle on save:

Expand Down
97 changes: 97 additions & 0 deletions assets/css/os-settings.css
Original file line number Diff line number Diff line change
Expand Up @@ -854,3 +854,100 @@
max-height: 100%;
overflow-y: auto;
}

/*
* Features section — per-user opt-in toggles.
*
* Save status pill renders the live OS-settings save lifecycle
* (`pending` → `saving` → `saved` / `failed`) so toggling a
* per-user feature flag gets immediate, honest feedback instead
* of an optimistic flicker.
*/
.desktop-mode-features__status-row {
min-height: 22px;
}

.desktop-mode-features__hint {
margin: 0;
font-size: 12px;
color: var( --wpd-text-muted, #50575e );
line-height: 1.5;
}

.desktop-mode-features__status {
display: inline-flex;
align-items: center;
gap: 6px;
font-size: 12px;
font-weight: 500;
padding: 2px 10px;
border-radius: 999px;
white-space: nowrap;
transition: opacity 200ms ease;
}

.desktop-mode-features__status--saving {
background: var( --wpd-surface-elevated, #f0f0f1 );
color: var( --wpd-text-muted, #50575e );
}

.desktop-mode-features__status--saved {
background: rgba( 30, 132, 73, 0.12 );
color: #1d6f42;
}

.desktop-mode-features__status--saved .dashicons {
font-size: 14px;
width: 14px;
height: 14px;
}

.desktop-mode-features__status--failed {
background: rgba( 214, 54, 56, 0.12 );
color: #a02622;
}

.desktop-mode-features__status--failed .dashicons {
font-size: 14px;
width: 14px;
height: 14px;
}

.desktop-mode-features__status-dot {
display: inline-block;
width: 8px;
height: 8px;
border-radius: 50%;
background: currentColor;
animation: desktop-mode-features-pulse 1.2s ease-in-out infinite;
}

@keyframes desktop-mode-features-pulse {
0%, 100% { opacity: 0.35; transform: scale( 0.85 ); }
50% { opacity: 1; transform: scale( 1 ); }
}

/*
* OS Settings panel header — hosts the global tabs strip and a single
* `<wpd-save-status>` indicator that auto-listens to the save
* lifecycle. The save status sits on the trailing edge of the header
* so it's visible across every tab without competing with section
* content.
*/
.desktop-mode-os-settings__header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
margin-bottom: 12px;
}

.desktop-mode-os-settings__header wpd-tabs {
flex: 1 1 auto;
min-width: 0;
}

.desktop-mode-os-settings__header wpd-save-status {
flex: 0 0 auto;
margin-inline-start: auto;
}
Loading
Loading