From 71d37cc632b2389457e0930f113041f6ac99f569 Mon Sep 17 00:00:00 2001 From: Calvin Lee Date: Mon, 17 Jun 2024 23:12:12 +0000 Subject: [PATCH] fix: [code-1991]: fix padding and scroll (#2119) --- .../PullRequestOverviewPanel.module.scss | 4 ++-- .../PullRequestOverviewPanel/sections/ChangesSection.tsx | 2 +- .../PullRequestOverviewPanel/sections/CommentsSection.tsx | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/web/src/pages/PullRequest/Conversation/PullRequestOverviewPanel/PullRequestOverviewPanel.module.scss b/web/src/pages/PullRequest/Conversation/PullRequestOverviewPanel/PullRequestOverviewPanel.module.scss index 7a96acf49..e096fedfb 100644 --- a/web/src/pages/PullRequest/Conversation/PullRequestOverviewPanel/PullRequestOverviewPanel.module.scss +++ b/web/src/pages/PullRequest/Conversation/PullRequestOverviewPanel/PullRequestOverviewPanel.module.scss @@ -86,7 +86,7 @@ .requiredContainer { display: inline-flex !important; - padding: 0px 6px 0.5px 6px !important; + padding: 0px 11px 0.5px 11px !important; justify-content: center !important; align-items: center !important; gap: 10px !important; @@ -189,7 +189,7 @@ } .paddingWithOutReq { - padding-right: 4rem !important; + padding-right: 4.15rem !important; } .changeContainerPadding { diff --git a/web/src/pages/PullRequest/Conversation/PullRequestOverviewPanel/sections/ChangesSection.tsx b/web/src/pages/PullRequest/Conversation/PullRequestOverviewPanel/sections/ChangesSection.tsx index b96b5a675..8b621ee6a 100644 --- a/web/src/pages/PullRequest/Conversation/PullRequestOverviewPanel/sections/ChangesSection.tsx +++ b/web/src/pages/PullRequest/Conversation/PullRequestOverviewPanel/sections/ChangesSection.tsx @@ -492,7 +492,7 @@ const ChangesSection = (props: ChangesSectionProps) => { ) : ( - + emptyStatus diff --git a/web/src/pages/PullRequest/Conversation/PullRequestOverviewPanel/sections/CommentsSection.tsx b/web/src/pages/PullRequest/Conversation/PullRequestOverviewPanel/sections/CommentsSection.tsx index c3779b5aa..2735ffa56 100644 --- a/web/src/pages/PullRequest/Conversation/PullRequestOverviewPanel/sections/CommentsSection.tsx +++ b/web/src/pages/PullRequest/Conversation/PullRequestOverviewPanel/sections/CommentsSection.tsx @@ -71,7 +71,9 @@ const CommentsSection = (props: MergeSectionProps) => { label: getString('unrsolvedComment'), value: PRCommentFilterType.UNRESOLVED_COMMENTS }) - document.querySelectorAll('.bp3-input[value="Active"]')[0].scrollIntoView({ behavior: 'smooth' }) + setTimeout(() => { + document.querySelectorAll('.bp3-input[value="Active"]')[0]?.scrollIntoView({ behavior: 'smooth' }) + }, 0) }} /> ) : null}