Skip to content

Commit 9aec40e

Browse files
committed
Remove the contacts sample and the related code path
1 parent d71c996 commit 9aec40e

File tree

5 files changed

+6
-55
lines changed

5 files changed

+6
-55
lines changed

samples/client/lit/shell_v0_9/THEMING.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ that are used by the A2UI-provided renderers via global CSS custom properties on
2424
In this particular app:
2525

2626
- Application themes are defined using `CSSStyleSheet` instances. See:
27-
- [Contacts theme](theme/contacts-theme.ts)
2827
- [Restaurants theme](theme/restaurant-theme.ts)
2928
- These stylesheets override the default component CSS variables specified above,
3029
and change the look and feel of the generated UI.
31-
- The shell app changes what configuration is loaded through the URL `app`
32-
query parameter: `?app=restaurant` (default) or `?app=contacts`.

samples/client/lit/shell_v0_9/app.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import { renderMarkdown } from "@a2ui/markdown-it";
3232

3333
// Configurations
3434
import { A2UIClient } from "./client.js";
35-
import { configs, AppConfig } from "./configs/configs.js";
35+
import { restaurantConfig, AppConfig } from "./configs/configs.js";
3636
import { styleMap } from "lit/directives/style-map.js";
3737

3838
@customElement("a2ui-shell")
@@ -47,7 +47,7 @@ export class A2UILayoutEditor extends SignalWatcher(LitElement) {
4747
accessor #lastMessages: any[] = [];
4848

4949
@state()
50-
accessor config: AppConfig = configs.restaurant;
50+
accessor config: AppConfig = restaurantConfig;
5151

5252
@state()
5353
accessor #loadingTextIndex = 0;
@@ -288,11 +288,6 @@ export class A2UILayoutEditor extends SignalWatcher(LitElement) {
288288
connectedCallback() {
289289
super.connectedCallback();
290290

291-
// Load config from URL
292-
const urlParams = new URLSearchParams(location.search);
293-
const appKey = urlParams.get("app");
294-
this.config = (appKey && configs[appKey]) || configs.restaurant;
295-
296291
// Set the CSS Overrides for the given appKey.
297292
if (this.config.cssOverrides && !document.adoptedStyleSheets.includes(this.config.cssOverrides)) {
298293
document.adoptedStyleSheets = [
@@ -339,7 +334,7 @@ export class A2UILayoutEditor extends SignalWatcher(LitElement) {
339334
if (this.#requesting) return nothing;
340335
if (this.#lastMessages.length > 0) return nothing;
341336

342-
return html` <form
337+
return html`<form
343338
@submit=${async (evt: Event) => {
344339
evt.preventDefault();
345340
if (!(evt.target instanceof HTMLFormElement)) {
Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,2 @@
1-
import { config as restaurantConfig } from "./restaurant.js";
2-
import { config as contactsConfig } from "./contacts.js";
3-
import { AppConfig } from "./types.js";
4-
5-
export const configs: Record<string, AppConfig> = {
6-
restaurant: restaurantConfig,
7-
contacts: contactsConfig,
8-
};
9-
10-
export type { AppConfig };
1+
export type { AppConfig } from "./types.js";
2+
export { restaurantConfig } from "./restaurant.js";

samples/client/lit/shell_v0_9/configs/contacts.ts

Lines changed: 0 additions & 33 deletions
This file was deleted.

samples/client/lit/shell_v0_9/configs/restaurant.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import { AppConfig } from "./types.js";
1818
import { restaurantThemeSheet } from "../theme/restaurant-theme.js";
1919

20-
export const config: AppConfig = {
20+
export const restaurantConfig: AppConfig = {
2121
key: "restaurant",
2222
title: "Restaurant Finder",
2323
heroImage: "/hero.png",

0 commit comments

Comments
 (0)