Skip to content

GAUD-9877: AI Lumi button#983

Open
EdwinACL831 wants to merge 18 commits into
mainfrom
ecollazos/GAUD-9877_ai_lumi_button
Open

GAUD-9877: AI Lumi button#983
EdwinACL831 wants to merge 18 commits into
mainfrom
ecollazos/GAUD-9877_ai_lumi_button

Conversation

@EdwinACL831
Copy link
Copy Markdown

@EdwinACL831 EdwinACL831 commented May 8, 2026

Jira

GAUD-9877

Description

This addresses the intention of creating a specific AI Lumi Button. This is done by using the d2l-button-subtle from core plus adding styles to it.

NOTE: Still a WIP

Normal state

image

Focused state (by tabbing from keyboard)

image

Focused state (by focusing programmatically and by clicking it)

Focused by clicking another button that focuses the AI one also by clicking the ai button directly

image

Hover state (before any click)

image

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

Thanks for the PR! 🎉

We've deployed an automatic preview for this PR - you can see your changes here:

URL https://live.d2l.dev/prs/BrightspaceUI/labs/pr-983/

Note

The build needs to finish before your changes are deployed.
Changes to the PR will automatically update the instance.

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.

Question for Gaudi: wondering whether we might want an ai directory where we can put all the AI-related stuff? Not sure if there are plans for more components or not. Otherwise we'd end up with button-ai, dropdown-ai, etc.

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 think a lumi directory makes sense, and I'm not sure how "subtle" this is anymore

./src/components/lumi/button/button.js
class Button extends FocusMixin(LitElement) {
...
customElements.define('d2l-labs-lumi-button', Button);
import '@brightspace-ui/labs/components/lumi/button/button.js';
<d2l-labs-lumi-button text="Rot My Brain"></d2l-labs-lumi-button>

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

IMO that sounds like very product specific, and not sure if this repo is intended for that, like if we would have a folder or even a label specific/dedicated to a product. To me sounds like we should not, but we could talk about this within the team's channel.

I think @dbatiste suggested something similar but more generic: button-ai which to me sounds like the way to go

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.

Yeah definitely not saying you're wrong. I guess my thinking with using lumi was to discourage wider usage. This is the branding of Lumi, right? Maybe I just need to better understand where the lines are.

Does Lumi have its own defined design pattern as a branch off Daylight?

Are there/will there be other AI tools/products that aren't Lumi-branded? Will they all use this design pattern?

Will this graduate to core or somewhere else? If somewhere else, to a product repo like nearly everything else is organized?

Comment thread src/components/button-subtle-ai/button-subtle-ai.js Outdated
Comment thread test/components/button-subtle-ai/button-subtle-ai.test.js Outdated
Comment thread test/components/button-subtle-ai/button-subtle-ai.vdiff.js Outdated
Comment thread demo/components/button-subtle-ai/index.html Outdated
Comment thread src/components/button-ai/button-subtle-ai.js
Comment thread src/components/button-subtle-ai/button-subtle-ai.js Outdated
Comment thread test/components/button-subtle-ai/button-subtle-ai.vdiff.js Outdated
Comment thread test/components/button-subtle-ai/button-subtle-ai.vdiff.js Outdated
Comment thread src/components/button-subtle-ai/button-subtle-ai.js Outdated
Comment thread test/components/button-subtle-ai/button-subtle-ai.vdiff.js Outdated
Comment thread test/components/button-subtle-ai/button-subtle-ai.test.js Outdated
@EdwinACL831 EdwinACL831 force-pushed the ecollazos/GAUD-9877_ai_lumi_button branch from af0b174 to 8aefe97 Compare May 8, 2026 17:11
@EdwinACL831 EdwinACL831 marked this pull request as ready for review May 8, 2026 17:48
@EdwinACL831 EdwinACL831 requested a review from a team as a code owner May 8, 2026 17:48
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 think a lumi directory makes sense, and I'm not sure how "subtle" this is anymore

./src/components/lumi/button/button.js
class Button extends FocusMixin(LitElement) {
...
customElements.define('d2l-labs-lumi-button', Button);
import '@brightspace-ui/labs/components/lumi/button/button.js';
<d2l-labs-lumi-button text="Rot My Brain"></d2l-labs-lumi-button>

linear-gradient(var(--d2l-theme-background-color-base), var(--d2l-theme-background-color-base)) padding-box,
linear-gradient(to top left, var(--d2l-color-celestine), var(--d2l-color-fluorite-plus-1)) border-box;
border: 0.1rem solid transparent;
border-radius: 0.3rem;
Copy link
Copy Markdown
Contributor

@bearfriend bearfriend May 9, 2026

Choose a reason for hiding this comment

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

Image
The radius needs to increase with the border width to match the inner button shape/focus styles
Suggested change
border-radius: 0.3rem;
border-radius: 0.4rem;

@bearfriend
Copy link
Copy Markdown
Contributor

Are we ok with this button's box being larger than our standard buttons? I don't see a way to shrink it without extending ButtonMixin directly

Screenshot 2026-05-08 at 9 56 52 PM


static get styles() {
return [css`
:host {
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 probably want a wrapper in the shadow DOM to style so they're scoped and not easily overridden by consumers

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.

4 participants