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

Fix react and remote-workspace examples #1411

Merged
merged 3 commits into from
May 6, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Refactor and add tests
  • Loading branch information
texodus committed May 6, 2021
commit 09eac49d97677378ba151c665afa0d80babdde60
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -181,3 +181,4 @@ docs/static/css/material.dark.css
docs/i18n/en.json
docs/static/js

rust/perspective-vieux/target.vscode
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@

perspective-column-style {
background-color: @grey700;
color: @grey60;
color: #FFFFFF;
border: 1px solid @grey500;
--input--border-color: @grey500;
--active-color: #2770a9;
--inactive-color: @grey500;
}

perspective-viewer, .perspective-viewer-material-dense-dark{
Expand Down
1 change: 1 addition & 0 deletions packages/perspective-viewer/src/themes/material-dense.less
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ perspective-column-style {
color: #161616;
border: 1px solid #E0E4E9;
--input--border-color: #E0E4E9;
--active-color: @blue500;
}

perspective-viewer, .perspective-viewer-material-dense {
Expand Down
4 changes: 3 additions & 1 deletion packages/perspective-viewer/src/themes/material.dark.less
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@

perspective-column-style {
background-color: @grey700;
color: @grey60;
color: #FFFFFF;
border: 1px solid @grey500;
--input--border-color: @grey500;
--active-color: #2770a9;
--inactive-color: @grey500;
}

perspective-viewer, .perspective-viewer-material-dark {
Expand Down
1 change: 1 addition & 0 deletions packages/perspective-viewer/src/themes/material.less
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ perspective-column-style {
color: #161616;
border: 1px solid #E0E4E9;
--input--border-color: #E0E4E9;
--active-color: @blue500;
}

.perspective-viewer-material-base() {
Expand Down
4 changes: 3 additions & 1 deletion packages/perspective-workspace/src/theme/material.dark.less
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ perspective-viewer.workspace-master-widget {

perspective-column-style {
background-color: @grey700;
color: @grey60;
color: #FFFFFF;
border: 1px solid @grey500;
--input--border-color: @grey500;
--active-color: #2770a9;
--inactive-color: @grey500;
}

.p-Menu {
Expand Down
1 change: 1 addition & 0 deletions packages/perspective-workspace/src/theme/material.less
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ perspective-column-style {
color: #161616;
border: 1px solid #E0E4E9;
--input--border-color: #E0E4E9;
--active-color: @blue500;
}

.perspective-workspace-material-base() {
Expand Down
4 changes: 2 additions & 2 deletions rust/perspective-vieux/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions rust/perspective-vieux/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ license = "Apache-2.0"

[lib]
crate-type = ["cdylib", "rlib"]
path = "src/rust/vieux.rs"
path = "src/rust/lib.rs"

[features]
default = ["wee_alloc", "console_error_panic_hook"]
Expand All @@ -21,7 +21,7 @@ num-format = "0.4.0"
serde = { version = "1.0", features = ["derive"] }
wasm-bindgen = { version = "0.2.63" , features = ["serde-serialize"] }
wasm-bindgen-futures = "0.4.20"
yew = { git = "https://github.com/yewstack/yew", rev = "b074b4b" } # "0.17.4"
yew = { git = "https://github.com/yewstack/yew", rev = "c51ab7f" } # "0.17.4"

# The `console_error_panic_hook` crate provides better debugging of panics by
# logging them with `console.error`. This is great for development, but requires
Expand Down
69 changes: 58 additions & 11 deletions rust/perspective-vieux/src/less/column-style.less
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
*
*/

:host {
@import "./radio-list.less";

:host {
position: absolute;
z-index: 10000;
padding: 6px;
Expand All @@ -24,26 +26,75 @@
background: none;
color: inherit;
border: 0px solid transparent;
outline: none;
}

input.parameter[type=number] {
border-bottom-width: 1px;
border-color: var(--input--border-color);
outline: none;
}

input[type=radio], input[type=checkbox], & > div > div > span:first-child {
.indent {
margin-left: 24px;
}

input[type=checkbox], & > div > div > span:first-child {
width: 24px;
margin: 0;
}

& > div > div {
display: flex;
align-items: center;
height: 24px;
input[type=checkbox] {
appearance: none;
font-family: "Material Icons";
font-size: 16px;
text-align: center;

&:checked:after {
content: "\E834";
}

&:not([disabled]):checked:after {
color: var(--active-color, red);
}

&:after {
content: "\E835";
color: var(--inactive-color, #999);
}
}



input[type=radio] {
appearance: none;
font-family: "Material Icons";
font-size: 16px;
font-feature-settings: "liga";
text-align: center;

&:checked:after {
content: "radio_button_checked";
color: var(--active-color, red);
}

&:after {
content: "radio_button_unchecked";
color: var(--inactive-color, #999);
}
}



div.section {
margin-bottom: 8px;
}

div.row {
display: flex;
align-items: center;
height: 24px;
}

input[type=color] {
width: 24px;
}
Expand All @@ -56,8 +107,4 @@
input.parameter[disabled] {
opacity: 0.5;
}

.indent1 {
margin-left: 24px;
}
}
29 changes: 29 additions & 0 deletions rust/perspective-vieux/src/less/radio-list.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/******************************************************************************
*
* Copyright (c) 2017, the Perspective Authors.
*
* This file is part of the Perspective library, distributed under the terms
* of the Apache License 2.0. The full license can be found in the LICENSE
* file.
*
*/

:host {

.radio-list-item {
display: flex;
align-items: center;
height: 24px;

// Fix radio buttons
input[type=radio] {
width: 24px;
margin: 0;
}

input[type=radio][disabled] ~ * {
opacity: 0.5;
}
}

}
Loading