-
Notifications
You must be signed in to change notification settings - Fork 28
Fix non-standard data type tooltips and add tests #1991
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
6ea433b
Fix nonstandard type tooltips and refactor
rogermparent a99bcc6
Merge branch 'main' of github.com:iterative/vscode-dvc into minor-cel…
rogermparent fae24b4
Refactor stopPropagation event on tooltips
rogermparent 714880b
Add generic tooltip test builder and use it for multiple data types
rogermparent 4bfbbd3
Use more static values in tests
rogermparent a71be71
Add data types fixture
rogermparent 30706ef
Add failing tests using new fixture
rogermparent c22f486
Rename columns and fix tooltip tests
rogermparent 124217b
Fix grammar of rows tests
rogermparent efee628
Make text of columns tests similar to rows tests
rogermparent 168376c
Merge branch 'main' into minor-cell-fix
rogermparent 570038f
Move expectTooltipValue in only function it's used, remove module-wid…
rogermparent a7c944c
fix typo
rogermparent 489eac4
Remove unnecessary abstraction
rogermparent 74bc55c
Add interactive cell tooltip test
rogermparent d942f62
Change test wording
rogermparent b575781
Use @storybook/testing-library for Storybook play functions
rogermparent 22b2546
Stop using screen
rogermparent 46cbf45
Merge branch 'storybook-testing-library' into minor-cell-fix
rogermparent c74e3b1
Add .play to show bool tooltip on data types Storybook
rogermparent c638db3
Increase chromatic delay for multiview zoomed plot
rogermparent 8112478
Further increase chromatic delay
rogermparent 2292037
Remove chromatic delay on MultiView Zoomed plot
rogermparent b20d192
Remove chromatic delays
rogermparent db47df5
Await multiview plot
rogermparent 31838ba
Merge branch 'main' into storybook-testing-library
rogermparent 7ee1d49
Merge branch 'storybook-testing-library' of github.com:iterative/vsco…
rogermparent 359008a
Merge branch 'main' into minor-cell-fix
rogermparent File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,193 @@ | ||
| import { ExperimentsOutput } from '../../../cli/reader' | ||
| import { | ||
| Column, | ||
| ColumnType, | ||
| Row, | ||
| TableData | ||
| } from '../../../experiments/webview/contract' | ||
|
|
||
| export const dataTypesOutput: ExperimentsOutput = { | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We'll probably add more types here, I just included what has been asked for and we can work from there- I haven't tried nested lists or objects, and |
||
| workspace: { | ||
| baseline: { | ||
| data: { | ||
| timestamp: null, | ||
| params: { | ||
| 'params.yaml': { | ||
| data: { | ||
| bool1: true, | ||
| bool2: false, | ||
| zero: 0, | ||
| negative: -123, | ||
| float: 1.9293040037155151, | ||
| string: 'string', | ||
| emptyString: '', | ||
| array: [true, false, 'string', 2] | ||
| } | ||
| } | ||
| }, | ||
| queued: false, | ||
| running: false, | ||
| executor: null | ||
| } | ||
| } | ||
| }, | ||
| '53c3851f46955fa3e2b8f6e1c52999acc8c9ea77': { | ||
| baseline: { | ||
| data: { | ||
| timestamp: '2020-11-21T19:58:22', | ||
| queued: false, | ||
| running: false, | ||
| executor: null, | ||
| name: 'main' | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
| export const columns: Column[] = [ | ||
| { | ||
| hasChildren: true, | ||
| label: 'params.yaml', | ||
| parentPath: ColumnType.PARAMS, | ||
| path: 'params:params.yaml', | ||
| type: ColumnType.PARAMS | ||
| }, | ||
| { | ||
| hasChildren: false, | ||
| label: 'bool1', | ||
| maxStringLength: 4, | ||
| parentPath: 'params:params.yaml', | ||
| path: 'params:params.yaml:bool1', | ||
| pathArray: [ColumnType.PARAMS, 'params.yaml', 'bool1'], | ||
| type: ColumnType.PARAMS, | ||
| types: ['boolean'] | ||
| }, | ||
| { | ||
| hasChildren: false, | ||
| label: 'bool2', | ||
| maxStringLength: 5, | ||
| parentPath: 'params:params.yaml', | ||
| path: 'params:params.yaml:bool2', | ||
| pathArray: [ColumnType.PARAMS, 'params.yaml', 'bool2'], | ||
| type: ColumnType.PARAMS, | ||
| types: ['boolean'] | ||
| }, | ||
| { | ||
| hasChildren: false, | ||
| label: 'zero', | ||
| maxNumber: 0, | ||
| maxStringLength: 1, | ||
| minNumber: 0, | ||
| parentPath: 'params:params.yaml', | ||
| path: 'params:params.yaml:zero', | ||
| pathArray: [ColumnType.PARAMS, 'params.yaml', 'zero'], | ||
| type: ColumnType.PARAMS, | ||
| types: ['number'] | ||
| }, | ||
| { | ||
| hasChildren: false, | ||
| label: 'negative', | ||
| maxNumber: -123, | ||
| maxStringLength: 4, | ||
| minNumber: -123, | ||
| parentPath: 'params:params.yaml', | ||
| path: 'params:params.yaml:negative', | ||
| pathArray: [ColumnType.PARAMS, 'params.yaml', 'negative'], | ||
| type: ColumnType.PARAMS, | ||
| types: ['number'] | ||
| }, | ||
| { | ||
| hasChildren: false, | ||
| label: 'float', | ||
| maxNumber: 1.9293040037155151, | ||
| maxStringLength: 18, | ||
| minNumber: 1.9293040037155151, | ||
| parentPath: 'params:params.yaml', | ||
| path: 'params:params.yaml:float', | ||
| pathArray: [ColumnType.PARAMS, 'params.yaml', 'float'], | ||
| type: ColumnType.PARAMS, | ||
| types: ['number'] | ||
| }, | ||
| { | ||
| hasChildren: false, | ||
| label: 'string', | ||
| maxStringLength: 6, | ||
| parentPath: 'params:params.yaml', | ||
| path: 'params:params.yaml:string', | ||
| pathArray: [ColumnType.PARAMS, 'params.yaml', 'string'], | ||
| type: ColumnType.PARAMS, | ||
| types: ['string'] | ||
| }, | ||
| { | ||
| hasChildren: false, | ||
| label: 'emptyString', | ||
| maxStringLength: 0, | ||
| parentPath: 'params:params.yaml', | ||
| path: 'params:params.yaml:emptyString', | ||
| pathArray: [ColumnType.PARAMS, 'params.yaml', 'emptyString'], | ||
| type: ColumnType.PARAMS, | ||
| types: ['string'] | ||
| }, | ||
| { | ||
| hasChildren: false, | ||
| label: 'array', | ||
| maxStringLength: 19, | ||
| parentPath: 'params:params.yaml', | ||
| path: 'params:params.yaml:array', | ||
| pathArray: [ColumnType.PARAMS, 'params.yaml', 'array'], | ||
| type: ColumnType.PARAMS, | ||
| types: ['array'] | ||
| } | ||
| ] | ||
| export const rows: Row[] = [ | ||
| { | ||
| displayColor: '#945dd6', | ||
| executor: null, | ||
| id: 'workspace', | ||
| label: 'workspace', | ||
| params: { | ||
| 'params.yaml': { | ||
| array: [true, false, 'string', 2], | ||
| emptyString: '', | ||
| bool2: false, | ||
| float: 1.9293040037155151, | ||
| negative: -123, | ||
| string: 'string', | ||
| bool1: true, | ||
| zero: 0 | ||
| } | ||
| }, | ||
| queued: false, | ||
| running: false, | ||
| selected: true, | ||
| timestamp: null | ||
| }, | ||
| { | ||
| displayColor: '#13adc7', | ||
| executor: null, | ||
| id: 'main', | ||
| label: 'main', | ||
| name: 'main', | ||
| queued: false, | ||
| running: false, | ||
| selected: true, | ||
| sha: '53c3851f46955fa3e2b8f6e1c52999acc8c9ea77', | ||
| timestamp: '2020-11-21T19:58:22' | ||
| } | ||
| ] | ||
|
|
||
| export const dataTypesTableData: TableData = { | ||
| changes: [], | ||
| columnOrder: [], | ||
| columnWidths: {}, | ||
| filteredCounts: { experiments: 0, checkpoints: 0 }, | ||
| filters: [], | ||
| hasCheckpoints: false, | ||
| hasRunningExperiment: false, | ||
| sorts: [], | ||
| columns, | ||
| hasColumns: true, | ||
| rows | ||
| } | ||
|
|
||
| export default dataTypesTableData | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -663,3 +663,7 @@ $badge-size: 0.85rem; | |
| vertical-align: middle; | ||
| font-size: 0.5rem; | ||
| } | ||
|
|
||
| .cellTooltip { | ||
| padding: 2px 6px; | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This allows the
Valuetype to hold mixed but not nested lists.