Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions .github/workflows/gallery_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Gallery build

on:
push:
paths:
- 'tools/gallery/**'
- 'renderers/angular/**'
- 'renderers/lit/**'
- '.github/workflows/gallery_build.yml'
pull_request:
paths:
- 'tools/gallery/**'
- 'renderers/angular/**'
- 'renderers/lit/**'
- '.github/workflows/gallery_build.yml'

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install lit renderer deps
working-directory: ./renderers/lit
run: npm ci

- name: Build lit renderer
working-directory: ./renderers/lit
run: npm run build

- name: Install angular renderer deps
working-directory: ./renderers/angular
run: npm ci

- name: Build angular renderer
working-directory: ./renderers/angular
run: npm run build

- name: Install gallery deps
working-directory: ./tools/gallery
run: npm install

- name: Build gallery
working-directory: ./tools/gallery
run: npm run build
79 changes: 0 additions & 79 deletions samples/client/angular/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -271,85 +271,6 @@
}
}
},
"gallery": {
"projectType": "application",
"schematics": { },
"root": "projects/gallery",
"sourceRoot": "projects/gallery/src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular/build:application",
"options": {
"browser": "projects/gallery/src/main.ts",
"tsConfig": "projects/gallery/tsconfig.app.json",
"preserveSymlinks": true,
"assets": [
{
"glob": "**/*",
"input": "projects/gallery/public"
}
],
"styles": [
"projects/gallery/src/styles.css"
]
},
"configurations": {
"production": {
"budgets": [
{
"type": "initial",
"maximumWarning": "500kB",
"maximumError": "1MB"
},
{
"type": "anyComponentStyle",
"maximumWarning": "4kB",
"maximumError": "8kB"
}
],
"outputHashing": "all"
},
"development": {
"optimization": false,
"extractLicenses": false,
"sourceMap": true
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular/build:dev-server",
"configurations": {
"production": {
"buildTarget": "gallery:build:production"
},
"development": {
"buildTarget": "gallery:build:development"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular/build:extract-i18n"
},
"test": {
"builder": "@angular/build:karma",
"options": {
"tsConfig": "projects/gallery/tsconfig.spec.json",
"assets": [
{
"glob": "**/*",
"input": "projects/gallery/public"
}
],
"styles": [
"projects/gallery/src/styles.css"
]
}
}
}
},
"a2a-chat-canvas": {
"projectType": "library",
"root": "projects/a2a-chat-canvas",
Expand Down
15 changes: 0 additions & 15 deletions samples/client/angular/projects/gallery/tsconfig.app.json

This file was deleted.

3 changes: 0 additions & 3 deletions samples/client/angular/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,6 @@
},
{
"path": "./projects/contact/tsconfig.spec.json"
},
{
"path": "./projects/gallery/tsconfig.app.json"
}
]
}
40 changes: 40 additions & 0 deletions tools/gallery/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# A2UI Gallery Tool

This is a standalone Angular application for showcasing A2UI components.

## Development Setup

To run this application, you first need to build the A2UI renderer libraries.

### 1. Build Renderer Libraries

Open a terminal and run the following commands from the root of the repository:

```bash
# Build the Lit renderer
cd renderers/lit
npm install
npm run build

# Build the Angular renderer
cd ../angular
npm install
npm run build
```

### 2. Run the Gallery App

Once the renderers are built, you can run the gallery app.

```bash
# Navigate to the gallery tool directory
cd ../../tools/gallery

# Install dependencies
npm install

# Start the development server
npm start
```

The application will be available at `http://localhost:4200/`.
106 changes: 106 additions & 0 deletions tools/gallery/angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": ".",
"projects": {
"gallery": {
"projectType": "application",
"schematics": {},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/gallery",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": [
"src/polyfills.ts"
],
"tsConfig": "tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css"
],
"scripts": []
},
"configurations": {
"production": {
"budgets": [
{
"type": "initial",
"maximumWarning": "500kb",
"maximumError": "1mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kb",
"maximumError": "4kb"
}
],
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"outputHashing": "all"
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"configurations": {
"production": {
"buildTarget": "gallery:build:production"
},
"development": {
"buildTarget": "gallery:build:development"
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"buildTarget": "gallery:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css"
],
"scripts": []
}
}
}
}
},
"cli": {
"analytics": false
}
}
Loading
Loading