Skip to content

refactor(web_core, lit): move universal basic catalog components to web_core and re-export in lit - #2190

Draft
josemontespg wants to merge 1 commit into
lit-align-angular-behaviorsfrom
basic-catalog-universal-components
Draft

refactor(web_core, lit): move universal basic catalog components to web_core and re-export in lit#2190
josemontespg wants to merge 1 commit into
lit-align-angular-behaviorsfrom
basic-catalog-universal-components

Conversation

@josemontespg

@josemontespg josemontespg commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator

Overview

Moves the 18 Basic Catalog Web Component implementations from @a2ui/lit into @a2ui/web_core, making them available as framework-agnostic universal custom elements that can be shared across all web renderers.

Details

  • Universal Components: Relocates all 18 Basic Catalog components (AudioPlayer, Button, Card, CheckBox, ChoicePicker, Column, DateTimeInput, Divider, Icon, Image, List, Modal, Row, Slider, Tabs, Text, TextField, Video) into @a2ui/web_core/v0_9/basic_catalog/components/.
  • Framework-Agnostic Element Base: Provides BasicCatalogA2uiLitElement and controller utilities in @a2ui/web_core/v0_9/basic_catalog with Light DOM rendering and shared styling.
  • Backwards Compatibility: Re-exports all components, controllers, context helpers, and catalog definitions from @a2ui/lit with JSDoc notices to ensure existing code and consumers continue working without breaking changes.
  • Comprehensive Unit Testing: Adds unit test coverage for all 18 components directly in @a2ui/web_core, utilizing a JSDOM testing environment for Node.js test execution.
  • TypeScript Typing: Strongly types controllers, lifecycle hooks (willUpdate), and custom element tags.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the A2UI Lit renderers by moving the core component implementations (such as Button, Card, List, Modal, Tabs, and Text) from the renderers/lit package into the renderers/web_core package under basic_catalog, updating the Lit package to re-export them. This consolidation improves cross-framework reusability. However, several issues were identified in the migrated components: DateTimeInput has bugs when enableDate is false and potential timezone issues; Modal uses the open attribute on <dialog> instead of .showModal(), losing native modal features; Tabs lacks safety clamping for activeIndex when the tabs array shrinks; Text incorrectly nests block-level elements inside an inline <span>; and List generates invalid CSS due to an empty styleType variable.

Comment thread renderers/web_core/src/v0_9/basic_catalog/components/DateTimeInput.ts Outdated
Comment thread renderers/web_core/src/v0_9/basic_catalog/components/Modal.ts
Comment thread renderers/web_core/src/v0_9/basic_catalog/components/Tabs.ts
Comment thread renderers/web_core/src/v0_9/basic_catalog/components/Text.ts
Comment thread renderers/web_core/src/v0_9/basic_catalog/components/List.ts Outdated
@josemontespg
josemontespg force-pushed the basic-catalog-universal-components branch from af2bfeb to 054c5ad Compare August 7, 2026 00:37
Comment thread renderers/lit/src/v0_9/catalogs/basic/components/AudioPlayer.ts Outdated
Comment thread renderers/web_core/src/v0_9/basic_catalog/components/Button.test.ts
Comment thread renderers/web_core/src/v0_9/basic_catalog/components/Tabs.ts
Comment thread renderers/web_core/src/v0_9/basic_catalog/components/Text.ts
Comment thread renderers/web_core/src/v0_9/basic_catalog/index.ts Outdated
@josemontespg josemontespg changed the title basic catalog universal components feat(web_core, lit): implement universal basic catalog components in web_core and re-export in lit Aug 7, 2026
@josemontespg
josemontespg force-pushed the basic-catalog-universal-components branch 3 times, most recently from 0c06b33 to d7abba7 Compare August 7, 2026 19:31
Comment thread renderers/lit/src/v0_9/context/context.ts
Comment thread renderers/lit/src/v0_9/context/markdown.ts
Comment thread renderers/lit/src/v0_9/catalogs/basic/index.ts Outdated
Comment thread renderers/lit/src/v0_9/surface/render-a2ui-node.ts Outdated
Comment thread renderers/lit/src/v0_9/tests/a2ui-controller.test.ts Outdated
Comment thread renderers/lit/src/v0_9/types.ts
Comment thread renderers/lit/CHANGELOG.md Outdated
Comment thread renderers/lit/CHANGELOG.md Outdated
Comment thread renderers/lit/CHANGELOG.md Outdated
Comment thread renderers/web_core/src/v0_9/basic_catalog/a2ui-lit-element.ts
@josemontespg
josemontespg force-pushed the basic-catalog-universal-components branch from d7abba7 to 10f6afb Compare August 7, 2026 20:07
@josemontespg josemontespg changed the title feat(web_core, lit): implement universal basic catalog components in web_core and re-export in lit refactor(web_core, lit): move universal basic catalog components to web_core and re-export in lit Aug 7, 2026
@josemontespg
josemontespg changed the base branch from main to lit-align-angular-behaviors August 7, 2026 20:41
@josemontespg
josemontespg force-pushed the basic-catalog-universal-components branch from 10f6afb to 2c00f51 Compare August 7, 2026 20:54
@josemontespg
josemontespg force-pushed the basic-catalog-universal-components branch from 2c00f51 to 570e9c4 Compare August 7, 2026 20:59
@josemontespg
josemontespg force-pushed the basic-catalog-universal-components branch from 570e9c4 to e714efb Compare August 7, 2026 21:52
@josemontespg
josemontespg force-pushed the basic-catalog-universal-components branch from e714efb to 5e107cd Compare August 7, 2026 22:03
@josemontespg
josemontespg force-pushed the basic-catalog-universal-components branch from 5e107cd to 5fbffe7 Compare August 7, 2026 22:16
@josemontespg
josemontespg force-pushed the basic-catalog-universal-components branch from 5fbffe7 to 535ac56 Compare August 7, 2026 22:24
@josemontespg
josemontespg force-pushed the basic-catalog-universal-components branch 2 times, most recently from 130d214 to 728b3e2 Compare August 7, 2026 22:34
@josemontespg
josemontespg force-pushed the basic-catalog-universal-components branch from 728b3e2 to 7383080 Compare August 7, 2026 22:36
@josemontespg
josemontespg force-pushed the basic-catalog-universal-components branch from 7383080 to 239fff0 Compare August 7, 2026 22:57
Comment thread renderers/lit/a2ui_explorer/tests/v0_9/36_modal.test.ts
Comment thread renderers/lit/src/v0_9/catalogs/basic/basic-catalog-a2ui-lit-element.ts Outdated
Comment thread renderers/web_core/src/v0_9/basic_catalog/basic-catalog-a2ui-lit-element.ts Outdated
@josemontespg
josemontespg force-pushed the basic-catalog-universal-components branch 4 times, most recently from eeb6375 to a5d1df7 Compare August 8, 2026 00:52
Comment thread renderers/lit/CHANGELOG.md Outdated
@@ -1,5 +1,6 @@
## Unreleased

- (v0_9) Move Basic Catalog components to `@a2ui/web_core` as universal Web Components.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

remove this entry since we are moving just the implementations but keeping the public API surface by re-exporting

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done! Removed this entry from the changelog.

@josemontespg
josemontespg force-pushed the basic-catalog-universal-components branch 4 times, most recently from acbd410 to 6ec7083 Compare August 8, 2026 05:48
@josemontespg
josemontespg force-pushed the basic-catalog-universal-components branch from 6ec7083 to f771a10 Compare August 8, 2026 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant