Skip to content

Refactor v0.8 Angular renderer into versioned directory#876

Merged
gspencergoog merged 13 commits intogoogle:mainfrom
gspencergoog:move_angular_v0_8
Mar 17, 2026
Merged

Refactor v0.8 Angular renderer into versioned directory#876
gspencergoog merged 13 commits intogoogle:mainfrom
gspencergoog:move_angular_v0_8

Conversation

@gspencergoog
Copy link
Collaborator

Description

This PR refactors the existing Angular v0.8 renderer files into a versioned subdirectory (v0_8/) and creates a secondary entry point.

Changes

  • renderers/angular/v0_8/: Moved existing library components and core renderer source code into versioned node.
  • renderers/angular/v0_8/ng-package.json: Added configuration for compiled subpath exports (@a2ui/angular/v0_8).
  • renderers/angular/src/public-api.ts: Re-routed base client index imports to look up from v0_8 implicitly, preserving default component backward compatibility.

Impact & Risks

  • Backward Compatible: Existing client apps importing @a2ui/angular directly will continue to use v0.8.
  • No Breaking Changes to components, simply organization refactors.

Testing

  1. Verify @a2ui/angular build compiles accurately with the new modular entry point layouts (dist/v0_8).
  2. Verify existing test assertions are unaffected for v0.8.

gemini-code-assist[bot]

This comment was marked as resolved.

gemini-code-assist[bot]

This comment was marked as resolved.

@gspencergoog
Copy link
Collaborator Author

@gemini-code-assist[bot] The perceived downgrade of @a2ui/web_core from 0.9.0 to 0.8.7 in the lockfile is a correction of a desynchronization found in the main branch. While main's sample lockfile incorrectly listed 0.9.0, the actual source package.json for web_core in main (and this branch) is 0.8.7. In this move_angular_v0_8 branch, we are intentionally maintaining parity with the local 0.8.7 source to ensure consistency across the renderer and samples for the v0.8 implementation. All lockfiles in this branch have been verified and synchronized to 0.8.7 via npm install.

@gemini-code-assist
Copy link
Contributor

Thank you for the further clarification. It's good to know that the version change to 0.8.7 is a corrective measure to address a desynchronization in the main branch and ensures consistency with the local web_core source for the v0.8 implementation. The verification and synchronization of all lockfiles is also a positive step.

@google google deleted a comment from gemini-code-assist bot Mar 17, 2026
- Centralized all v0.8 types in `angular/src/v0_8/types.ts`.
- Standardized component types to use the `...Node` suffix.
- Updated all internal v0.8 files to import types from the local `types.ts`.
- Fixed `Theme` service to use explicit `WebCore.Theme` properties.
- Corrected style assignment in `Text` component for union types.
- Fixed `MarkdownRenderer` provider.
- Corrected `Checkbox` component action handling.
- Fixed `$schema` path in `ng-package.json`.
- Verified changes with a successful library build.
Copy link
Collaborator

@jacobsimionato jacobsimionato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't feel super strongly, but Lit and web_core branch the versions below the src/ folder, rather than above, e.g. https://github.com/google/A2UI/tree/main/renderers/lit/src/0.8 or https://github.com/google/A2UI/tree/main/renderers/web_core/src/v0_8 .

Should we follow that pattern? e.g. renderers/angular/src/v0_8 ?

Updated @a2ui/angular renderer v0.8 to provide the expected interfaces and exports for the contact sample project, enabling it to build without modifying sample code.

- Renamed SurfaceHost component to Surface.
- Added DEFAULT_CATALOG with standard component registration.
- Enhanced MessageProcessor with events Subject, dispatch(), and clearSurfaces().
- Updated provideA2UI and provideMarkdownRenderer to match sample usage.
- Exported missing types like A2AServerPayload and Surface.
The symlink samples/client/angular/projects/lib/v0_8 was redundant because the build system already finds the correct sources through the src symlink. Removing it restores more of the sample's original state.
@@ -0,0 +1 @@
src/v0_8 No newline at end of file
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to have an entrypoint in the package.json of the angular renderer to explicitly create a module entrypoint into the v0_8 directory, instead of relying on paths? (that way it could potentially be moved around later, I think?)

We can probably add this later if we need it, though!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My plan was to have two ways to import this: the default way (@a2ui/angular), and a versioned way (@a2ui/angular/v0_8). In that way, once we have v0.9 up and in use, we can switch the default to 0.9 and someone who wants to stay on 0.8 after that point can still import the 0.8 import.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But maybe you have a better way to do this than I know about. This is the way I know about. :-)

…lity

Reverted the v0_8 Catalog from a Class to an interface to align with its layout on main. Updated Renderer lookup procedures using indexable direct matching so that custom configuration object literal spreads and custom mapping bindings in legacy samples (like rizzcharts) are supported natively without static type assertions. Verified cleanliness on locally compiled app samples.
@gspencergoog gspencergoog merged commit 24d3b8c into google:main Mar 17, 2026
11 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in A2UI Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants