Skip to content

Commit 5af4b4b

Browse files
committed
Style datagrid rows full width of the container
1 parent 9832438 commit 5af4b4b

File tree

7 files changed

+55
-13
lines changed

7 files changed

+55
-13
lines changed

examples/blocks/src/file/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<form class="my-form">
2020
<p>Upload a CSV/Arrow file by dragging from your desktop and dropping onto the dashed region.</p>
2121
<p>(Data is processed in browser, and never sent to any server).</p>
22-
<input type="file" id="fileElem" multiple accept=".feather .arrow .csv" />
22+
<input type="file" id="fileElem" multiple accept=".feather,.arrow,.csv" />
2323
<label class="button" for="fileElem">Select a file</label>
2424
</form>
2525
</div>

packages/perspective-viewer-datagrid/src/less/pro.less

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,19 @@ perspective-viewer-datagrid:not(.sub-cell-scroll-disabled) regular-table table {
7070
200% var(--regular-table--clip-y, 0)
7171
);
7272
}
73+
74+
thead tr:last-child:after {
75+
transform: translate(var(--regular-table--transform-x, 0px));
76+
}
77+
78+
tbody tr:not(:first-child):after {
79+
transform: translate(var(--regular-table--transform-x, 0px));
80+
}
7381
}
7482

7583
regular-table {
7684
font-family: inherit;
85+
--rt-hover--border-color: #c5c9d080;
7786

7887
div[tabindex] {
7988
outline: none;
@@ -175,7 +184,6 @@ regular-table {
175184

176185
table {
177186
position: absolute;
178-
overflow: hidden;
179187
color: #666;
180188
outline: none;
181189
}

packages/perspective-viewer-datagrid/src/less/regular_table.less

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,36 @@ regular-table table {
258258
}
259259
}
260260

261+
regular-table table thead tr:last-child:after {
262+
width: 10000px;
263+
box-sizing: border-box;
264+
display: block;
265+
height: 23px;
266+
content: " ";
267+
border-bottom: 1px solid var(--inactive--border-color);
268+
}
269+
270+
regular-table table tbody tr:after {
271+
width: 10000px;
272+
box-sizing: border-box;
273+
display: block;
274+
height: 23px;
275+
content: " ";
276+
border-top: 1px solid transparent;
277+
}
278+
279+
regular-table table tbody tr:not(:first-child):after {
280+
border-top: 1px solid var(--inactive--border-color);
281+
}
282+
283+
regular-table table tbody tr:hover:not(:first-child):after {
284+
border-top: 1px solid var(--rt-hover--border-color);
285+
}
286+
287+
regular-table table tbody tr:hover + tr:after {
288+
border-top: 1px solid var(--rt-hover--border-color);
289+
}
290+
261291
@keyframes pulse_pos {
262292
0% {
263293
background-color: var(

packages/perspective-viewer-datagrid/src/less/row-hover.less

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ regular-table {
1616
th.psp-tree-leaf:not(.psp-row-selected):not(.psp-row-subselected),
1717
tr:hover
1818
th.psp-tree-label:not(.psp-row-selected):not(.psp-row-subselected),
19-
tr:hover td:not(.psp-row-selected):not(.psp-row-subselected) {
19+
tr:hover td:not(.psp-row-selected):not(.psp-row-subselected),
20+
tr:hover:after {
2021
border-color: var(--rt-hover--border-color, #c5c9d080) !important;
2122
background-color: transparent;
2223
box-shadow: // 0px -2px 0px rgba(0,0,0,0.05),
@@ -46,7 +47,7 @@ regular-table {
4647

4748
th:last-child,
4849
td:last-child {
49-
border-right-width: 1px;
50+
border-right-width: 0px;
5051
border-right-color: transparent;
5152
}
5253
}

rust/perspective-viewer/Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/perspective-viewer/src/themes/pro-dark.less

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,7 @@ perspective-string-column-style[theme="Pro Dark"] {
125125

126126
table tbody tr {
127127

128-
td,
129-
th {
130128
--rt-hover--border-color: #61656e;
131-
border-top-color: #3b3f46;
132-
}
133129
}
134130
}
135131

tools/perspective-scripts/publish.mjs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,21 @@ async function download_release_assets(releases) {
6464
async function publish_release_assets(releases) {
6565
if (process.env.COMMIT) {
6666
for (const release of releases) {
67-
if (release.name.endsWith("whl")) {
67+
if (
68+
(release.name.endsWith("whl") ||
69+
release.name.endsWith("tar.gz")) &&
70+
release.name.indexOf("wasm") === -1
71+
) {
6872
sh`twine upload ${release.name}`.runSync();
69-
} else {
73+
} else if (release.name.endsWith(".tgz")) {
7074
sh`npm publish ${release.name}`.runSync();
7175
}
7276
}
7377

74-
sh`cargo publish`.cwd("rust/perspective-viewer").runSync();
78+
// `node_modules` is considered dirty and we've already checked git status below.
79+
sh`cargo publish --allow-dirty`
80+
.cwd("rust/perspective-viewer")
81+
.runSync();
7582
} else {
7683
console.warn(`COMMIT not specified, aborting`);
7784
}

0 commit comments

Comments
 (0)