Skip to content

refactor(nsgotest): own mounted styles and animation values - #1880

Merged
houko merged 2 commits into
nsgo-dev:mainfrom
houko:refactor/view-style-181
Nov 23, 2026
Merged

houko merged 2 commits into
nsgo-dev:mainfrom
houko:refactor/view-style-181

Conversation

@houko

@houko houko commented Nov 22, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Give mounted test views owned nsgotest.ViewStyle and nsgotest.AnimatedValues records. Explicit boundary mappings handle incoming styles, animator callbacks and App.Animated; Radii, Rounded, Rim, Matrix, Has and Apply delegate to the existing geometry and animation policies. Effects and custom cursors keep their immutable app-value identities and styles remain comparable.

Remove ViewStyle and AnimatedValues from the public driver API allowlist. Migrate the gallery's appearance snapshots and the dialog test helper to the public record and update testing architecture, English/Chinese guides, skill and changelog. This is an independent slice against main with no PR dependency.

Refs #181. Event kinds/masks await the owned Event and ViewProps contracts separately.

Targets

  • Shared code

Screenshots

None.

Verification

  • go tool nsgo test ./nsgotest -- -p 1 -count=1: 161 passed, one skipped, including three new regressions for real mount snapshots/resource identity, geometry policies, bound-value application and live animator recording.
  • Public API guard, all 26 layering variants and skill checks passed.
  • go tool nsgo test ./ui -- -p 1 -count=1: 231 passed.
  • go tool nsgo test ./examples/gallery -- -p 1 -run '^TestAppearanceRestylesInPlace$' -count=1: passed across all demos.
  • All verification above ran on the remote Mac builder with Go 1.27.3.
  • go tool nsgo check -target macos,ios,windows,linux,android_arm64,web -jobs 1 passed remotely, including both desktop architectures, iOS and Android arm64.
  • git diff --check passed.

Checklist

  • Conventional Commit title
  • Public guides, skill, architecture and changelog updated

@houko

houko commented Nov 22, 2026

Copy link
Copy Markdown
Collaborator Author

Reviewed. Both mappings cover every driver field (31 style fields, 16 animated-value fields) in both directions, and the policies still go through the driver implementations. This conflicts with #1873 on the ItemCreate line in model.go, so whichever lands second needs a rebase.

@houko
houko enabled auto-merge (rebase) November 22, 2026 04:21
@github-actions github-actions Bot added the conflict Conflicts with the base branch; resolve it first label Nov 22, 2026
@houko
houko force-pushed the refactor/view-style-181 branch from a063faa to ed60e06 Compare November 22, 2026 04:34
@github-actions github-actions Bot removed the conflict Conflicts with the base branch; resolve it first label Nov 22, 2026
@houko
houko force-pushed the refactor/view-style-181 branch 2 times, most recently from dc77880 to 495ce4b Compare November 22, 2026 08:56
@houko
houko added this pull request to the merge queue Nov 22, 2026
@houko
houko force-pushed the refactor/view-style-181 branch from 495ce4b to 852399f Compare November 22, 2026 09:40
@houko
houko force-pushed the refactor/view-style-181 branch from 852399f to 6872a57 Compare November 23, 2026 00:22
@houko
houko merged commit e1758a9 into nsgo-dev:main Nov 23, 2026
17 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/M ui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant