From 92a1cf5d3d0a6ac1c2cf20b2d8ce8e82116ce10b Mon Sep 17 00:00:00 2001 From: Matt Seddon Date: Tue, 17 May 2022 06:10:03 +1000 Subject: [PATCH 1/5] add links when there are no plots in the project --- webview/src/plots/components/GetStarted.tsx | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/webview/src/plots/components/GetStarted.tsx b/webview/src/plots/components/GetStarted.tsx index b5a2ecbbae..fa39849cb7 100644 --- a/webview/src/plots/components/GetStarted.tsx +++ b/webview/src/plots/components/GetStarted.tsx @@ -45,6 +45,26 @@ export const GetStarted = ({ )} )} + {!hasPlots && ( +
+

+ + {'Learn how to '} + + visualize experiments + + {' with DVC.'} + +

+ + {'Learn about the '} + + plots command + + . + +
+ )} ) From 8f240663ba88cfb7f52b729f0b793a651baf2e16 Mon Sep 17 00:00:00 2001 From: Matt Seddon Date: Tue, 17 May 2022 06:10:46 +1000 Subject: [PATCH 2/5] update font family for welcome views --- webview/src/shared/components/emptyState/styles.module.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/webview/src/shared/components/emptyState/styles.module.scss b/webview/src/shared/components/emptyState/styles.module.scss index 2d819af1e4..4baab001cd 100644 --- a/webview/src/shared/components/emptyState/styles.module.scss +++ b/webview/src/shared/components/emptyState/styles.module.scss @@ -17,4 +17,5 @@ opacity: 0.8; letter-spacing: 0.04em; color: $watermark-color; + font-family: sans-serif; } From b1dacad26539249270eab7c759d8f31e4bfcdab5 Mon Sep 17 00:00:00 2001 From: Matt Seddon Date: Tue, 17 May 2022 08:35:35 +1000 Subject: [PATCH 3/5] drop text tags --- webview/src/plots/components/GetStarted.tsx | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/webview/src/plots/components/GetStarted.tsx b/webview/src/plots/components/GetStarted.tsx index fa39849cb7..f646baa6da 100644 --- a/webview/src/plots/components/GetStarted.tsx +++ b/webview/src/plots/components/GetStarted.tsx @@ -48,21 +48,19 @@ export const GetStarted = ({ {!hasPlots && (

- - {'Learn how to '} - - visualize experiments - - {' with DVC.'} - + {'Learn how to '} + + visualize experiments + + {' with DVC.'}

- +

{'Learn about the '} - plots command + plots commands . - +

)} From 4ad78ca28edb427aa5ba98cc3af80d9061a2735d Mon Sep 17 00:00:00 2001 From: Matt Seddon Date: Tue, 17 May 2022 08:54:37 +1000 Subject: [PATCH 4/5] add periods --- webview/src/experiments/components/App.test.tsx | 8 ++++---- webview/src/experiments/components/Experiments.tsx | 4 ++-- webview/src/plots/components/App.test.tsx | 2 +- webview/src/plots/components/GetStarted.tsx | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/webview/src/experiments/components/App.test.tsx b/webview/src/experiments/components/App.test.tsx index a6c92094d1..fc51d2d538 100644 --- a/webview/src/experiments/components/App.test.tsx +++ b/webview/src/experiments/components/App.test.tsx @@ -153,7 +153,7 @@ describe('App', () => { }) ) - const noColumnsState = screen.queryByText('No Columns Selected') + const noColumnsState = screen.queryByText('No Columns Selected.') expect(noColumnsState).toBeInTheDocument() }) @@ -169,7 +169,7 @@ describe('App', () => { }) ) - const noExperimentsState = screen.queryByText('No Experiments to Display') + const noExperimentsState = screen.queryByText('No Experiments to Display.') expect(noExperimentsState).toBeInTheDocument() }) @@ -190,10 +190,10 @@ describe('App', () => { const loadingState = screen.queryByText('Loading experiments...') expect(loadingState).not.toBeInTheDocument() - const noExperimentsState = screen.queryByText('No Experiments to Display') + const noExperimentsState = screen.queryByText('No Experiments to Display.') expect(noExperimentsState).not.toBeInTheDocument() - const noColumnsState = screen.queryByText('No Columns Selected') + const noColumnsState = screen.queryByText('No Columns Selected.') expect(noColumnsState).not.toBeInTheDocument() }) diff --git a/webview/src/experiments/components/Experiments.tsx b/webview/src/experiments/components/Experiments.tsx index 1c640a390b..0f7e692c59 100644 --- a/webview/src/experiments/components/Experiments.tsx +++ b/webview/src/experiments/components/Experiments.tsx @@ -199,12 +199,12 @@ export const ExperimentsTable: React.FC<{ const hasOnlyDefaultColumns = columns.length <= 2 if (hasOnlyDefaultColumns) { - return No Columns Selected + return No Columns Selected. } const hasOnlyWorkspace = data.length <= 1 if (hasOnlyWorkspace) { - return No Experiments to Display + return No Experiments to Display. } return diff --git a/webview/src/plots/components/App.test.tsx b/webview/src/plots/components/App.test.tsx index cb5061baa8..e385820837 100644 --- a/webview/src/plots/components/App.test.tsx +++ b/webview/src/plots/components/App.test.tsx @@ -127,7 +127,7 @@ describe('App', () => { checkpoint: null, sectionCollapsed: DEFAULT_SECTION_COLLAPSED }) - const emptyState = await screen.findByText('No Plots to Display') + const emptyState = await screen.findByText('No Plots to Display.') expect(emptyState).toBeInTheDocument() }) diff --git a/webview/src/plots/components/GetStarted.tsx b/webview/src/plots/components/GetStarted.tsx index f646baa6da..0bbdab3f80 100644 --- a/webview/src/plots/components/GetStarted.tsx +++ b/webview/src/plots/components/GetStarted.tsx @@ -18,7 +18,7 @@ export const GetStarted = ({ return (
-

No Plots to Display

+

No Plots to Display.

{hasPlots && (
{!hasSelectedPlots && ( From 7510358c2b79748d2c8ac3de0e01480d40a35a37 Mon Sep 17 00:00:00 2001 From: Matt Seddon Date: Tue, 17 May 2022 10:12:42 +1000 Subject: [PATCH 5/5] use vs code theme colors for link text --- webview/src/shared/style.scss | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/webview/src/shared/style.scss b/webview/src/shared/style.scss index 368837971c..84eaf33f34 100644 --- a/webview/src/shared/style.scss +++ b/webview/src/shared/style.scss @@ -44,3 +44,15 @@ body { button { font-family: inherit; } + +a { + color: var(--vscode-textLink-foreground); + + &:hover { + color: var(--vscode-textLink-activeForeground); + } + + &:active { + color: var(--vscode-textLink-activeForeground); + } +}