Skip to content

Commit

Permalink
fix some viewer bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
ada-x64 committed Sep 28, 2023
1 parent afa7438 commit 796c0f3
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 12 deletions.
23 changes: 13 additions & 10 deletions packages/perspective-viewer-datagrid/src/js/plugin/activate.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,17 +160,20 @@ export async function activate(view) {
viewer.addEventListener(
"perspective-toggle-column-settings",
(event) => {
style_selected_column(
this.regular_table,
event.detail.column_name
);
if (!event.detail.open) {
this.model._column_settings_selected_column = null;
return;
// NOTE: This is a hack. We'll need to implement a `deactivate` function on the API to properly remove this eventlistener.
if (this.isConnected) {
style_selected_column(
this.regular_table,
event.detail.column_name
);
if (!event.detail.open) {
this.model._column_settings_selected_column = null;
return;
}

this.model._column_settings_selected_column =
event.detail.column_name;
}

this.model._column_settings_selected_column =
event.detail.column_name;
}
);

Expand Down
5 changes: 3 additions & 2 deletions rust/perspective-viewer/src/less/containers/split-panel.less
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

:host {
.split-panel.orient-reverse > .split-panel-child:not(:last-child):not(.is-width-override) {
.split-panel.orient-reverse
> .split-panel-child:not(:last-child):not(.is-width-override) {
max-width: 300px;
}

Expand Down Expand Up @@ -52,7 +53,7 @@
.split-panel-divider {
flex: 0 0 6px;
transition: background-color 0.2s ease-out;
z-index: 2;
z-index: var(--settings-panel-z-index);

&:hover {
background-color: rgba(0, 0, 0, 0.05);
Expand Down
7 changes: 7 additions & 0 deletions rust/perspective-viewer/src/less/viewer.less
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
// ┃ of the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0). ┃
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

:host {
--settings-panel-z-index: 10;
}

:host .sidebar_close_button {
position: absolute;
top: 0;
Expand Down Expand Up @@ -132,6 +136,7 @@
padding-left: 8px;
box-sizing: border-box;
width: 100%;
z-index: var(--settings-panel-z-index);

& > .split-panel-child {
overflow: hidden;
Expand Down Expand Up @@ -301,6 +306,8 @@
width: 100%;
background-color: var(--inactive--color, #6e6e6e);
margin-top: 1px;
flex-shrink: 0;
flex-grow: 0;
}

.expr_editor_column,
Expand Down

0 comments on commit 796c0f3

Please sign in to comment.