From 8d884fe123d7cad939cd61471cdaa51fa10f07e9 Mon Sep 17 00:00:00 2001 From: Keith Daulton Date: Fri, 24 Mar 2023 14:55:10 -0400 Subject: [PATCH] Updates focus view rows - converts participants label to an icon - updates action links to buttons - updates vertical alignment of table cells --- .../apps/plus/focus/components/issue-row.ts | 46 +++++++++++++++++-- .../apps/plus/focus/components/pull-request-row.ts | 52 +++++++++++++++++++--- src/webviews/apps/plus/focus/focus.html | 8 +++- 3 files changed, 93 insertions(+), 13 deletions(-) diff --git a/src/webviews/apps/plus/focus/components/issue-row.ts b/src/webviews/apps/plus/focus/components/issue-row.ts index 424b48a..1f11120 100644 --- a/src/webviews/apps/plus/focus/components/issue-row.ts +++ b/src/webviews/apps/plus/focus/components/issue-row.ts @@ -27,7 +27,7 @@ const template = html` ${x => x.issue!.repository.repo} - + ${when( x => x.issue!.author != null, html` @@ -44,9 +44,9 @@ const template = html` html``, )} - ${x => x.issue!.commentsCount} - ${x => x.issue!.thumbsUpCount} - + ${x => x.issue!.commentsCount} + ${x => x.issue!.thumbsUpCount} + @@ -81,6 +81,10 @@ const styles = css` font-size: inherit; } + .vcenter { + vertical-align: middle; + } + .tag { display: inline-block; padding: 0.1rem 0.2rem; @@ -102,11 +106,45 @@ const styles = css` .icon-only { } + .participants { + white-space: nowrap; + } + .stats { } .actions { text-align: right; + white-space: nowrap; + } + + .actions a { + box-sizing: border-box; + display: inline-flex; + justify-content: center; + align-items: center; + width: 3.2rem; + height: 3.2rem; + border-radius: 0.5rem; + color: inherit; + padding: 0.2rem; + vertical-align: text-bottom; + text-decoration: none; + cursor: pointer; + } + .actions a:focus { + outline: 1px solid var(--vscode-focusBorder); + outline-offset: -1px; + } + .actions a:hover { + background-color: var(--vscode-toolbar-hoverBackground); + } + .actions a:active { + background-color: var(--vscode-toolbar-activeBackground); + } + + .actions a code-icon { + font-size: 1.6rem; } .stat-added { diff --git a/src/webviews/apps/plus/focus/components/pull-request-row.ts b/src/webviews/apps/plus/focus/components/pull-request-row.ts index 67923dd..f6eebc8 100644 --- a/src/webviews/apps/plus/focus/components/pull-request-row.ts +++ b/src/webviews/apps/plus/focus/components/pull-request-row.ts @@ -77,7 +77,7 @@ const template = html` )} - + ${when( x => x.pullRequest!.author != null, html` @@ -94,20 +94,19 @@ const template = html` html``, )} - ${x => x.pullRequest!.comments} - ${x => x.pullRequest!.comments} + +${x => x.pullRequest!.additions} -${x => x.pullRequest!.deletions} - + - Pull Request - Participants + + + @@ -92,7 +94,9 @@ Title - Participants + + +