Skip to content

Commit c4234bd

Browse files
authored
plots: meaningful section default names (#1789)
1 parent 052d87d commit c4234bd

File tree

3 files changed

+23
-23
lines changed

3 files changed

+23
-23
lines changed
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Plots
22

3-
The extension will display the following sections for selected revisions:
3+
The extension will display the following sections for selected experiments:
44

5-
- Plots - the equivalent of `dvc plots diff`.
6-
- Comparison - a table used to display images for comparison.
7-
- Experiment Checkpoints - linear plots based on the checkpoints of selected
8-
experiments.
5+
- Data Series - JSON, YAML, CSV or TSV files visualized using Vega pre-defined
6+
or custom Vega-Lite templates.
7+
- Images - a table used to display image plots side by side.
8+
- Trends - linear plots based on data from the experiments table.
99

1010
Use `DVC: Show Plots` from the command palette to open the view for a `DVC`
1111
repository.

extension/src/plots/webview/contract.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ export enum Section {
1717
}
1818

1919
export const DEFAULT_SECTION_NAMES = {
20-
[Section.CHECKPOINT_PLOTS]: 'Experiment Checkpoints',
21-
[Section.TEMPLATE_PLOTS]: 'Plots',
22-
[Section.COMPARISON_TABLE]: 'Comparison'
20+
[Section.CHECKPOINT_PLOTS]: 'Trends',
21+
[Section.TEMPLATE_PLOTS]: 'Data Series',
22+
[Section.COMPARISON_TABLE]: 'Images'
2323
}
2424

2525
export const DEFAULT_SECTION_SIZES = {

webview/src/plots/components/App.test.tsx

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,9 @@ describe('App', () => {
203203
})
204204

205205
expect(screen.queryByText('Loading Plots...')).not.toBeInTheDocument()
206-
expect(screen.getByText('Experiment Checkpoints')).toBeInTheDocument()
207-
expect(screen.queryByText('Plots')).not.toBeInTheDocument()
208-
expect(screen.queryByText('Comparison')).not.toBeInTheDocument()
206+
expect(screen.getByText('Trends')).toBeInTheDocument()
207+
expect(screen.queryByText('Data Series')).not.toBeInTheDocument()
208+
expect(screen.queryByText('Images')).not.toBeInTheDocument()
209209
})
210210

211211
it('should render checkpoint and template plots when given messages with both types of plots data', () => {
@@ -219,12 +219,12 @@ describe('App', () => {
219219
})
220220

221221
expect(screen.queryByText('Loading Plots...')).not.toBeInTheDocument()
222-
expect(screen.getByText('Experiment Checkpoints')).toBeInTheDocument()
223-
expect(screen.getByText('Plots')).toBeInTheDocument()
222+
expect(screen.getByText('Trends')).toBeInTheDocument()
223+
expect(screen.getByText('Data Series')).toBeInTheDocument()
224224
})
225225

226226
it('should render the comparison table when given a message with comparison plots data', () => {
227-
const expectedSectionName = 'Comparison'
227+
const expectedSectionName = 'Images'
228228

229229
renderAppWithData({
230230
checkpoint: checkpointPlotsFixture,
@@ -244,12 +244,12 @@ describe('App', () => {
244244
sectionCollapsed: DEFAULT_SECTION_COLLAPSED
245245
})
246246

247-
expect(screen.getByText('Experiment Checkpoints')).toBeInTheDocument()
247+
expect(screen.getByText('Trends')).toBeInTheDocument()
248248

249249
sendSetDataMessage({
250250
checkpoint: null
251251
})
252-
expect(screen.queryByText('Experiment Checkpoints')).not.toBeInTheDocument()
252+
expect(screen.queryByText('Trends')).not.toBeInTheDocument()
253253
})
254254

255255
it('should toggle the checkpoint plots section in state when its header is clicked', async () => {
@@ -258,7 +258,7 @@ describe('App', () => {
258258
sectionCollapsed: DEFAULT_SECTION_COLLAPSED
259259
})
260260

261-
const summaryElement = await screen.findByText('Experiment Checkpoints')
261+
const summaryElement = await screen.findByText('Trends')
262262
const visiblePlots = await screen.findAllByLabelText('Vega visualization')
263263
visiblePlots.map(visiblePlot => {
264264
expect(visiblePlot).toBeInTheDocument()
@@ -300,7 +300,7 @@ describe('App', () => {
300300
/>
301301
)
302302

303-
const summaryElement = await screen.findByText('Experiment Checkpoints')
303+
const summaryElement = await screen.findByText('Trends')
304304
fireEvent.click(summaryElement, {
305305
bubbles: true,
306306
cancelable: true
@@ -347,7 +347,7 @@ describe('App', () => {
347347
/>
348348
)
349349

350-
const summaryElement = await screen.findByText('Comparison')
350+
const summaryElement = await screen.findByText('Images')
351351
fireEvent.click(summaryElement, {
352352
bubbles: true,
353353
cancelable: true
@@ -394,7 +394,7 @@ describe('App', () => {
394394
/>
395395
)
396396

397-
const summaryElement = await screen.findByText('Comparison')
397+
const summaryElement = await screen.findByText('Images')
398398
fireEvent.click(summaryElement, {
399399
bubbles: true,
400400
cancelable: true
@@ -579,7 +579,7 @@ describe('App', () => {
579579
checkpoint: checkpointPlotsFixture,
580580
sectionCollapsed: DEFAULT_SECTION_COLLAPSED
581581
})
582-
const originalText = 'Experiment Checkpoints'
582+
const originalText = 'Trends'
583583

584584
expect(screen.getByText(originalText)).toBeInTheDocument()
585585

@@ -600,7 +600,7 @@ describe('App', () => {
600600
checkpoint: checkpointPlotsFixture,
601601
sectionCollapsed: DEFAULT_SECTION_COLLAPSED
602602
})
603-
const originalText = 'Experiment Checkpoints'
603+
const originalText = 'Trends'
604604

605605
expect(screen.getByText(originalText)).toBeInTheDocument()
606606

@@ -1535,7 +1535,7 @@ describe('App', () => {
15351535
checkpoint: checkpointPlotsFixture,
15361536
sectionCollapsed: DEFAULT_SECTION_COLLAPSED
15371537
})
1538-
const target = screen.getByText('Experiment Checkpoints')
1538+
const target = screen.getByText('Trends')
15391539
const contextMenuEvent = createEvent.contextMenu(target)
15401540
fireEvent(target, contextMenuEvent)
15411541
expect(contextMenuEvent.defaultPrevented).toBe(true)

0 commit comments

Comments
 (0)