diff --git a/README.md b/README.md index d7654dd7..93f7e8e0 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Make WordPress posts: The [WordPress Contributor Toolkit](https://make.wordpress.org/core/2026/09/25/wordpress-contributor-toolkit-1-2-one-app-for-your-first-core-or-gutenberg-contribution/) is a desktop Electron application (macOS on Apple Silicon, Windows, and Linux) that takes a contributor from nothing to a working development environment for WordPress Core or Gutenberg, lets them try the work that already exists on a Trac ticket or a GitHub issue, and lets them send their own change back: as a pull request, a Trac attachment, or a patch for a mentor. No Git, Node.js, npm or Docker on the host, and no push credential written to disk. -![A site ready for work: the sites list, the page's header with the server's and the build watch's menus and Review & submit changes, the Trac ticket card with a ticket linked and the pull requests that cite it, and the site's details with its server and build watch](https://wordpress.github.io/contributor-toolkit/screenshots/site-view.png) +![A site ready for work: the sites list, the page's header with the server's and the build watch's buttons and Review & submit changes, the Trac ticket card with a ticket linked and the pull requests that cite it, and the site's details with its server and build watch](https://wordpress.github.io/contributor-toolkit/screenshots/site-view.png) ### Why diff --git a/docs/guide/creating-a-site.md b/docs/guide/creating-a-site.md index 3c1609d5..0022f58d 100644 --- a/docs/guide/creating-a-site.md +++ b/docs/guide/creating-a-site.md @@ -38,11 +38,11 @@ Each site is an ordinary folder on your disk: the parent folder you chose in **S Every site appears in the sidebar, newest first. Click a site to switch to it; the button for the active site is highlighted. Every site carries its project as a tag on its row and next to its status, **Core** or **Gutenberg**, so the two kinds are told apart at a glance; on a Gutenberg site the checklist, the terminal and the cards on its page follow suit (a GitHub issue instead of a Trac ticket, and pull-request checkout instead of Trac attachments or a local patch-file picker). The chevron at the top collapses the sidebar to a narrow strip showing only each site's initial. -A dot before each site name shows its development server, so you can see which sites are running without opening each: grey while it is stopped, green while it is running, amber while it starts, and red when it stopped by itself or could not start. The red dot's reason is in the open site's details and in its Logs. +An icon before each site name shows its development server, so you can see which sites are running without opening each: an empty circle while it is stopped, a tick while it is running, a part-filled circle while it starts, and a cross when it stopped by itself or could not start. Each also has its own colour (grey, green, amber, red). The reason for a cross is in the open site's details and in its Logs. -A second colored dot, after it, warns that a site has fallen behind trunk: +A second icon, after it, warns that a site has fallen behind trunk: -- **Amber** — the checkout is more than 14 days old. -- **Red** — a previous update moved the code but never finished installing or rebuilding. +- **Clock** (amber): the checkout is more than 14 days old. +- **Warning triangle** (red): a previous update moved the code but never finished installing or rebuilding. Both are fixed by [updating to the latest trunk](./trunk-updates) — you never need to create a new site just to get newer code. diff --git a/docs/guide/getting-started.md b/docs/guide/getting-started.md index 7369fd0d..9a325183 100644 --- a/docs/guide/getting-started.md +++ b/docs/guide/getting-started.md @@ -43,7 +43,7 @@ That's it — you've contributed to WordPress. When a site has something pending — a setup step to run, a warning to act on, work in flight — that one block is ringed in amber and scrolls itself into view, and is announced to screen readers as *Next step: …*. A site that is set up, running and clean has nothing pending, so nothing is ringed. And when an action finishes — a patch saved, trunk updated, a pull request opened — a brief notice says so out loud rather than leaving you to check. ::: -![A site ready for work: the sites list, the page's header with the server's and the build watch's menus and Review & submit changes, the Trac ticket card with a ticket linked and the pull requests that cite it, and the site's details with its server and build watch](/screenshots/site-view.png) +![A site ready for work: the sites list, the page's header with the server's and the build watch's buttons and Review & submit changes, the Trac ticket card with a ticket linked and the pull requests that cite it, and the site's details with its server and build watch](/screenshots/site-view.png) The rest of this guide walks through each of these screens in detail, starting with [creating a site](./creating-a-site). diff --git a/docs/guide/managing-sites.md b/docs/guide/managing-sites.md index 23bf89db..1fff75ea 100644 --- a/docs/guide/managing-sites.md +++ b/docs/guide/managing-sites.md @@ -10,7 +10,7 @@ The **Details** column lists: - **Setup**: **Initialized** once the site's dependencies are installed, and **Uninitialized** before that. - **Created**: when the site was created. -- **Trunk as of**: the date of the site's copy of trunk. When it gets old, a coloured dot appears next to the site in the sidebar. See [Staying up to date with trunk](./trunk-updates). +- **Trunk as of**: the date of the site's copy of trunk. When it gets old, a clock icon appears next to the site in the sidebar. See [Staying up to date with trunk](./trunk-updates). - **Local path**: the site's folder, with a **Copy** button. - **Checkout**: the project and the PHP version the server runs. - **Debugging**: which debug settings are on. See [Settings](./settings). diff --git a/docs/guide/running-the-site.md b/docs/guide/running-the-site.md index d1c92318..4f652470 100644 --- a/docs/guide/running-the-site.md +++ b/docs/guide/running-the-site.md @@ -2,23 +2,23 @@ Once the [setup wizard](./setup-wizard) is complete, you can start the site's development server. It starts a local WordPress that runs your site's code, so you can see your changes running: for a WordPress Core site, the WordPress built into its `build/` directory; for a Gutenberg site, a stock WordPress with your checkout as its Gutenberg plugin. -![The site view, with the server's and the build watch's menus and Review & submit changes in the page's header, and a Start button beside Server and beside Build watch in the details](/screenshots/site-view.png) +![The site view, with the server's and the build watch's buttons and Review & submit changes in the page's header, and a Start button beside Server and beside Build watch in the details](/screenshots/site-view.png) ## Start and stop There are two places to start the server: - In the site's details, click **Start** next to **Server**. -- In the header, open the server's menu (the first dot with a chevron) and choose **Start development server**. +- In the header, click **Start server**. -The server's dot shows its state, in the header and next to the site in the sidebar: +The server's status icon shows its state, in the header and next to the site in the sidebar. In the header, pointing at the button shows the same in words. When the window is narrow, the header's buttons shorten to the icon and **Server** or **Build**, and pointing at them still says what a click does: -- Grey: **Server stopped**. -- Amber: **Server starting…**. The details show how long it has been starting, and **Cancel** stops the start. -- Green: **Server running**. **Stop** in the details, or **Stop development server** in the menu, stops it. -- Red: the server stopped by itself or could not start. Its last lines are in the **Server** tab of the [Logs](./logs-and-debugging). +- Empty circle (grey): **Server stopped**. +- Part-filled circle (amber): **Server starting…**. The details show how long it has been starting, and **Cancel** in the details, or **Cancel start** in the header, stops the start. +- Tick (green): **Server running**. **Stop** in the details, or **Stop server** in the header, stops it. +- Cross (red): the server stopped by itself or could not start. Its last lines are in the **Server** tab of the [Logs](./logs-and-debugging). -When the server is running, the details list **View site**, **wp-admin** and **Database** under **Server**, with the admin username and password. The header's server menu has **View site** and **wp-admin** too. Each opens in your default browser. +When the server is running, the details list **View site**, **wp-admin** and **Database** under **Server**, with the admin username and password. Each opens in your default browser. ![The site view with the dev server running: in the details, under Server, a Stop button, the View site, wp-admin and Database links, and the admin credentials with the password hidden](/screenshots/dev-server-running.png) @@ -45,19 +45,19 @@ The dev server is not a stub — it is WordPress Playground running your checkou ## The build watch -The build watcher compiles what you edit into what the server actually serves: `src/` into `build/` on a WordPress Core site, the packages into their `build/` directories on a Gutenberg site, where the watcher is Gutenberg's own `npm run dev` and rebuilds everything once before it starts watching. It has its own **Start** button under **Build watch** in the details, its own menu in the header with **Start build watch**, and its own status dot: +The build watcher compiles what you edit into what the server actually serves: `src/` into `build/` on a WordPress Core site, the packages into their `build/` directories on a Gutenberg site, where the watcher is Gutenberg's own `npm run dev` and rebuilds everything once before it starts watching. It has its own **Start** button under **Build watch** in the details, its own button in the header, **Start build** (**Stop build** while it runs), and its own status icon: -| Dot | State | +| Icon | State | | --- | --- | -| Green | Watching. It stays green while it recompiles a save — that is its normal working state. | -| Amber | Either the one-off full build that runs before the watch can start on a site that has never been built, or the watch paused while another action owns the build directory. | -| Red | It exited on its own. Read the **Build watcher** log tab to find out why. | -| Grey | Stopped. | +| Tick (green) | Watching. While it recompiles a save it shows the part-filled circle for a moment, then the tick again. | +| Part-filled circle (amber) | Either the one-off full build that runs before the watch can start on a site that has never been built, or the watch paused while another action owns the build directory. | +| Cross (red) | It exited on its own. Read the **Build watcher** log tab to find out why. | +| Empty circle (grey) | Stopped. | The watch and the server are independent in both directions: - On a WordPress Core site, starting the dev server starts the watch first (building once if the site has no `build/` yet), then serves. Its watch touches nothing on start, so the URL appears at once. -- On a Gutenberg site that is already built, starting the dev server does not start the watch: the server serves the `build/` the site has, and the URL appears in seconds. The watch is Gutenberg's `npm run dev`, which removes `build/` and rebuilds it (about twenty seconds on macOS, several minutes on Windows) before it watches, and on a built site that rebuild produces what was already there. Start it with **Start build watch** when you want edits under `packages/` compiled on save; applying a pull request or a patch, and updating trunk, rebuild on their own when no watch is running. On a Gutenberg site that has never been built, the watch still runs first, and the server waits for the **Build watcher** tab to print *Watching for changes* before the URL appears; a page opened before that would find the plugin unbuilt. The same happens after a rebuild that was cut short, a watch stopped or exited while its tab read *(building)*: `build/` may be incomplete, so the next server start sends the watch first and waits for it. Starting the watch by hand while a server is already up reopens that window: the site answers with Gutenberg's *requires files to be built* notice, or a PHP fatal, until the rebuild finishes. +- On a Gutenberg site that is already built, starting the dev server does not start the watch: the server serves the `build/` the site has, and the URL appears in seconds. The watch is Gutenberg's `npm run dev`, which removes `build/` and rebuilds it (about twenty seconds on macOS, several minutes on Windows) before it watches, and on a built site that rebuild produces what was already there. Start it with **Start build** in the header, or **Start** under **Build watch** in the details, when you want edits under `packages/` compiled on save; applying a pull request or a patch, and updating trunk, rebuild on their own when no watch is running. On a Gutenberg site that has never been built, the watch still runs first, and the server waits for the **Build watcher** tab to print *Watching for changes* before the URL appears; a page opened before that would find the plugin unbuilt. The same happens after a rebuild that was cut short, a watch stopped or exited while its tab read *(building)*: `build/` may be incomplete, so the next server start sends the watch first and waits for it. Starting the watch by hand while a server is already up reopens that window: the site answers with Gutenberg's *requires files to be built* notice, or a PHP fatal, until the rebuild finishes. - Stopping the dev server leaves the watch running, so you can keep compile-on-save going without a server. - The watch exiting never touches the server. - You can start and stop the watch on its own, whether or not a server is up. Its Start button is disabled while `npm run build` is running, for the same reason as the server's; its Stop button never is. diff --git a/docs/guide/trunk-updates.md b/docs/guide/trunk-updates.md index 1733d930..7b3cee7e 100644 --- a/docs/guide/trunk-updates.md +++ b/docs/guide/trunk-updates.md @@ -40,18 +40,18 @@ What an update does not move is the snapshot your work-item branch was created o After the update, the work-item card may say **Trunk has moved since this ticket started** or **…since this issue started**. That is not an incomplete update: trunk is current and the linked branch is still safely on its original base. To move the work forward, use the update action in that notice, or save a patch, unlink the item, delete its branch, link it again and apply the saved patch. The app never changes a work item's base without one of those explicit actions. See [When trunk has moved since the work item started](./ticket-branches#when-trunk-has-moved-since-the-work-item-started). -## Staleness dots and notices +## Staleness icons and notices -The app flags sites that have fallen behind with a coloured dot next to the site name in the sidebar, after the grey or green dot that shows the site's development server: +The app flags sites that have fallen behind with an icon next to the site name in the sidebar, after the icon that shows the site's development server: -- **Amber** — the snapshot is more than 14 days old. The site view also shows a notice recommending an update before you prepare changes against old code, with an **Update to latest trunk** button. -- **Red** — a previous update moved the code but never finished installing or rebuilding, so the built assets no longer match the source. Run the update again. +- **Clock** (amber): the snapshot is more than 14 days old. The site view also shows a notice recommending an update before you prepare changes against old code, with an **Update to latest trunk** button. +- **Warning triangle** (red): a previous update moved the code but never finished installing or rebuilding, so the built assets no longer match the source. Run the update again. ![The stale-site notice with its Update to latest trunk button](/screenshots/stale-site-notice.png) ## When an update does not finish -If the fetch succeeds but install or build fails, the site view shows a red banner: **Update incomplete** — the code is new but the built assets are old, and the site may not run correctly until install and build succeed. Click **Retry install & build** to run only the missing steps; the fetch is not repeated. The sidebar dot stays red until this succeeds. +If the fetch succeeds but install or build fails, the site view shows a red banner: **Update incomplete** — the code is new but the built assets are old, and the site may not run correctly until install and build succeed. Click **Retry install & build** to run only the missing steps; the fetch is not repeated. The sidebar's warning triangle stays until this succeeds. Every branch of a site shares one install and one build, so the banner shows on trunk and on every ticket until the retry succeeds, including after you link a ticket and take your edits into it. One successful retry clears it everywhere. diff --git a/docs/public/screenshots/dev-server-running.png b/docs/public/screenshots/dev-server-running.png index e0c70cb9..f8287fbc 100644 Binary files a/docs/public/screenshots/dev-server-running.png and b/docs/public/screenshots/dev-server-running.png differ diff --git a/docs/public/screenshots/gutenberg-site-view.png b/docs/public/screenshots/gutenberg-site-view.png index df306676..a89cbae5 100644 Binary files a/docs/public/screenshots/gutenberg-site-view.png and b/docs/public/screenshots/gutenberg-site-view.png differ diff --git a/docs/public/screenshots/site-menu.png b/docs/public/screenshots/site-menu.png index 3c1f61d1..b5507101 100644 Binary files a/docs/public/screenshots/site-menu.png and b/docs/public/screenshots/site-menu.png differ diff --git a/docs/public/screenshots/site-view.png b/docs/public/screenshots/site-view.png index 1261e301..2b01801d 100644 Binary files a/docs/public/screenshots/site-view.png and b/docs/public/screenshots/site-view.png differ diff --git a/docs/public/screenshots/site-with-tickets.png b/docs/public/screenshots/site-with-tickets.png index e19217aa..9c26bdda 100644 Binary files a/docs/public/screenshots/site-with-tickets.png and b/docs/public/screenshots/site-with-tickets.png differ diff --git a/docs/public/screenshots/stale-site-notice.png b/docs/public/screenshots/stale-site-notice.png index 0ba8f810..da8b39c5 100644 Binary files a/docs/public/screenshots/stale-site-notice.png and b/docs/public/screenshots/stale-site-notice.png differ diff --git a/src/renderer/components/site-details.jsx b/src/renderer/components/site-details.jsx index 52693f3a..da74452f 100644 --- a/src/renderer/components/site-details.jsx +++ b/src/renderer/components/site-details.jsx @@ -15,9 +15,9 @@ import { ProcessStatus } from './site-header-actions.jsx'; // contributor has just done themselves: nothing to announce. const SILENT = ''; -// A section's heading, with its process's dot and the button that starts and +// A section's heading, with its process's status icon and the button that starts and // stops it. The button shows one word and is named by the whole of what it -// does, which is also what the header's menu calls it. +// does. function SectionHeading({ title, process, onToggle }) { return ( diff --git a/src/renderer/components/site-header-actions.jsx b/src/renderer/components/site-header-actions.jsx index 4a90a7b6..14924cb6 100644 --- a/src/renderer/components/site-header-actions.jsx +++ b/src/renderer/components/site-header-actions.jsx @@ -1,9 +1,10 @@ import { useEffect, useMemo } from 'react'; import { createSlotFill } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; -import { Icon, chevronDown, drawerRight, moreVertical } from '@wordpress/icons'; +import { Icon, cancelCircleFilled, drawerRight, moreVertical, pending, published } from '@wordpress/icons'; import { Button, IconButton, Menu } from '@wordpress/ui'; import { openInItems, siteMenuItems } from '../site-menu.cjs'; +import { processTip } from '../site-processes.cjs'; // The page's header belongs to the window, and what goes in it belongs to the // site that is open (#556). The window leaves a slot in the header, and the @@ -139,52 +140,55 @@ export function SiteContextMenu({ position, menu, onMenuOpen, onAction, onClose ); } +// A stopped process: the ring the other three are drawn in, empty. The icon +// library has no plain circle, and "not allowed" would put a warning on every +// site that is simply not running. +const STOPPED = ( + + + +); + +// One shape for each state, so that the state can be told without its colour +// (#776): a tick for running, a ring part filled for busy, a cross for +// failed, and the ring alone for stopped. +const STATUS_ICONS = { online: published, busy: pending, failed: cancelCircleFilled, offline: STOPPED }; + /** - * A process's dot: what it is doing, as a colour. The words beside it say the - * same, so the dot is for the eye only. + * A process's status: what it is doing, as a shape and a colour. The words + * beside it say the same, so it is for the eye only. * * @param {Object} props * @param {string} props.status 'online', 'busy', 'failed' or 'offline'. - * @param {string} [props.title] What the dot stands for, for a pointer over it; the words beside it say it everywhere else. + * @param {string} [props.title] What it stands for, for a pointer over it; the words beside it say it everywhere else. */ export function ProcessStatus({ status, title }) { - return