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

Style fixes for perspective-workspace #890

Merged
merged 1 commit into from
Feb 1, 2020
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
Style fixes for perspective-workspace
  • Loading branch information
texodus committed Jan 30, 2020
commit ce009b9850ae1f5ae5681adcbe5592d39e677614
18 changes: 16 additions & 2 deletions packages/perspective-workspace/src/js/workspace/workspace.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,12 +287,26 @@ export class PerspectiveWorkspace extends DiscreteSplitPanel {
tabbar && tabbar.node.classList.add("p-ContextFocus");
this.element.classList.add("p-ContextMenu");
this.addClass("p-ContextMenu");
if (widget.viewer.classList.contains("p-Master")) {
menu.node.classList.add("p-Master");
} else {
menu.node.classList.remove("p-Master");
}
this._menu_opened = true;

menu.aboutToClose.connect(() => {
widget.removeClass("p-ContextFocus");
tabbar && tabbar.node.classList.remove("p-ContextFocus");
this.element.classList.remove("p-ContextMenu");
this.removeClass("p-ContextMenu");

// Delay to absorb opacity "bounce" due to animation technically
// being reset, when right click is made twice in succession.
this._menu_opened = false;
setTimeout(() => {
if (!this._menu_opened) {
this.element.classList.remove("p-ContextMenu");
this.removeClass("p-ContextMenu");
}
});
});

menu.open(event.clientX, event.clientY);
Expand Down
11 changes: 10 additions & 1 deletion packages/perspective-workspace/src/less/menu.less
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,16 @@
border-top-width: 0px;
border-right-width: 1px;
font: 12px Helvetica, Arial, sans-serif;
box-shadow: -1px 1px 3px rgba(0, 0, 0, 0.1);
box-shadow:
rgba(0, 0, 0, 0.2) 0px 3px 1px -2px,
rgba(0, 0, 0, 0.14) 0px 2px 2px 0px,
rgba(0, 0, 0, 0.12) 0px 1px 5px 0px;
}

.p-Menu.p-Master {
background: rgb(42, 47, 54);
color: #ccc;
border: 1px solid rgb(85, 94, 107);;
}

.p-Menu-item.p-mod-active {
Expand Down
35 changes: 18 additions & 17 deletions packages/perspective-workspace/src/less/tabbar.less
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,21 @@
pointer-events: all;
}



.p-mod-current {
.p-TabBar-tabConfigIcon, .p-TabBar-tabCloseIcon {
color: #999;
color: #CCC;
transition: color 0.2s ease-out;
}
.p-TabBar-tabConfigIcon:hover, .p-TabBar-tabCloseIcon:hover {
color: #1a7da1;
transition: color 0.2s ease-out;
}
}

.p-BoxPanel {
overflow: scroll !important;
}


.p-TabBar,
.p-TabBar-tab {
position: relative;
Expand All @@ -70,11 +72,11 @@


.divider {
left: 12px;
left: 14px;
bottom: 0;
position: absolute;
// background: #ccc;
right: 12px;
right: 14px;
display: none;
transition: background-color 0.2s ease-out, width 0.2s ease-out;

Expand Down Expand Up @@ -181,8 +183,8 @@
height: 1px;
background-color: @blue800;
margin-bottom: 0px;
left: 18px;
right: 18px;
left: 10px;
right: 10px;
}
&:last-child:first-child .divider {
background: none;
Expand Down Expand Up @@ -225,6 +227,10 @@
}

.p-TabBar-content > .p-TabBar-tab {
color: #CCC;
}

.p-TabBar-content > .p-TabBar-tab .p-TabBar-tabLabel {
color: #666;
}

Expand All @@ -236,11 +242,6 @@
color: #666;
}

.p-TabBar-content > .p-TabBar-tab:hover {
color: #666;
transition: none;
}

.p-TabBar-tab.p-mod-current .p-TabBar-tabLabel {
white-space: nowrap !important;
}
Expand Down Expand Up @@ -294,12 +295,12 @@
background-color: #ccc;
}


.p-PerspectiveWorkspace.p-ContextMenu * .p-TabBar.p-ContextFocus{
opacity: 1
opacity: 1;
}

.p-PerspectiveWorkspace.p-ContextMenu * .p-TabBar{
opacity: 0.2
.p-PerspectiveWorkspace.p-ContextMenu * .p-TabBar {
opacity: 0.2;
transition: opacity 0.2s ease-out;
}

3 changes: 2 additions & 1 deletion packages/perspective-workspace/src/less/viewer.less
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ perspective-viewer.p-Blur{
opacity: 1;
}

.p-ContextMenu > perspective-viewer{
.p-ContextMenu > perspective-viewer {
opacity: 0.2;
}

Expand All @@ -56,4 +56,5 @@ perspective-viewer {
bottom: 0px;
overflow: visible !important;
font-family: "Open Sans", Arial, sans-serif;
transition: opacity 0.2s ease-out;
}
2 changes: 1 addition & 1 deletion packages/perspective-workspace/src/less/widget.less
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
--settings-button--content: var(--close-settings-button--content, "\1F527");
}

.p-Detail{
.p-Detail{
min-width: 300px;
min-height: 200px;
--settings-button--content: "";
Expand Down
4 changes: 4 additions & 0 deletions packages/perspective-workspace/src/less/workspace.less
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
background-color: var(--master-divider--background-color);
}

.p-MasterPanel {
background-color: rgb(47, 49, 54);
}

.p-PerspectiveWorkspace.p-ContextMenu * .p-SplitPanel-handle{
opacity: 0.2;
}
Expand Down
6 changes: 3 additions & 3 deletions packages/perspective-workspace/test/results/linux.docker.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"index.html/restore workspace with detail only": "1c987bacb119a69dac2a28d05b31c14a",
"index.html/restore workspace with detail only": "944c3f5c4d8303e3d5c667f463709759",
"index.html/restore workspace with master only": "13ff739449bf9745d43f9af8bfc67c7c",
"index.html/restore workspace with master and detail": "81da893304844b2b3c2459b80d428e13",
"__GIT_COMMIT__": "d12b1d620a3be9dbd9e244989d011a515e1ac9d5"
"index.html/restore workspace with master and detail": "1ec20152c45e0fd7188996f74faac623",
"__GIT_COMMIT__": "c35440b76de956bd7a0a12fa5ee10f82f6ca07a3"
}