Skip to content

Conversation

@paullewis
Copy link
Collaborator

@paullewis paullewis commented Dec 11, 2025

This brings the styling in line with the pre-existing theme machinery. This applies to both the restaurant and contacts examples for both light & dark themes.

Copy link
Collaborator

@ava-cassiopeia ava-cassiopeia left a comment

Choose a reason for hiding this comment

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

LGTM, just a few small comments; feel free to follow up on them in a different PR.

Comment on lines +121 to +130
let additionalStyles: Record<string, string> = {};
const styles = this.theme.additionalStyles?.Text;
if (styles) {
if ("h1" in styles) {
const hint = this.usageHint ?? "body";
additionalStyles = styles[hint] as Record<string, string>;
} else {
additionalStyles = 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: this logic smells to me like it would be better served as its own private method for readability, as you could improve the readability by using guard clauses instead of nested conditionals; something like:

#getAdditionalStyles(...): Record<string, string> {
  const styles = this.theme.additionalStyles?.Text;
  if (!styles) return {};

  // etc.
}

Feel free to do this in a followup PR if you want.

100 - i
}%, #fff ${i}%)`;
}
// Ignored for now.
Copy link
Collaborator

Choose a reason for hiding this comment

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

NIT: Is it worth clarifying why this is being ignored? Here and below.

@paullewis paullewis merged commit 75928a7 into google:main Dec 11, 2025
6 checks passed
@paullewis paullewis deleted the update-shell-styles branch December 11, 2025 16:09
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.

2 participants