Add TUI documentation for F6-F8 screens and regenerate screenshots
Update tui.mdx with Device, Stream, and Config screen sections including keyboard shortcuts, Tabs/Steps components, and safety warnings. Update generate_screenshots.py to capture all 11 screens. Regenerate all SVGs with current sidebar layout.
This commit is contained in:
parent
567bf4d9e0
commit
0f4ba4766f
13 changed files with 2040 additions and 2939 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 (8 screenshots)
|
||||
Output: ../site/src/assets/tui/*.svg (11 screenshots)
|
||||
|
||||
Usage:
|
||||
cd tui && uv run python scripts/generate_screenshots.py
|
||||
|
|
@ -46,7 +46,7 @@ def _save(svg: str, name: str) -> None:
|
|||
|
||||
|
||||
async def capture_mode_screens() -> None:
|
||||
"""Capture F1-F5 mode screens."""
|
||||
"""Capture F1-F5 RF mode screens."""
|
||||
app = _new_app(show_splash=False)
|
||||
|
||||
async with app.run_test(size=TERM_SIZE, headless=True) as pilot:
|
||||
|
|
@ -67,6 +67,61 @@ async def capture_mode_screens() -> None:
|
|||
_save(svg, filename)
|
||||
|
||||
|
||||
async def capture_device_screen() -> None:
|
||||
"""Capture F6 Device screen — show EEPROM tab with hex dump."""
|
||||
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 Device screen
|
||||
await pilot.press("f6")
|
||||
await pilot.pause(MODE_SWITCH_PAUSE)
|
||||
|
||||
# Wait for identity info to populate
|
||||
await pilot.pause(1.0)
|
||||
|
||||
# Capture Firmware tab (default)
|
||||
svg = app.export_screenshot(title="SkyWalker-1 — Device")
|
||||
_save(svg, "device")
|
||||
|
||||
|
||||
async def capture_stream_screen() -> None:
|
||||
"""Capture F7 Stream screen — needs time for TS packets to accumulate."""
|
||||
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 Stream screen (auto-starts in demo mode)
|
||||
await pilot.press("f7")
|
||||
await pilot.pause(MODE_SWITCH_PAUSE)
|
||||
|
||||
# Wait for PID stats and PSI tree to populate
|
||||
await pilot.pause(2.0)
|
||||
|
||||
svg = app.export_screenshot(title="SkyWalker-1 — Stream")
|
||||
_save(svg, "stream")
|
||||
|
||||
|
||||
async def capture_config_screen() -> None:
|
||||
"""Capture F8 Config screen."""
|
||||
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 Config screen
|
||||
await pilot.press("f8")
|
||||
await pilot.pause(MODE_SWITCH_PAUSE)
|
||||
|
||||
# Wait for config status to load
|
||||
await pilot.pause(0.5)
|
||||
|
||||
svg = app.export_screenshot(title="SkyWalker-1 — Config")
|
||||
_save(svg, "config")
|
||||
|
||||
|
||||
async def capture_dark_mode() -> None:
|
||||
"""Capture dark-mode toggle with Star Wars notification toast."""
|
||||
app = _new_app(show_splash=False)
|
||||
|
|
@ -124,6 +179,9 @@ async def main() -> None:
|
|||
|
||||
captures = [
|
||||
("Mode screens (F1-F5)", capture_mode_screens),
|
||||
("Device screen (F6)", capture_device_screen),
|
||||
("Stream screen (F7)", capture_stream_screen),
|
||||
("Config screen (F8)", capture_config_screen),
|
||||
("Dark mode toggle", capture_dark_mode),
|
||||
("Splash screen", capture_splash),
|
||||
("Star Wars easter egg", capture_starwars),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue