Spaces:
Sleeping
Sleeping
Commit ·
72d384f
1
Parent(s): 3e74716
Cap the .abv1 import drop zone (was rendering a screen-filling arrow)
Browse filesGradio v6's gr.File defaults to a SVG arrow that scales to fill its
parent — and the parent had no height cap inside an Accordion, so it
swallowed the whole viewport below the import row.
* gr.File now passes height=120 + elem_classes=['dc-import-file']
* CSS constrains the drop zone to max-height 140px and the inner SVG
to 28x28 so it reads as a small hint rather than a poster.
app.py
CHANGED
|
@@ -2238,6 +2238,8 @@ def build_ui() -> gr.Blocks:
|
|
| 2238 |
label="Drop or browse for a .abv1 bundle",
|
| 2239 |
file_types=[".abv1", ".zip"],
|
| 2240 |
type="filepath",
|
|
|
|
|
|
|
| 2241 |
)
|
| 2242 |
import_status = gr.Markdown("")
|
| 2243 |
# 6-up metric tile grid: BPM / KEY / LUFS / TRUE PK / LRA / LENGTH.
|
|
|
|
| 2238 |
label="Drop or browse for a .abv1 bundle",
|
| 2239 |
file_types=[".abv1", ".zip"],
|
| 2240 |
type="filepath",
|
| 2241 |
+
height=120,
|
| 2242 |
+
elem_classes=["dc-import-file"],
|
| 2243 |
)
|
| 2244 |
import_status = gr.Markdown("")
|
| 2245 |
# 6-up metric tile grid: BPM / KEY / LUFS / TRUE PK / LRA / LENGTH.
|
theme.py
CHANGED
|
@@ -1350,6 +1350,27 @@ span.has-info {
|
|
| 1350 |
color: var(--coralb) !important;
|
| 1351 |
}
|
| 1352 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1353 |
/* ---- Tab strip — flat, centered, cap-styled section index. Reads as
|
| 1354 |
a navigation header rather than a button row. */
|
| 1355 |
.tab-nav, .tabs > .tab-nav, [class*="tab-nav"] {
|
|
|
|
| 1350 |
color: var(--coralb) !important;
|
| 1351 |
}
|
| 1352 |
|
| 1353 |
+
/* ---- File-upload zones — Gradio v6 fills the drop area with a huge
|
| 1354 |
+
SVG arrow that swallows the entire viewport when the parent has
|
| 1355 |
+
no height cap. Constrain to a sensible 120px row + size the icon
|
| 1356 |
+
down to ~28px so it reads as a hint, not a poster. */
|
| 1357 |
+
.dc-import-file, .dc-import-file > div,
|
| 1358 |
+
.dc-import-file .file-preview,
|
| 1359 |
+
.dc-import-file [class*="upload-container"],
|
| 1360 |
+
.dc-import-file .upload-button,
|
| 1361 |
+
.dc-import-file .file-wrap {
|
| 1362 |
+
min-height: 0 !important;
|
| 1363 |
+
max-height: 140px !important;
|
| 1364 |
+
overflow: hidden !important;
|
| 1365 |
+
}
|
| 1366 |
+
.dc-import-file svg,
|
| 1367 |
+
.dc-import-file [class*="upload-container"] svg {
|
| 1368 |
+
width: 28px !important;
|
| 1369 |
+
height: 28px !important;
|
| 1370 |
+
max-width: 28px !important;
|
| 1371 |
+
max-height: 28px !important;
|
| 1372 |
+
}
|
| 1373 |
+
|
| 1374 |
/* ---- Tab strip — flat, centered, cap-styled section index. Reads as
|
| 1375 |
a navigation header rather than a button row. */
|
| 1376 |
.tab-nav, .tabs > .tab-nav, [class*="tab-nav"] {
|