Skip to content

feat(Chatbot): applied glass and felt tokens#849

Merged
thatblindgeye merged 6 commits into
patternfly:mainfrom
thatblindgeye:iss823_unifiedGlass
Jun 24, 2026
Merged

feat(Chatbot): applied glass and felt tokens#849
thatblindgeye merged 6 commits into
patternfly:mainfrom
thatblindgeye:iss823_unifiedGlass

Conversation

@thatblindgeye

@thatblindgeye thatblindgeye commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Closes #823

Just to note:

  • in Figma the "Overlay" verbiage equates to the "default" display mode in chatbot code
  • in Figma the "inline docked" verbiage equates to the "docked" display mode in chatbot code, and
  • in Figma the "inline default" verbiage equates to the "drawer" display mode in chatbot code

@patternfly-build

patternfly-build commented Jun 18, 2026

Copy link
Copy Markdown

@thatblindgeye thatblindgeye requested a review from mcoker June 18, 2026 20:08

@thatblindgeye thatblindgeye left a comment

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.

MessageBar hover and clicked states should turn to color--hover/clicked (remove "control")

@mcoker mcoker 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.

I see we're using --pf-t--global--box-shadow--md for the box shadow on some glass styled boxes. We do have a glass box-shadow token (--pf-t--global--box-shadow--glass--default) if that's the intent for those. It resolves to --md, but if design ever decided to update the default glass container box-shadow, using the glass token would get that update where using --md wouldn't. Though up to design if that's the intent of these particular shadows, or if they should be fixed at --md

In a handful of spots, we're setting the background of a thing, then writing a glass theme selector and setting that background to a glass token. Most/all of the glass tokens (like --pf-t--global--background--color--glass--primary--default) have a value of initial in non-glass themes, which means you can probably write the style with 1 selector without needing to write the .pf-m-glass selector like below. In glass theme, --pf-t--global--background--color--glass--primary--default will be applied. In non-glass theme, the fallback will be applied.

background-color: var(--pf-t--global--background--color--glass--primary--default, var(--pf-t--global--background--color--floating--secondary--default));

And just a couple of random things. I see there is a style setting a drawer to use the floating background color - that should be the default style for a drawer. And there was at least one instance of a menu using the glass background color, which looked odd because I didn't think we were ever using transparency for something that overlays content.


@at-root :where(.pf-v6-theme-glass) & {
border: var(--pf-t--global--border--width--glass--default) solid var(--pf-t--global--border--color--glass--default);
box-shadow: var(--pf-t--global--box-shadow--md);

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.

We do have a glass box-shadow token (--pf-t--global--box-shadow--glass--default) if that's the intent here. It resolves to --md, but if design ever decided to update the default glass container box-shadow, using the glass token would get that update where using --md wouldn't. Though up to design if that's the intent of this shadow, or if it should be fixed at --md


@at-root :where(.pf-v6-theme-glass) & {
border: var(--pf-t--global--border--width--glass--default) solid var(--pf-t--global--border--color--glass--default);
box-shadow: var(--pf-t--global--box-shadow--md);

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.

same comment here about the glass box shadow token

Comment on lines +21 to +30
.pf-chatbot:not(.pf-chatbot--default) {
.pf-chatbot__content {
background-color: var(--pf-t--global--background--color--secondary--default);

@at-root :where(.pf-v6-theme-glass) & {
background-color: var(--pf-t--global--background--color--glass--primary--default);
}
}
}

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.

--pf-t--global--background--color--glass--primary--default has a value of initial in non-glass themes, which means you can probably use a fallback here like this since initial triggers the next fallback to be used.

Suggested change
.pf-chatbot:not(.pf-chatbot--default) {
.pf-chatbot__content {
background-color: var(--pf-t--global--background--color--secondary--default);
@at-root :where(.pf-v6-theme-glass) & {
background-color: var(--pf-t--global--background--color--glass--primary--default);
}
}
}
.pf-chatbot:not(.pf-chatbot--default) {
.pf-chatbot__content {
background-color: var(--pf-t--global--background--color--glass--primary--default, var(--pf-t--global--background--color--secondary--default));
}
}

--pf-v6-c-drawer__panel--BackgroundColor: var(--pf-t--global--background--color--primary--default);

@at-root :where(.pf-v6-theme-glass) & {
--pf-v6-c-drawer__panel--BackgroundColor: var(--pf-t--global--background--color--glass--primary--default);

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.

You will want to make sure this doesn't cause an issue on mobile, but assuming it's good, you should be able to do this with a single rule using a fallback.

--pf-v6-c-menu--BackgroundColor: var(--pf-t--global--background--color--primary--default);

@at-root :where(.pf-v6-theme-glass) & {
--pf-v6-c-menu--BackgroundColor: var(--pf-t--global--background--color--glass--primary--default);

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.

Same, could use a fallback.

@rebeccaalpert rebeccaalpert left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I saw some visual issues, but the code looks good. So happy to drop some of the custom stuff.

Divider breaks on glass:
Image

Modals break on glass:
Image

History examples look bad in docs in glass (fine in ChatBot):
Image

We need to ask Kayla about the colors for the file chips:
Image

@rebeccaalpert

Copy link
Copy Markdown
Member

Opening #852 for docs issue.

@rebeccaalpert

rebeccaalpert commented Jun 24, 2026

Copy link
Copy Markdown
Member

The new color breaks it for the default view:
Screenshot 2026-06-24 at 1 11 08 PM

May want to scope it for glass.

@thatblindgeye thatblindgeye merged commit d4ea0a4 into patternfly:main Jun 24, 2026
6 checks passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 6.7.0-prerelease.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unified theme: Apply new tokens to ChatBot

5 participants