Skip to content
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

Status Bar Component #1314

Merged
merged 1 commit into from
Feb 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,10 @@ junit.xml
python/perspective/python_junit.xml
python/perspective/coverage.xml
python/perspective/bench/stresstest/results
rust/perspective-view/target
rust/perspective-view/pkg
rust/perspective-view/target2
rust/perspective-vieux/pkg

rust/perspective-vieux/target
rust/perspective-vieux/target2
1 change: 1 addition & 0 deletions .rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
max_width = 88
3 changes: 3 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ jobs:
- bash: npm install -g yarn
displayName: "Install Yarn"

- bash: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
displayName: "Install wasm-pack"

- task: Cache@2
inputs:
key: 'yarn | "$(Agent.OS)" | yarn.lock'
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"node": ">=8.12.0"
},
"workspaces": [
"rust/*",
"packages/*",
"examples/*",
"docs",
Expand Down
3 changes: 3 additions & 0 deletions packages/perspective-jupyterlab/src/config/plugin.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ module.exports = {
}
]
},
experiments: {
syncWebAssembly: true
},
output: {
filename: "[name].js",
libraryTarget: "umd",
Expand Down
3 changes: 3 additions & 0 deletions packages/perspective-jupyterlab/src/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ module.exports = {
}
]
},
experiments: {
syncWebAssembly: true
},
output: {
filename: "lumino.js",
libraryTarget: "umd",
Expand Down
4 changes: 4 additions & 0 deletions packages/perspective-jupyterlab/test/js/mocks/manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ import {PerspectiveJupyterWidget} from "../../../src/ts/widget";
import {ManagerBase} from "@jupyter-widgets/base-manager";
import {uuid} from "@jupyter-widgets/base";

jest.mock("@finos/perspective-vieux/pkg/perspective_vieux_bg.wasm", () => {
return {set_panic_hook: () => {}};
});

jest.mock("../../../src/ts/widget");

let numComms = 0;
Expand Down
6 changes: 4 additions & 2 deletions packages/perspective-jupyterlab/test/js/resize.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ utils.with_server({}, () => {
"Basic widget functions",
async page => {
await page.shadow_click("perspective-viewer", "#config_button");
await page.waitForSelector("perspective-viewer[settings]");
await page.waitForSelector("perspective-viewer:not([updating])");
},
{}
Expand All @@ -27,15 +28,16 @@ utils.with_server({}, () => {
"Resize the container causes the widget to resize",
async page => {
await page.shadow_click("perspective-viewer", "#config_button");
await page.waitForSelector("perspective-viewer:not([updating])");
await page.evaluate(async () => {
document.querySelector(".PSPContainer").style = "position:absolute;top:0;left:0;width:300px;height:300px";
await document.querySelector("perspective-viewer").notifyResize();
});
await page.waitForSelector("perspective-viewer:not([updating])");

await page.evaluate(async () => {
document.querySelector(".PSPContainer").style = "position:absolute;top:0;left:0;width:800px;height:600px";
await document.querySelector("perspective-viewer").notifyResize();
});
await page.waitForSelector("perspective-viewer:not([updating])");
},
{}
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"resize_Basic_widget_functions": "c6e48990276aac3539482d01e0a491f9",
"resize_Resize_the_container_causes_the_widget_to_resize": "c6e48990276aac3539482d01e0a491f9",
"resize_row_pivots_traitlet_works": "e0d5a93b55cf3008f8c4b103ef6675cd",
"__GIT_COMMIT__": "053769dd92a8efc508da0645cda1cab8cc8bb34e"
"resize_Basic_widget_functions": "a14f4d324f4bd8a82b4c288d5718f83b",
"resize_Resize_the_container_causes_the_widget_to_resize": "a14f4d324f4bd8a82b4c288d5718f83b",
"resize_row_pivots_traitlet_works": "dd9ada8ff87ff15db7af2d28a29c5144",
"__GIT_COMMIT__": "53aed115cad04a850a54c1b210776c4e64fb5aad"
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ utils.with_server({}, () => {
test.capture("filter by a single instrument.", async page => {
const viewer = await page.$("perspective-viewer");
await page.evaluate(element => element.setAttribute("filters", '[["Name", "==", "BARC"]]'), viewer);
await page.waitForSelector("perspective-viewer:not([updating])");
await page.evaluate(() => document.activeElement.blur());
});

Expand All @@ -29,6 +30,7 @@ utils.with_server({}, () => {
await page.shadow_click("perspective-viewer", "#config_button");
await page.evaluate(element => element.setAttribute("column-pivots", '["Name"]'), viewer);
await page.evaluate(element => element.setAttribute("filters", '[["Date", ">", "2019-01-01"]]'), viewer);
await page.waitForSelector("perspective-viewer:not([updating])");
await page.evaluate(() => document.activeElement.blur());
});
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ utils.with_server({}, () => {
element => {
let elem = element.shadowRoot.querySelector("perspective-d3fc-chart").shadowRoot.querySelector(".segment");
if (elem) {
return elem.textContent.includes("11/12");
// TODO Full label is clipped
return elem.textContent.includes("11/");
}
},
{},
Expand Down
Loading