CyGuy8 Claude Fable 5 commited on
Commit
0e0e3fa
·
1 Parent(s): ab2d2fa

Budget table column widths for wide host fonts (no more "Con... Tra...")

Browse files

Gradio ellipsizes any header line that overflows its column, and the
Hugging Face Space renders the table in a wider monospace font than
local - "Contour Tracing" wrapped cleanly but each word was clipped.
Column widths now fit the longest header WORD in a wide monospace plus
the select-all checkbox (verified by injecting Courier New locally and
measuring every live header cell for overflow: none truncate), with the
roomy STL column trimmed so the table still fits a 1280px viewport
without horizontal scroll.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Files changed (1) hide show
  1. app.py +14 -11
app.py CHANGED
@@ -4587,22 +4587,25 @@ def build_dynamic_demo() -> gr.Blocks:
4587
  label="Shape Settings",
4588
  elem_id="shape-settings-table",
4589
  # Narrow fixed widths; two-word headers ("Pressure (psi)",
4590
- # "Contour Tracing", ...) wrap to two lines via CSS.
 
 
 
4591
  column_widths=[
4592
- "52px", # Shape
4593
- "170px", # STL
4594
  "62px", # X (mm)
4595
  "62px", # Y (mm)
4596
  "62px", # Z (mm)
4597
- "86px", # Pressure (psi)
4598
- "56px", # Valve
4599
- "60px", # Nozzle
4600
- "52px", # Port
4601
  "104px", # Color
4602
- "62px", # Infill %
4603
- "86px", # Contour Tracing
4604
- "58px", # Lead In
4605
- "60px", # Delete
4606
  ],
4607
  )
4608
  with gr.Row():
 
4587
  label="Shape Settings",
4588
  elem_id="shape-settings-table",
4589
  # Narrow fixed widths; two-word headers ("Pressure (psi)",
4590
+ # "Contour Tracing", ...) wrap to two lines via CSS. Each
4591
+ # column must fit its longest WORD in the widest host font
4592
+ # (the Space renders a wide monospace) plus the header
4593
+ # checkbox — too narrow and Gradio ellipsizes ("Con...").
4594
  column_widths=[
4595
+ "64px", # Shape
4596
+ "154px", # STL
4597
  "62px", # X (mm)
4598
  "62px", # Y (mm)
4599
  "62px", # Z (mm)
4600
+ "92px", # Pressure (psi)
4601
+ "62px", # Valve
4602
+ "68px", # Nozzle
4603
+ "58px", # Port
4604
  "104px", # Color
4605
+ "72px", # Infill %
4606
+ "112px", # Contour Tracing
4607
+ "80px", # Lead In
4608
+ "68px", # Delete
4609
  ],
4610
  )
4611
  with gr.Row():