Skip to content

Conversation

@dmandar
Copy link
Collaborator

@dmandar dmandar commented Dec 10, 2025

…r and font.

Also add back logoUrl to 0.8 schema

@dmandar
Copy link
Collaborator Author

dmandar commented Dec 10, 2025

Screenshot 2025-12-10 at 9 16 49 AM Screenshot 2025-12-10 at 9 18 07 AM

/* Global overrides */
* {
font-family: 'Outfit', sans-serif !important;
font-family: var(--bb-font-family, 'Outfit', sans-serif) !important;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Whoa, I don't think I've encountered this file before. Why these overrides as opposed to setting this in html {} or body {}?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this is going to be rewired by Paul..hopefully this PR will not be needed then..


// Apply server-side styles if present in beginRendering
for (const msg of messages) {
if ('beginRendering' in msg && msg.beginRendering.styles) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

NIT: I think you can use a nullish coalescing operator here.

Suggested change
if ('beginRendering' in msg && msg.beginRendering.styles) {
if (msg.beginRendering?.styles) {


// 1. Primary Color
if (styles.primaryColor) {
root.style.setProperty('--primary-color', styles.primaryColor);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are we validating these styles anywhere? primaryColor could be like truly any value as far as I can tell.

this.config = {
...this.config,
heroImage: styles.logoUrl,
heroImageDark: styles.logoUrl, // Use same for dark mode unless specified otherwise
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't see a way to specify otherwise, right? Should we say we're just going to set this for both until we have a way to specify that?

"description": "The primary UI color as a hexadecimal code (e.g., '#00BFFF').",
"pattern": "^#[0-9a-fA-F]{6}$"
}
},
Copy link
Collaborator

Choose a reason for hiding this comment

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

If you add this here, please also update the specification/0.8/a2ui_protocol.md and the JSON schema in specification/0.8/json. That should be the source of truth for the schema.

In fact, this code should probably be reading those schemas directly and not defining a copy that is likely to get out of date.

@dmandar dmandar closed this Dec 17, 2025
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.

3 participants