Skip to content

Commit

Permalink
Merge branch 'main' into merge-create-plot-commands
Browse files Browse the repository at this point in the history
  • Loading branch information
julieg18 committed Sep 19, 2023
2 parents 68ff206 + 64e8038 commit 403e93f
Show file tree
Hide file tree
Showing 15 changed files with 946 additions and 1,016 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cross-platform-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ concurrency:
jobs:
suite:
runs-on: ${{ matrix.os }}
timeout-minutes: 25
timeout-minutes: 30
strategy:
matrix:
os: [windows-latest]
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@

All notable changes to this project will be documented in this file.

## [1.0.55] - 2023-09-18

### 🐛 Bug Fixes

- Fix Vega plots disappearing [#4673](https://github.com/iterative/vscode-dvc/pull/4673) by [@mattseddon](https://github.com/mattseddon)
- Remove mutli source plots encoding cache [#4678](https://github.com/iterative/vscode-dvc/pull/4678) by [@mattseddon](https://github.com/mattseddon)

### 🔨 Maintenance

- Use insiders for e2e tests (chromium missing) [#4669](https://github.com/iterative/vscode-dvc/pull/4669) by [@mattseddon](https://github.com/mattseddon)
- Update demo project and latest tested CLI version (3.21.0) [#4668](https://github.com/iterative/vscode-dvc/pull/4668) by [@mattseddon](https://github.com/mattseddon)
- Increase windows tests timeout [#4677](https://github.com/iterative/vscode-dvc/pull/4677) by [@mattseddon](https://github.com/mattseddon)

## [1.0.54] - 2023-09-14

### 🚀 New Features and Enhancements
Expand Down
2 changes: 1 addition & 1 deletion demo
Submodule demo updated 1 files
+1 −1 requirements.txt
16 changes: 8 additions & 8 deletions extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"extensionDependencies": [
"vscode.git"
],
"version": "1.0.54",
"version": "1.0.55",
"license": "Apache-2.0",
"readme": "./README.md",
"repository": {
Expand Down Expand Up @@ -1721,13 +1721,13 @@
"node-fetch": "2.7.0",
"process-exists": "4.1.0",
"tree-kill": "1.2.2",
"uuid": "9.0.0",
"uuid": "9.0.1",
"vega-util": "1.17.2",
"vscode-languageclient": "8.1.0",
"yaml": "2.3.2"
},
"devDependencies": {
"@swc/core": "1.3.83",
"@swc/core": "1.3.84",
"@swc/jest": "0.2.29",
"@types/chai": "4.3.6",
"@types/chai-as-promised": "7.1.6",
Expand All @@ -1750,17 +1750,17 @@
"@types/vscode": "1.64.0",
"@vscode/test-electron": "2.3.4",
"@vscode/vsce": "2.21.0",
"@wdio/cli": "8.16.3",
"@wdio/local-runner": "8.16.3",
"@wdio/cli": "8.16.6",
"@wdio/local-runner": "8.16.6",
"@wdio/mocha-framework": "8.16.3",
"@wdio/spec-reporter": "8.16.3",
"chai": "4.3.8",
"chai-as-promised": "7.1.1",
"clean-webpack-plugin": "4.0.0",
"copy-webpack-plugin": "11.0.0",
"fork-ts-checker-webpack-plugin": "8.0.0",
"jest": "29.6.4",
"jest-environment-node": "29.6.4",
"jest": "29.7.0",
"jest-environment-node": "29.7.0",
"lint-staged": "14.0.1",
"mocha": "10.2.0",
"mock-require": "3.0.3",
Expand All @@ -1770,7 +1770,7 @@
"ts-loader": "9.4.4",
"vscode-uri": "3.0.7",
"wdio-vscode-service": "5.2.1",
"webdriverio": "8.16.3",
"webdriverio": "8.16.6",
"webpack": "5.88.2",
"webpack-cli": "5.1.4"
},
Expand Down
2 changes: 1 addition & 1 deletion extension/src/cli/dvc/contract.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Plot } from '../../plots/webview/contract'

export const MIN_CLI_VERSION = '2.58.1'
export const LATEST_TESTED_CLI_VERSION = '3.19.0'
export const LATEST_TESTED_CLI_VERSION = '3.21.1'

export const PLOT_TEMPLATES = [
'simple',
Expand Down
2 changes: 1 addition & 1 deletion extension/src/plots/model/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ export class PlotsModel extends ModelWithPersistence {
await Promise.all([
collectData(output),
collectTemplates(output),
collectMultiSourceVariations(output, this.multiSourceVariations)
collectMultiSourceVariations(output)
])

this.comparisonData = {
Expand Down
8 changes: 4 additions & 4 deletions extension/src/plots/multiSource/collect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,8 @@ const collectPathMultiSourceVariations = (
}
}

export const collectMultiSourceVariations = (
output: PlotsOutput,
acc: Record<string, Record<string, unknown>[]>
) => {
export const collectMultiSourceVariations = (output: PlotsOutput) => {
const acc: Record<string, Record<string, unknown>[]> = {}
const { data } = output
for (const [path, plots] of Object.entries(data)) {
collectPathMultiSourceVariations(acc, path, plots)
Expand Down Expand Up @@ -275,6 +273,8 @@ const collectUnmergedShapeEncoding = (
}
}

// this is how we can collect the encoding for multi-source plots
// we need to pass in the anchors that we want to fill as well
const collectPathMultiSourceEncoding = (
acc: MultiSourceEncoding,
path: string,
Expand Down
2 changes: 1 addition & 1 deletion extension/src/test/e2e/wdio.conf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const config: Options.Testrunner = {
capabilities: [
{
browserName: 'vscode',
browserVersion: 'stable',
browserVersion: 'insiders',
'wdio:vscodeOptions': {
extensionPath,
userSettings: {
Expand Down
4 changes: 2 additions & 2 deletions extension/src/test/suite/plots/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1218,13 +1218,13 @@ suite('Plots Test Suite', () => {
plotsDiff: plotsDiffFixture
})

const executeCommandSpy = spy(commands, 'executeCommand')
const mockExecuteCommand = stub(commands, 'executeCommand')

mockMessageReceived.fire({
type: MessageFromWebviewType.ADD_PLOT
})

expect(executeCommandSpy).to.be.calledWithExactly(
expect(mockExecuteCommand).to.be.calledWithExactly(
RegisteredCommands.ADD_PLOT,
dvcDemoPath
)
Expand Down
6 changes: 3 additions & 3 deletions languageServer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@
"test": "jest --collect-coverage"
},
"devDependencies": {
"@swc/core": "1.3.83",
"@swc/core": "1.3.84",
"@swc/jest": "0.2.29",
"@types/jest": "29.5.4",
"clean-webpack-plugin": "4.0.0",
"copy-webpack-plugin": "11.0.0",
"fork-ts-checker-webpack-plugin": "8.0.0",
"ts-loader": "9.4.4",
"lint-staged": "14.0.1",
"jest": "29.6.4",
"jest": "29.7.0",
"webpack": "5.88.2",
"webpack-cli": "5.1.4",
"jest-environment-node": "29.6.4"
"jest-environment-node": "29.7.0"
}
}
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
"svgr": "yarn workspace dvc-vscode-webview svgr"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "6.6.0",
"@typescript-eslint/parser": "6.6.0",
"@typescript-eslint/eslint-plugin": "6.7.0",
"@typescript-eslint/parser": "6.7.0",
"@vscode/codicons": "0.0.33",
"eslint": "8.48.0",
"eslint": "8.49.0",
"eslint-config-prettier": "9.0.0",
"eslint-config-prettier-standard": "4.0.1",
"eslint-config-standard": "17.1.0",
Expand All @@ -46,7 +46,7 @@
"eslint-plugin-import": "2.28.1",
"eslint-plugin-jest": "27.2.3",
"eslint-plugin-jsx-a11y": "6.7.1",
"eslint-plugin-n": "16.0.2",
"eslint-plugin-n": "16.1.0",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-prettier": "5.0.0",
"eslint-plugin-promise": "6.1.1",
Expand All @@ -57,7 +57,7 @@
"eslint-plugin-testing-library": "6.0.1",
"eslint-plugin-unicorn": "48.0.1",
"husky": "8.0.3",
"jest": "29.6.4",
"jest": "29.7.0",
"lint-staged": "14.0.1",
"npm-run-all": "4.1.5",
"nyc": "15.1.0",
Expand Down
22 changes: 11 additions & 11 deletions webview/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"dependencies": {
"@reduxjs/toolkit": "1.9.5",
"@tanstack/react-table": "8.9.7",
"@tanstack/react-table": "8.9.8",
"@tippyjs/react": "4.2.6",
"@vscode/webview-ui-toolkit": "1.2.2",
"classnames": "2.3.2",
Expand All @@ -39,19 +39,19 @@
"vega-util": "1.17.2"
},
"devDependencies": {
"@storybook/addon-essentials": "7.4.0",
"@storybook/addon-interactions": "7.4.0",
"@storybook/addons": "7.4.0",
"@storybook/builder-webpack5": "7.4.0",
"@storybook/addon-essentials": "7.4.1",
"@storybook/addon-interactions": "7.4.1",
"@storybook/addons": "7.4.1",
"@storybook/builder-webpack5": "7.4.1",
"@storybook/manager-webpack5": "6.5.16",
"@storybook/preset-scss": "1.0.3",
"@storybook/react": "7.4.0",
"@storybook/react-webpack5": "7.4.0",
"@storybook/react": "7.4.1",
"@storybook/react-webpack5": "7.4.1",
"@storybook/testing-library": "0.2.0",
"@svgr/core": "^8.0.0",
"@svgr/plugin-jsx": "^8.0.1",
"@svgr/plugin-prettier": "^8.0.1",
"@swc/core": "1.3.83",
"@swc/core": "1.3.84",
"@swc/jest": "0.2.29",
"@testing-library/jest-dom": "6.1.3",
"@testing-library/react": "14.0.0",
Expand All @@ -69,14 +69,14 @@
"file-loader": "6.2.0",
"fork-ts-checker-webpack-plugin": "8.0.0",
"identity-obj-proxy": "3.0.0",
"jest": "29.6.4",
"jest": "29.7.0",
"jest-canvas-mock": "2.5.2",
"jest-environment-jsdom": "29.6.4",
"jest-environment-jsdom": "29.7.0",
"lint-staged": "14.0.1",
"raw-loader": "4.0.2",
"sass": "1.66.1",
"sass-loader": "13.3.2",
"storybook": "7.4.0",
"storybook": "7.4.1",
"storybook-addon-themes": "6.1.0",
"style-loader": "3.3.3",
"stylelint": "15.10.3",
Expand Down
10 changes: 6 additions & 4 deletions webview/src/plots/components/App.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ describe('App', () => {
expect(screen.queryByText('Images')).not.toBeInTheDocument()
})

it('should toggle the custom plots section in state when its header is clicked', async () => {
it('should hide plots when their section is collapsed (setting to null can break some Vega plots)', async () => {
renderAppWithOptionalData({
custom: customPlotsFixture
})
Expand Down Expand Up @@ -660,9 +660,11 @@ describe('App', () => {
}
})

expect(
screen.queryByLabelText('Vega visualization')
).not.toBeInTheDocument()
const hiddenPlots = await screen.findAllByLabelText('Vega visualization')
for (const hiddenPlot of hiddenPlots) {
expect(hiddenPlot).toBeInTheDocument()
expect(hiddenPlot).not.toBeVisible()
}
})

it('should not toggle the custom plots section when its header is clicked and its title is selected', async () => {
Expand Down
33 changes: 14 additions & 19 deletions webview/src/plots/components/PlotsContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,25 +156,20 @@ export const PlotsContainer: React.FC<PlotsContainerProps> = ({
)
}
>
{open && (
<div
className={cx({
[styles.plotsWrapper]: sectionKey !== PlotsSection.COMPARISON_TABLE,
[styles.smallPlots]: nbItemsPerRowOrWidth >= 4
})}
style={
{
'--nb-per-row': nbItemsPerRowOrWidth
} as DetailedHTMLProps<
HTMLAttributes<HTMLDivElement>,
HTMLDivElement
>
}
data-testid="plots-wrapper"
>
{children}
</div>
)}
<div
className={cx({
[styles.plotsWrapper]: sectionKey !== PlotsSection.COMPARISON_TABLE,
[styles.smallPlots]: nbItemsPerRowOrWidth >= 4
})}
style={
{
'--nb-per-row': nbItemsPerRowOrWidth
} as DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>
}
data-testid="plots-wrapper"
>
{children}
</div>
</SectionContainer>
)
}
Loading

0 comments on commit 403e93f

Please sign in to comment.