From 857cf7816c0a6122f887d19cb09f23ccfa1a0bca Mon Sep 17 00:00:00 2001 From: Esteban Vega <35891811+estib-vega@users.noreply.github.com> Date: Thu, 10 Oct 2024 00:02:01 +0200 Subject: [PATCH] More PR details follow-ups (#5073) - Add a dedicated 'open PR in browser' button - Fix the description generation in the modal --- apps/desktop/src/lib/pr/PrDetailsModal.svelte | 4 ++-- apps/desktop/src/lib/pr/PullRequestCard.svelte | 15 ++++++++++----- .../src/lib/pr/StackingPullRequestCard.svelte | 15 ++++++++++----- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/apps/desktop/src/lib/pr/PrDetailsModal.svelte b/apps/desktop/src/lib/pr/PrDetailsModal.svelte index e61cb3fc2..4453ef813 100644 --- a/apps/desktop/src/lib/pr/PrDetailsModal.svelte +++ b/apps/desktop/src/lib/pr/PrDetailsModal.svelte @@ -236,12 +236,12 @@ commitMessages: commits.map((c) => c.description), prBodyTemplate: pullRequestTemplateBody, userToken: $user.access_token, - onToken: (t) => { + onToken: async (t) => { if (firstToken) { + inputBody = ''; firstToken = false; } inputBody += t; - inputBody = ''; } }); diff --git a/apps/desktop/src/lib/pr/PullRequestCard.svelte b/apps/desktop/src/lib/pr/PullRequestCard.svelte index f039ab8f3..792482ae9 100644 --- a/apps/desktop/src/lib/pr/PullRequestCard.svelte +++ b/apps/desktop/src/lib/pr/PullRequestCard.svelte @@ -203,16 +203,21 @@ style="ghost" outline icon="description-small" - onclick={(e: MouseEvent) => { - if (e.ctrlKey || e.metaKey) { - openExternalUrl($pr.htmlUrl); - return; - } + onclick={() => { prDetailsModal?.show(); }} > PR details + +