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
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Each of these has a page in the user guide.
- **[Link a Trac ticket](https://wordpress.github.io/contributor-toolkit/guide/trac-tickets)** to a Core site and read its facts in the app: summary, status and resolution, type, milestone, component, keywords, age. A ticket can also arrive from a browser: the app answers `wpct://ticket/62281` links and offers the ticket to the site you have open. On a Gutenberg site, **[link a GitHub issue](https://wordpress.github.io/contributor-toolkit/guide/gutenberg-issues)** instead, and the app lists the pull requests that cite it.
- **[Try the work that already exists on it](https://wordpress.github.io/contributor-toolkit/guide/applying-patches)**: pull requests are checked out on their own branches with the author's commits, on both projects, while on Core `.diff` and `.patch` files are previewed and applied to the current ticket as removable layers. When a patch file will not apply, the app says which regions failed and why, and leaves the checkout untouched.
- **[Hold work for several tickets or issues in one site](https://wordpress.github.io/contributor-toolkit/guide/ticket-branches)**. Each one gets its own branch inside the site, so moving between them is a file swap of seconds instead of another clone and another install.
- **[Run the site](https://wordpress.github.io/contributor-toolkit/guide/running-the-site)** and debug it: a [debug log tab](https://wordpress.github.io/contributor-toolkit/guide/logs-and-debugging) with fatals surfaced instead of hidden behind the recovery screen, [the database](https://wordpress.github.io/contributor-toolkit/guide/database), [captured mail](https://wordpress.github.io/contributor-toolkit/guide/mail), and [a terminal](https://wordpress.github.io/contributor-toolkit/guide/terminal) using the Node.js runtime the app bundles.
- **[Run the site](https://wordpress.github.io/contributor-toolkit/guide/running-the-site)** and debug it: a [debug log tab](https://wordpress.github.io/contributor-toolkit/guide/logs-and-debugging) with fatals surfaced instead of hidden behind the recovery screen, [the database](https://wordpress.github.io/contributor-toolkit/guide/database), [captured mail](https://wordpress.github.io/contributor-toolkit/guide/mail), [a terminal](https://wordpress.github.io/contributor-toolkit/guide/terminal) using the Node.js runtime the app bundles, and [step debugging with Xdebug](https://wordpress.github.io/contributor-toolkit/guide/step-debugging) in VS Code, Cursor, PhpStorm or Zed.
- **[Send the change back](https://wordpress.github.io/contributor-toolkit/guide/submitting-changes)**: [a GitHub pull request](https://wordpress.github.io/contributor-toolkit/guide/submit-github-pr) to `wordpress-develop` or `WordPress/gutenberg`, opened through device sign-in with no credential on disk, [a patch attached to Trac](https://wordpress.github.io/contributor-toolkit/guide/submit-trac) (Core only), or [a patch handed to a mentor](https://wordpress.github.io/contributor-toolkit/guide/submit-mentor) that keeps your name on the work.
- **[Keep the site current with trunk](https://wordpress.github.io/contributor-toolkit/guide/trunk-updates)** without recreating it, fetching only what changed.

Expand Down Expand Up @@ -87,7 +87,6 @@ How the app works from a user's point of view — the toolchain it bundles, keep
- Explore bundling MySQL server with the app.
- Potentially integrate with Studio to benefit from wp-cli integration and other Studio features.
- Resolve conflicts in the app. Branches, commits and pushes are already handled for each work item, but when a work item's branch cannot move onto current trunk, the app still hands it to a mentor.
- Internationalization: the app's interface available in several languages, not only English.

### Download stats

Expand Down
2 changes: 2 additions & 0 deletions docs/guide/applying-patches.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ On a Core site there are two additional patch-file routes: click **or choose a .

When you choose a pull request, the preview lists the files changed by its commits and says whether changing checkout requires `npm install`. Nothing has changed yet.

If the ticket or issue you are on has edits, the preview also says where they go before you continue: *Your edits to 1 file stay with ticket #60001 and come back when you revert this PR.* The count is the same one the ticket card shows. If you first tried this pull request from a different ticket or issue, **Revert this PR** returns to that one, so the sentence says the edits *come back when you return to it* instead. On trunk, with nothing linked, there is no sentence.

Click **Apply and rebuild** to continue. The app parks the work on your current ticket or issue, creates or reuses `pr/NNNN`, and checks out the PR's commits exactly as its author wrote them. In a terminal, `git status` now reports `On branch pr/NNNN` and a clean working tree until you make edits of your own.

This avoids trying to make an old PR's diff fit today's trunk. It also keeps authorship and commit history visible. A closed PR can still be checked out for investigation; its state does not change what Git has stored.
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/database.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The dev server runs WordPress on SQLite, and the app bundles [Adminer](https://w

## Opening Adminer

While the dev server is running, a **DB inspect (Adminer)** link appears beside the server URL in the site view, after **wp-admin**. Clicking it opens Adminer in your browser, already logged into the site's SQLite database — no credentials to enter. From there you can browse tables, inspect rows, and run SQL, the same way you would against a MySQL-backed install.
While the dev server is running, a **Database** link appears under **Server** in the site's details, after **wp-admin**. Clicking it opens Adminer in your browser, already logged into the site's SQLite database — no credentials to enter. From there you can browse tables, inspect rows, and run SQL, the same way you would against a MySQL-backed install.

Adminer uses the database path recorded by Playground after WordPress initializes, for both Core and Gutenberg sites. This supports randomized storage, legacy fixed paths, and an explicit `DB_PATH`. The path is inside the Playground environment; use Adminer to browse the active database.

Expand Down
52 changes: 35 additions & 17 deletions docs/guide/editors.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,58 @@
# Opening the site in your editor

The app is not an editor. To change WordPress code you open the site's directory in whatever editor you already use, and the site header gives you one control for that.
The app is not an editor. To change WordPress code you open the site's folder in the editor you already use. The app opens it for you from the **Site actions** menu, and opens a single changed file from the site's details.

![The site view, with the site's path under Local path in the details and the site's menu button at the end of the page's header](/screenshots/site-view.png)
![The site view, with the site's path under Local path in the details and the Site actions menu button at the right end of the header](/screenshots/site-view.png)

## The Open directory in menu
## Choose your code editor

Under the site's path in the header, click **Open directory in**. The menu contains:
In [Settings](./settings), under **General → Applications**, **Code editor** lists the editors the app found on your computer, and **Ask each time**, which is the default.

- The system file manager — **Finder** on macOS, **File Explorer** on Windows, **File manager** on Linux.
- Any editors the app detected on your machine, by name — for example **Visual Studio Code**, **Cursor**, **PhpStorm**, **Sublime Text**, or **Zed**.
- **Other application…** — a picker for choosing any application yourself.
- With an editor chosen, the app opens the site and its files in that editor without asking.
- With **Ask each time**, the app asks which application to use every time.

Choosing an entry opens the site's directory in that application.
The same setting decides which editor's setup the site's details offer for [step debugging](./step-debugging).

If the editor you chose is uninstalled later, the app asks again until you choose another one. The next time you open Settings, **Code editor** reads **Ask each time** and a notice says the editor is no longer installed.

Only editors the app found can be chosen. An application you pick with **Other application…** opens the site, but it cannot be saved as the setting.

## Open in

Open the **Site actions** menu (⋮) at the right end of the header, or right-click the site in the sidebar.

- With a code editor chosen in Settings, the menu has one item, **Open in** followed by the editor's name, for example **Open in PhpStorm**. Choose it to open the site's folder in that editor.
- With **Ask each time**, **Open in** opens a second menu. It lists each editor the app found on your computer, by name, and then **Other application…**, which is always last.

## Changed files

The **Changed files** section of the site's details lists, as folder trees, the files your work changes and the files an applied patch or pull request changes. Click a file to open it:

- With a code editor chosen in Settings, the file opens in that editor.
- With **Ask each time**, a menu labelled **Open in** opens next to the file, with the same editors and **Other application…**. Press Escape to close it without opening anything.
- If the app found no editor, the file is shown in your file manager.

Folders that editors create for their own settings are not listed: `.idea`, `.vscode`, `.vs`, `.fleet`, `.zed` and `.nova`. The app adds them to the site's local Git excludes (`.git/info/exclude`), so they also stay out of your patch. If you remove a rule from that file, the app does not add it again. A file that the project itself tracks in one of these folders, such as Gutenberg's own `.vscode` files, is still listed when you change it.

## How detection works

Detection checks the standard install locations for a short list of common editors: VS Code, Cursor, PhpStorm, Sublime Text, and Zed. It runs each time you open the menu — while it is checking, the menu shows **Looking for applications…** — so an editor you install while the app is running appears the next time you open the menu.
Detection looks in the standard install locations for a short list of common editors: VS Code, Cursor, PhpStorm, Sublime Text, and Zed. It runs when you open a site, open the **Site actions** menu, click a changed file, or open Settings, so an editor you install while the app is running appears the next time you do one of those. While it is still looking, the menu shows **Looking for applications…**.

The list is a shortcut, not a limit. Detection deliberately checks fixed filesystem paths rather than your shell's `PATH` (a packaged desktop app does not inherit it), so it can miss editors installed somewhere unusual — JetBrains standalone installers with version-numbered directories, for instance, or most Linux packaging variants. An editor the list misses is not one the app refuses to use: that is what **Other application…** is for, and it is always in the menu, not only as a fallback.
The list is a shortcut, not a limit. Detection checks fixed install paths rather than your shell's `PATH` (a packaged desktop app does not inherit it), so it can miss editors installed somewhere unusual: JetBrains standalone installers with version-numbered folders, for instance, or most Linux packaging variants. An editor the list misses is not one the app refuses to use: that is what **Other application…** is for.

## Other application…

**Other application…** opens your system's application picker. Choose any application and the site directory is handed to it. This works for any editor, detected or not, and is the reliable path when detection comes up empty.
**Other application…** opens your system's application picker. Choose any application and the site's folder is handed to it. This works for any editor, found or not, and is the reliable path when detection finds nothing.

## Copy path and the file manager

Two related controls sit nearby:

- The copy icon next to the path in the header copies the site's full path to the clipboard (it briefly shows **Copied!**). Use it to open the directory from an editor's own **Open Folder** dialog or from a terminal.
- The ☰ **More** menu also offers **Copy path** and **Show in Finder** / **Show in Explorer** (**Show in file manager** on Linux), which reveals the directory in the system file manager.
- The **Copy** button next to **Local path** in the details copies the site's full path to the clipboard, and briefly reads **Copied**. Use it to open the folder from an editor's own **Open Folder** dialog or from a terminal.
- The **Site actions** menu also has **Copy path**, and **Show in Finder** / **Show in Explorer** (**Show in file manager** on Linux), which shows the folder in your file manager.

## When an open fails

If an application fails to open the directory — it was uninstalled, or the launch was refused — an inline notice appears directly under the **Open directory in** menu explaining what went wrong. When it makes sense, the notice carries a **Choose application…** button that opens the same picker as **Other application…**, so you can point at a working application without hunting for the menu again.
If an application cannot open the folder or file (it was uninstalled, or the launch was refused), a notice at the top of the site's page says what went wrong. When it can help, the notice has a **Choose application…** button that opens the same picker as **Other application…**, so you can choose an application that works.

## What to edit

The source you edit lives in the site directory: under `src/` on a WordPress Core site, under `packages/` on a Gutenberg site. While the [build watch](./running-the-site#the-build-watch) is running, your edits are rebuilt into `build/` as you save them. It runs on its own control, so it does not need the dev server up. On a WordPress Core site starting the server starts it too; on a built Gutenberg site the server starts without it, so start it yourself when you want `packages/` edits compiled on save. When your change is ready, see [Submitting changes](./submitting-changes).
The source you edit lives in the site's folder: under `src/` on a WordPress Core site, under `packages/` on a Gutenberg site. While the [build watch](./running-the-site#the-build-watch) is running, your edits are rebuilt into `build/` as you save them. It runs on its own control, so it does not need the dev server up. On a WordPress Core site, starting the server starts it too; on a built Gutenberg site the server starts without it, so start it yourself when you want `packages/` edits compiled on save. When your change is ready, see [Submitting changes](./submitting-changes).
10 changes: 6 additions & 4 deletions docs/guide/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,16 @@ On Contributor Day, open that site and run [**Update to latest trunk**](./trunk-

Download the latest build for your platform with the button above, then open the app.

On Linux the button downloads an AppImage. The [Releases page](https://github.com/WordPress/contributor-toolkit/releases/latest) also has a `.deb` for Debian and Ubuntu and an `.rpm` for Fedora, which add the app to your application menu. From the folder you downloaded the file to, run `sudo apt install ./wordpress-contributor-toolkit-X.Y.Z-linux-amd64.deb` or `sudo dnf install ./wordpress-contributor-toolkit-X.Y.Z-linux-x86_64.rpm`, with the version you downloaded in place of `X.Y.Z`. To remove it, run `sudo apt remove wordpress-contributor-toolkit` or `sudo dnf remove wordpress-contributor-toolkit`.

If macOS blocks the app when you first open it, see [Troubleshooting](./troubleshooting#macos-blocks-the-app-from-opening).

## Your first contribution

1. Click **Create a site**, choose a destination folder, and pick what to contribute to: **WordPress Core** (the default) or **Gutenberg**.
1. Click **Create new site** at the top of the sidebar, choose a destination folder, and pick what to contribute to: **WordPress Core** (the default) or **Gutenberg**.
2. Wait. The app downloads the repository, then installs the dependencies and runs the first build on its own — go and get a coffee. See [The setup wizard](./setup-wizard).
3. Click **Start dev server**.
4. A browser window opens automatically. If not, open it by clicking the site URL — or the **wp-admin** link beside it, to go straight to the dashboard.
3. When the checklist reaches its last step, click **Start dev server and finish the wizard**.
4. A browser window opens automatically. If not, click **View site** under **Server** in the site's details, or **wp-admin** to go straight to the dashboard.
5. Give the work a home: link a [Trac ticket](./trac-tickets) on a Core site or a [GitHub issue](./gutenberg-issues) on a Gutenberg site.
6. Make changes to the code — [open the site in your editor](./editors) straight from the app.
7. Click **Review & submit changes** to see a diff of everything you changed.
Expand All @@ -50,7 +52,7 @@ Every ticket or issue you link gets its own branch inside the site and keeps its
:::

::: tip You never need a new site to get newer code
**Update to latest trunk**, in the ☰ menu at the top right of any site, is available at any time on any site, however old: it fetches the latest trunk, reinstalls dependencies if they changed, and rebuilds. See [Staying up to date with trunk](./trunk-updates).
**Update to latest trunk**, in the **Site actions** menu (⋮) at the right end of any site's header, is available at any time on any site, however old: it fetches the latest trunk, reinstalls dependencies if they changed, and rebuilds. See [Staying up to date with trunk](./trunk-updates).
:::

## How it works under the hood
Expand Down
Loading
Loading