fix(web): make copy PR link discoverable in keybindings (#11826)
This commit is contained in:
1 parent
9a49d6d5a6
commit
014016a623
3 files changed
+11
-8
No files matched your search
@@ -37,12 +37,15 @@ describe("KeybindingsSettings.logic", () => {
|
||||
});
|
||||
}
|
||||
});
|
||||
it("finds the existing URL shortcut in Settings", () => {
|
||||
const rows = buildKeybindingRows(DEFAULT_RESOLVED_KEYBINDINGS, "PR URL");
|
||||
expect(rows).toEqual([
|
||||
expect.objectContaining({ command: "thread.copyReference", key: "mod+shift+c" }),
|
||||
]);
|
||||
});
|
||||
it.each(["pu", "pull request", "copy link", "thread id"])(
|
||||
"finds the copy link shortcut with %s",
|
||||
(query) => {
|
||||
const rows = buildKeybindingRows(DEFAULT_RESOLVED_KEYBINDINGS, query);
|
||||
expect(rows).toContainEqual(
|
||||
expect.objectContaining({ command: "thread.copyReference", key: "mod+shift+c" }),
|
||||
);
|
||||
},
|
||||
);
|
||||
it("builds searchable rows with readable key and when values", () => {
|
||||
const rows = buildKeybindingRows(
|
||||
[
|
||||
|
||||
@@ -276,7 +276,7 @@ export function buildKeybindingCommandOptions(
|
||||
}
|
||||
|
||||
export function commandLabel(command: KeybindingCommand): string {
|
||||
if (command === "thread.copyReference") return "Thread: Copy PR URL or Thread ID";
|
||||
if (command === "thread.copyReference") return "Pull Request: Copy Link or Thread ID";
|
||||
const raw = String(command);
|
||||
if (raw.startsWith("script.") && raw.endsWith(".run")) {
|
||||
return `Run Script: ${titleCaseCommandSegment(raw.slice("script.".length, -".run".length))}`;
|
||||
|
||||
@@ -25,7 +25,7 @@ in Settings.
|
||||
|
||||
With a PR open in the right panel or on the Pull Requests page, use `mod+shift+c`
|
||||
to copy its URL and `mod+shift+k` to copy its number with a `#` prefix.
|
||||
Both shortcuts can be changed in Settings. Search for “Copy PR URL or Thread ID”
|
||||
Both shortcuts can be changed in Settings. Search for “Copy Link or Thread ID”
|
||||
or “Copy Number”. They copy the selected PR and leave terminal input alone.
|
||||
|
||||
## Edit the configuration file
|
||||
|
||||
Reference in new issue
Block a user