Give the unstaged group of Source control its own title
The Changes section and its unstaged group both showed "Changes (2)". The group title is now "Unstaged changes (2)". The section title keeps the total count.
This commit is contained in:
+1
-1
@@ -13,7 +13,7 @@ Git is part of RuneStone and is on by default. It needs the `git` program on the
|
||||
3. Select a file to open its diff in an editor tab. **Open file** in that tab opens the file in the editor.
|
||||
4. Select the plus button beside a file to stage it, or the minus button to unstage it. The button beside a group stages or unstages all files in that group.
|
||||
|
||||
Source control shows the current branch and two groups. **Staged changes** go into the next commit. **Changes** holds the files that still need review or staging.
|
||||
Source control shows the current branch and the **Changes** section with two groups. **Staged changes** go into the next commit. **Unstaged changes** holds the files that still need review or staging.
|
||||
A file shows in both groups when only part of its content is staged. Unstage keeps the content of the working file.
|
||||
|
||||
Source control reads the repository again after each change in the workspace, also in the `.git` folder, and when the window gets focus. **Refresh source control** reads it at once.
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
{#if group.changes.length}
|
||||
<section class="group">
|
||||
<div class="group-header">
|
||||
<h3>{group.staged ? $t("Staged changes ({count})", { count: group.changes.length }) : $t("Changes ({count})", { count: group.changes.length })}</h3>
|
||||
<h3>{group.staged ? $t("Staged changes ({count})", { count: group.changes.length }) : $t("Unstaged changes ({count})", { count: group.changes.length })}</h3>
|
||||
<IconButton icon={group.staged ? "minus" : "plus"} label={group.staged ? $t("Unstage all") : $t("Stage all")} disabled={busy} onclick={() => stage(group.changes, group.staged)} />
|
||||
</div>
|
||||
{#each group.changes as change (change.path)}
|
||||
|
||||
@@ -3448,6 +3448,7 @@ export const messageRows: [string, string, string, string][] = [
|
||||
["Commit created.", "Commit créé.", "コミットを作成しました。", "已创建提交。"],
|
||||
["Changes ({count})", "Modifications ({count})", "変更 ({count})", "更改 ({count})"],
|
||||
["Staged changes ({count})", "Modifications indexées ({count})", "ステージ済みの変更 ({count})", "已暂存的更改 ({count})"],
|
||||
["Unstaged changes ({count})", "Modifications non indexées ({count})", "未ステージの変更 ({count})", "未暂存的更改 ({count})"],
|
||||
["Stage all", "Tout indexer", "すべてステージ", "全部暂存"],
|
||||
["Unstage all", "Tout désindexer", "すべてステージ解除", "全部取消暂存"],
|
||||
["Stage {path}", "Indexer {path}", "{path} をステージ", "暂存 {path}"],
|
||||
|
||||
@@ -50,7 +50,9 @@ await runSmoke("features/git", async ({ page }) => {
|
||||
await pane.getByText("main", { exact: true }).waitFor();
|
||||
assert.equal(await loaded(), true, "The Source control pane loads the Git module");
|
||||
await pane.getByRole("heading", { name: "Staged changes (1)", exact: true }).waitFor();
|
||||
await pane.getByRole("heading", { name: "Changes (2)", exact: true }).waitFor();
|
||||
await pane.getByRole("heading", { name: "Unstaged changes (2)", exact: true }).waitFor();
|
||||
assert.equal(await pane.locator("summary").textContent(), "Changes (3)", "The section title counts all changes");
|
||||
assert.equal(await pane.getByRole("heading", { name: "Changes (2)", exact: true }).count(), 0, "No group title repeats the section title");
|
||||
|
||||
await pane.getByRole("button", { name: "Stage new.md", exact: true }).click();
|
||||
await page.waitForFunction(() => window.__TEST__.git.calls.some(([command]) => command === "stage"));
|
||||
|
||||
Reference in New Issue
Block a user