Skip to content

Commit

Permalink
Merge pull request #1716 from finos/drag-drop-tests
Browse files Browse the repository at this point in the history
Drag/drop tests
  • Loading branch information
texodus authored Feb 6, 2022
2 parents 910799a + 827b3cf commit a27cc5b
Show file tree
Hide file tree
Showing 30 changed files with 1,065 additions and 551 deletions.
20 changes: 16 additions & 4 deletions examples/blocks/dist.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,24 @@ const replacements = {
// the wasm assets to not load correctly when using aliases ..

// "perspective/dist/umd/perspective.js": "perspective"
"perspective/dist/umd/perspective.js": "perspective",
"perspective-viewer/dist/umd/perspective-viewer.js": "perspective-viewer",
"perspective/dist/umd/perspective.js": "perspective@latest",
"perspective-viewer/dist/umd/perspective-viewer.js":
"perspective-viewer@latest",
"perspective-viewer-datagrid/dist/umd/perspective-viewer-datagrid.js":
"perspective-viewer-datagrid",
"perspective-viewer-datagrid@latest",
"perspective-viewer-d3fc/dist/umd/perspective-viewer-d3fc.js":
"perspective-viewer-d3fc",
"perspective-viewer-d3fc@latest",
"perspective-workspace/dist/umd/perspective-workspace.js":
"perspective-workspace@latest",

"perspective/dist/cdn/perspective.js":
"perspective@latest/dist/cdn/perspective.js",
"perspective-viewer/dist/cdn/perspective-viewer.js":
"perspective-viewer@latest/dist/cdn/perspective-viewer.js",
"perspective-viewer-datagrid/dist/cdn/perspective-viewer-datagrid.js":
"perspective-viewer-datagrid@latest/dist/cdn/perspective-viewer-datagrid.js",
"perspective-viewer-d3fc/dist/cdn/perspective-viewer-d3fc.js":
"perspective-viewer-d3fc@latest/dist/cdn/perspective-viewer-d3fc.js",
};

execute`mkdir -p dist`;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"postcss": "^7.0.19",
"postcss-loader": "^4.3.0",
"prettier": "^2.4.0",
"puppeteer": "^10.2.0",
"puppeteer": "^13.1.3",
"rimraf": "^2.6.2",
"sinon": "^7.3.1",
"style-loader": "^0.18.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/perspective-viewer-d3fc/src/js/charts/xy-line.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ xyLine.plugin = {
initial: {
type: "number",
count: 2,
names: ["X Axis", "Y Axis"],
names: ["X Axis", "Y Axis", "Tooltip"],
},
selectMode: "toggle",
};
Expand Down
14 changes: 2 additions & 12 deletions rust/perspective-viewer/src/rust/components/active_column.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ use super::expression_toolbar::*;
use crate::config::*;
use crate::dragdrop::*;
use crate::js::plugin::*;
use crate::model::*;
use crate::renderer::*;
use crate::session::*;
use crate::*;
Expand All @@ -19,17 +20,6 @@ use itertools::Itertools;
use web_sys::*;
use yew::prelude::*;

/// The possible states of a column (row) in the active columns list, including the
/// `Option<String>` label type.
#[derive(Clone, PartialEq)]
pub enum ActiveColumnState {
Column(Label, String),
Required(Label),
DragOver(Label),
}

type Label = Option<String>;

#[derive(Properties, Clone)]
pub struct ActiveColumnProps {
pub idx: usize,
Expand Down Expand Up @@ -70,7 +60,7 @@ impl ActiveColumnProps {
}
}

derive_renderable_props!(ActiveColumnProps);
derive_session_renderer_model!(ActiveColumnProps);

impl ActiveColumnProps {
/// Remove an active column from `columns`, or alternatively make this column
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

use super::containers::dropdown::*;
use crate::config::*;
use crate::model::*;
use crate::renderer::*;
use crate::session::*;
use crate::*;
Expand All @@ -22,7 +23,7 @@ pub struct AggregateSelectorProps {
pub session: Session,
}

derive_renderable_props!(AggregateSelectorProps);
derive_session_renderer_model!(AggregateSelectorProps);

impl PartialEq for AggregateSelectorProps {
fn eq(&self, _rhs: &Self) -> bool {
Expand Down
Loading

0 comments on commit a27cc5b

Please sign in to comment.