Add F9/F10 screenshots, fix duplicate widget ID in motor screen
Generate motor.svg and survey.svg for the new TUI screens. Fix MotorScreen bug: two Horizontal widgets shared id="motor-usals-inputs", causing MountError. Replaced with classes="usals-input-row" since both rows need the same styling. Regenerated all 13 screenshots.
This commit is contained in:
parent
cc3a0707a1
commit
592898dd7a
16 changed files with 3121 additions and 1545 deletions
|
|
@ -5,7 +5,7 @@ Uses Textual's headless run_test() + Pilot API to programmatically navigate
|
|||
each screen and export SVG renders. Requires no hardware — runs entirely
|
||||
with DemoDevice synthetic signal data.
|
||||
|
||||
Output: ../site/src/assets/tui/*.svg (11 screenshots)
|
||||
Output: ../site/src/assets/tui/*.svg (13 screenshots)
|
||||
|
||||
Usage:
|
||||
cd tui && uv run python scripts/generate_screenshots.py
|
||||
|
|
@ -122,6 +122,42 @@ async def capture_config_screen() -> None:
|
|||
_save(svg, "config")
|
||||
|
||||
|
||||
async def capture_motor_screen() -> None:
|
||||
"""Capture F9 Motor screen — 3-column layout with signal gauge."""
|
||||
app = _new_app(show_splash=False)
|
||||
|
||||
async with app.run_test(size=TERM_SIZE, headless=True) as pilot:
|
||||
await pilot.pause(MOUNT_PAUSE)
|
||||
|
||||
# Switch to Motor screen
|
||||
await pilot.press("f9")
|
||||
await pilot.pause(MODE_SWITCH_PAUSE)
|
||||
|
||||
# Wait for signal gauge to populate
|
||||
await pilot.pause(1.0)
|
||||
|
||||
svg = app.export_screenshot(title="SkyWalker-1 — Motor Control")
|
||||
_save(svg, "motor")
|
||||
|
||||
|
||||
async def capture_survey_screen() -> None:
|
||||
"""Capture F10 Survey screen — Full Band tab with spectrum plot."""
|
||||
app = _new_app(show_splash=False)
|
||||
|
||||
async with app.run_test(size=TERM_SIZE, headless=True) as pilot:
|
||||
await pilot.pause(MOUNT_PAUSE)
|
||||
|
||||
# Switch to Survey screen (Full Band tab is default)
|
||||
await pilot.press("f10")
|
||||
await pilot.pause(MODE_SWITCH_PAUSE)
|
||||
|
||||
# Wait for demo spectrum data to render
|
||||
await pilot.pause(1.5)
|
||||
|
||||
svg = app.export_screenshot(title="SkyWalker-1 — Carrier Survey")
|
||||
_save(svg, "survey")
|
||||
|
||||
|
||||
async def capture_dark_mode() -> None:
|
||||
"""Capture dark-mode toggle with Star Wars notification toast."""
|
||||
app = _new_app(show_splash=False)
|
||||
|
|
@ -182,6 +218,8 @@ async def main() -> None:
|
|||
("Device screen (F6)", capture_device_screen),
|
||||
("Stream screen (F7)", capture_stream_screen),
|
||||
("Config screen (F8)", capture_config_screen),
|
||||
("Motor screen (F9)", capture_motor_screen),
|
||||
("Survey screen (F10)", capture_survey_screen),
|
||||
("Dark mode toggle", capture_dark_mode),
|
||||
("Splash screen", capture_splash),
|
||||
("Star Wars easter egg", capture_starwars),
|
||||
|
|
|
|||
|
|
@ -91,15 +91,15 @@ class MotorScreen(Container):
|
|||
border: round #1a3050;
|
||||
margin: 0 1 0 0;
|
||||
}
|
||||
MotorScreen #motor-usals-inputs {
|
||||
MotorScreen .usals-input-row {
|
||||
height: auto;
|
||||
}
|
||||
MotorScreen #motor-usals-inputs Label {
|
||||
MotorScreen .usals-input-row Label {
|
||||
color: #506878;
|
||||
width: auto;
|
||||
margin: 0 1 0 0;
|
||||
}
|
||||
MotorScreen #motor-usals-inputs Input {
|
||||
MotorScreen .usals-input-row Input {
|
||||
width: 12;
|
||||
margin: 0 1;
|
||||
}
|
||||
|
|
@ -172,10 +172,10 @@ class MotorScreen(Container):
|
|||
with Vertical(classes="motor-col"):
|
||||
with Vertical(classes="motor-panel"):
|
||||
yield Label("USALS GotoX", classes="motor-panel-title")
|
||||
with Horizontal(id="motor-usals-inputs"):
|
||||
with Horizontal(classes="usals-input-row"):
|
||||
yield Label("Observer Lon:")
|
||||
yield Input("-97.5", id="usals-obs-lon")
|
||||
with Horizontal(id="motor-usals-inputs"):
|
||||
with Horizontal(classes="usals-input-row"):
|
||||
yield Label("Satellite Lon:")
|
||||
yield Input("25.9", id="usals-sat-lon")
|
||||
yield Button("Calculate & Go", id="usals-go", variant="success")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue