Skip to content

Commit 255b777

Browse files
committed
Add table to perspective_viewer::ViewerConfig, and modify load() to take a Client instead of a Table
Signed-off-by: Andrew Stein <[email protected]>
1 parent 7b9a7f0 commit 255b777

File tree

160 files changed

+5567
-4861
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

160 files changed

+5567
-4861
lines changed

rust/perspective-viewer/Cargo.toml

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ perspective-js = { version = "4.0.1" }
5454
# Provides async `Mutex` for locked sections such as `render`
5555
async-lock = "2.5.0"
5656

57-
# Encode persistence tokens
57+
# Encode HTML export
5858
base64 = "0.13.0"
5959

6060
# Timezone correction
@@ -66,53 +66,48 @@ derivative = "2.2.0"
6666
# Easy way to define & implement a singleton trait (type extension)
6767
extend = "1.1.2"
6868

69-
# Compress tokens
70-
flate2 = "1.0.20"
71-
7269
# General async tools
73-
futures = "0.3.28"
70+
futures = "0.3.31"
7471

7572
# General iterator improvements
7673
itertools = "0.10.1"
7774

78-
# Performance improvements for common string to JS conversions
79-
js-intern = "0.3.1"
80-
8175
# JavaScript stdlib bindings
82-
js-sys = "0.3.77"
76+
js-sys = "0.3.82"
77+
78+
macro_rules_attribute = "0.2.2"
8379

8480
# Parse ExprTK for syntax highlighting.
8581
nom = "7.1.1"
8682

87-
# MessagePack serialization
88-
rmp-serde = "1.3.0"
89-
9083
# Serialization for tokens and JS APIs
9184
serde = { version = "1.0", features = ["derive"] }
9285

93-
serde_bytes = "0.11"
94-
9586
# Support for "unknown"/dictionary types such as `plugin_config`
9687
serde_json = { version = "1.0.107", features = ["raw_value"] }
9788

9889
# Faster struct serialize/deserialize
9990
serde-wasm-bindgen = "0.6.0"
10091

92+
strum = { version = "0.26.1", features = ["derive"] }
93+
10194
thiserror = { version = "1.0.55" }
10295

10396
# specta = { version = "2.0.0-rc.9", features = ["typescript"] }
104-
ts-rs = { version = "11.0.1", features = [
97+
ts-rs = { version = "11.1.0", features = [
10598
"serde-json-impl",
10699
"no-serde-warnings",
107-
"import-esm",
108100
] }
109101

110102
# Async-aware logging that can be disabled at compile-time.
111103
tracing = { version = ">=0.1.36" }
112104
tracing-subscriber = "0.3.15"
113105

114106
# Browser API bindings
115-
wasm-bindgen = { version = "=0.2.100", features = ["serde-serialize"] }
107+
wasm-bindgen = { version = "=0.2.105", features = [
108+
"serde-serialize",
109+
"enable-interning",
110+
] }
116111

117112
# Pass perspective-js arguments to viewer
118113
wasm-bindgen-derive = "0.3.0"
@@ -121,7 +116,7 @@ wasm-bindgen-derive = "0.3.0"
121116
wasm-bindgen-futures = "0.4.41"
122117

123118
# Web framework
124-
yew = { version = "0.21.0", features = ["csr"] }
119+
yew = { version = "0.22.0", features = ["csr"] }
125120

126121
# Browser stdlib bindings
127122
web-sys.version = "0.3.77"
@@ -138,7 +133,6 @@ web-sys.features = [
138133
"CustomEvent",
139134
"CustomEventInit",
140135
"DataTransfer",
141-
"Document",
142136
"DomRect",
143137
"DomStringMap",
144138
"DomTokenList",
@@ -166,17 +160,11 @@ web-sys.features = [
166160
"Performance",
167161
"PerformanceMark",
168162
"Range",
169-
"ReadableStreamDefaultReader",
170163
"Selection",
171164
"ShadowRoot",
172165
"ShadowRootMode",
173166
"ShadowRootInit",
174-
"StyleSheet",
175167
"StyleSheetList",
176168
"Url",
177-
"VisibilityState",
178169
"Window",
179170
]
180-
181-
serde_with = { version = "3.6.1", features = ["indexmap_2"] }
182-
strum = { version = "0.26.1", features = ["derive"] }

rust/perspective-viewer/src/less/containers/scroll-panel.less

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
:host {
1414
.scroll-panel-container {
15-
will-change: transform;
1615
width: 100%;
1716
}
1817

rust/perspective-viewer/src/less/plugin-selector.less

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@
1919
}
2020

2121
#plugin_selector_container {
22-
min-height: 48px;
22+
min-height: var(
23+
--plugin-selector--height,
24+
var(--status-bar--height, 48px)
25+
);
2326
display: flex;
2427
white-space: nowrap;
2528
flex-direction: column;
@@ -36,7 +39,7 @@
3639
min-height: 2px;
3740
width: 100%;
3841
background-color: var(--inactive--color, #6e6e6e);
39-
margin-top: 1px;
42+
margin-top: 2px;
4043
}
4144

4245
.plugin-selector-options {
@@ -76,11 +79,18 @@
7679
.plugin-select-item {
7780
// width: 48px;
7881
padding-left: 9px;
79-
height: 48px;
80-
min-height: 48px;
82+
height: var(
83+
--plugin-selector--height,
84+
var(--status-bar--height, 48px)
85+
);
86+
min-height: var(
87+
--plugin-selector--height,
88+
var(--status-bar--height, 48px)
89+
);
8190
display: flex;
8291
align-items: center;
83-
border-bottom: 1px solid var(--inactive--color, #6e6e6e);
92+
border-bottom: 1px solid transparent;
93+
box-shadow: 0px 1px var(--inactive--color, #6e6e6e);
8494
cursor: pointer;
8595
}
8696

rust/perspective-viewer/src/less/status-bar.less

Lines changed: 67 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -11,48 +11,51 @@
1111
// ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
1212

1313
:host {
14-
#status_bar.titled {
15-
padding-right: 108px;
16-
17-
#menu-bar {
18-
opacity: 0.2;
19-
}
20-
}
21-
2214
// When settings open ...
2315
#main_column #status_bar,
2416
#main_column #status_bar.titled {
25-
padding-left: 0px;
26-
padding-right: 36px;
17+
// padding-right: 10px;
2718

2819
input::placeholder {
2920
color: var(--inactive--color);
3021
}
22+
}
3123

32-
#menu-bar {
33-
opacity: 1;
34-
}
24+
#status_bar.settings-closed {
25+
padding-right: 10px;
3526
}
3627

3728
#status_bar.updating {
3829
box-shadow: none;
3930
}
4031

32+
#status_bar.settings-closed.floating {
33+
position: absolute;
34+
padding: 0px;
35+
height: auto;
36+
min-height: auto;
37+
max-height: none;
38+
gap: 6px;
39+
top: calc((var(--status-bar--height, 48px) - 20px) / 2);
40+
right: calc(min(48px, (var(--status-bar--height, 48px) - 20px) / 2));
41+
}
42+
4143
#status_bar {
4244
box-shadow: 0 13px 0 -12px var(--inactive--border-color);
4345
z-index: 1;
44-
display: flex;
46+
display: var(--status-bar--display, flex);
47+
gap: 6px;
4548
align-items: center;
4649
background: var(--plugin--background);
47-
padding: 0;
48-
position: absolute;
49-
top: 0;
50-
left: 0;
51-
right: 0;
50+
padding: var(--status-bar--padding, 0 31px 0 8px);
51+
position: relative;
5252
height: var(--status-bar--height, 48px);
53+
min-height: var(--status-bar--height, 48px);
54+
max-height: var(--status-bar--height, 48px);
5355
border-radius: var(--status-bar--border-radius);
5456
#status-bar-placeholder {
5557
margin: 0px;
58+
margin-right: -5px;
5659
pointer-events: none;
5760
}
5861

@@ -69,9 +72,9 @@
6972
display: inline-block;
7073
align-items: center;
7174
position: relative;
72-
margin-top: 1px;
7375
min-width: 65px;
7476
overflow: hidden;
77+
padding-top: 0.5px;
7578

7679
&:after,
7780
input,
@@ -119,21 +122,31 @@
119122
.section {
120123
display: flex;
121124
align-items: center;
125+
pointer-events: none;
126+
}
127+
128+
.section > * {
129+
pointer-events: all;
122130
}
123131

124132
#spacer {
125133
flex: 1 1000 auto;
126134
}
127135

128136
span#rows {
137+
display: flex;
138+
align-items: flex-end;
139+
gap: 6px;
129140
flex: 0 1000 auto;
130141
overflow: hidden;
131-
margin: 0px 14px;
142+
margin: 0px 10px;
143+
pointer-events: none;
132144
span {
133145
margin: 0 !important;
134146
}
135147

136-
span {
148+
span.x,
149+
span.total {
137150
color: var(--inactive--color);
138151
}
139152
}
@@ -187,10 +200,12 @@
187200
background-repeat: no-repeat;
188201
background-color: var(--icon--color);
189202
content: "";
190-
-webkit-mask-size: cover;
191-
mask-size: cover;
203+
mask-size: contain;
204+
mask-repeat: no-repeat;
205+
mask-position: center;
192206
pointer-events: none;
193207
image-rendering: pixelated;
208+
margin: 0 5px;
194209
}
195210

196211
// span#status_updating
@@ -251,11 +266,35 @@
251266

252267
div#status_reconnect {
253268
z-index: 2;
254-
display: flex;
269+
display: var(--status-indicator--display, flex);
255270
align-items: center;
256-
border-radius: var(--status-bar--border-radius);
257-
height: var(--status-bar--height, 48px);
271+
border-radius: 3px;
272+
margin: 0;
273+
height: auto; //var(--status-bar--height, 48px);
274+
border: 1px solid var(--status-ok-icon--border-color, transparent);
275+
cursor: var(--status-ok-icon--cursor);
276+
pointer-events: var(--status-indicator--pointer-events, none);
277+
&:hover {
278+
background-color: var(
279+
--status-ok-icon--hover--background-color,
280+
transparent
281+
);
282+
border-color: var(
283+
--status-ok-icon--hover--border-color,
284+
transparent
285+
);
286+
span#status {
287+
background-color: var(
288+
--status-ok-icon--hover--color,
289+
var(--icon--color)
290+
);
291+
}
292+
// color: var(--status-ok-icon--hover--background-color);
293+
}
294+
258295
&.errored {
296+
pointer-events: all;
297+
display: flex;
259298
cursor: pointer;
260299
}
261300

@@ -269,9 +308,9 @@
269308
align-items: center;
270309
justify-content: center;
271310
height: 20px;
311+
height: 20px;
272312
border-radius: 10px;
273313
color: var(--plugin--background);
274-
height: 20px;
275314
// pointer-events: all;
276315
// mask-image: url(../svg/status_error.svg);
277316
// -webkit-mask-image: url(../svg/status_error.svg);

0 commit comments

Comments
 (0)