Skip to content

feat(dev): preview Go component fixtures - #1643

Merged
houko merged 2 commits into
mainfrom
feat/component-previews-659
Nov 21, 2026
Merged

houko merged 2 commits into
mainfrom
feat/component-previews-659

Conversation

@houko

@houko houko commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Add nsgo dev -preview to show Go PreviewXxx fixtures in an importable package with the app's translation catalogs, theme, and resources.
  • Rebuild the generated host when its sources change. Preserve the selected fixtures, locale, theme, appearance, viewport size, and direction when it reloads.
  • Use the nsgopreview build tag for fixtures. Tagged screenshot tests can use the same functions as their roots.

Verification

  • Rebased onto de61b9fa5, retaining the Android class watcher and macOS development window-frame settings.
  • go tool nsgo check -target linux_x64,web -jobs 2, six focused CLI tests, and the NSGo skill test passed.
  • A native Linux preview under Xvfb rendered the app's English catalog and theme. A malformed Go save left the last good app running. The next valid save rebuilt and displayed the edited fixture.
  • Chromium rendered both tagged fixtures. After selecting Simplified Chinese, the app theme, dark appearance, the 680 × 420 viewport and right-to-left direction, a Go save updated both fixtures and preserved those settings.
  • Ordinary Linux x64 and Web builds contained the production component and excluded both tagged fixture markers and the preview host. The check read the Linux executable and the Web release archive's WASM.

Closes #659

@github-actions github-actions Bot added documentation Improvements or additions to documentation cli size/L enhancement New feature or request labels Nov 21, 2026
@houko
houko force-pushed the feat/component-previews-659 branch from 6e3f456 to c4d13cc Compare November 21, 2026 12:21
@github-actions github-actions Bot added conflict Conflicts with the base branch; resolve it first labels Nov 21, 2026
@houko
houko force-pushed the feat/component-previews-659 branch 2 times, most recently from 852e661 to a1e1c56 Compare November 21, 2026 16:40
@github-actions github-actions Bot added conflict Conflicts with the base branch; resolve it first and removed conflict Conflicts with the base branch; resolve it first labels Nov 21, 2026
@houko
houko force-pushed the feat/component-previews-659 branch from a1e1c56 to 901dd68 Compare November 21, 2026 19:14
@houko
houko force-pushed the feat/component-previews-659 branch from 901dd68 to 037e715 Compare November 21, 2026 19:18
@houko
houko merged commit 0ce1c53 into main Nov 21, 2026
4 of 11 checks passed
@houko
houko deleted the feat/component-previews-659 branch November 21, 2026 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli conflict Conflicts with the base branch; resolve it first documentation Improvements or additions to documentation enhancement New feature or request size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Component previews in nsgo dev: show one component with fixture state, rebuilt on save, without restarting the app

1 participant