Skip to content

[Draft] Add Spright Chat Message Welcome to Chat Component#2891

Draft
hellovolcano wants to merge 4 commits intomainfrom
users/vgleason/spright-start-slot
Draft

[Draft] Add Spright Chat Message Welcome to Chat Component#2891
hellovolcano wants to merge 4 commits intomainfrom
users/vgleason/spright-start-slot

Conversation

@hellovolcano
Copy link
Contributor

Pull Request

🤨 Rationale

Adding welcome message for Spright Chat Component, as defined in Chat components.

👩‍💻 Implementation

  • Added new spright-chat-message-welcome component and framework wrappers

🧪 Testing

✅ Checklist

  • I have updated the project documentation to reflect my changes or determined no changes are needed.

@hellovolcano hellovolcano changed the title Users/vgleason/spright start slot Add Spright Chat Message Welcome to Chat Component Mar 6, 2026
> = (context, definition) => html<ChatMessageWelcome>`
<div class="container">
<div class="brand-icon">
<slot name="brand-icon"></slot>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The spec suggested we should have a default here, but I'm not sure that exists yet?

Copy link
Contributor

Choose a reason for hiding this comment

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

It does not. I was envisioning that we'd lift the icon contents from the existing Blazor implementation and put it in a new theme-aware Spright icon component that follows the patterns of the new Spright icons added in #2861.

@hellovolcano
Copy link
Contributor Author

@jattasNI -- I have a draft of the message content, but I'm still working on the wrappers. I'm OOO Mar 9-13, so I won't make much progress on this until the following week, but wanted you to be aware (and you're welcome to do a first pass review if you have time).

@hellovolcano hellovolcano changed the title Add Spright Chat Message Welcome to Chat Component [Draft] Add Spright Chat Message Welcome to Chat Component Mar 6, 2026
'A slot to optionally include content (such as banners) which will be displayed below the toolbar and above the messages.',
table: { category: apiCategory.slots }
},
welcome: {
Copy link
Contributor

Choose a reason for hiding this comment

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

This makes it look like the conversation has a dedicated slot for the welcome message, which is not the case. I think we can just delete this entry and clients will hopefully understand that the welcome message is just another message type.

<section class="message-content">
<slot></slot>
</section>
${endSlotTemplate(context, definition)}
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need the end slot for this message type? I didn't include it in the spec but if there's a need I'm not opposed to it. If we don't need it, let's remove it from here, the component index.ts, the component styles, and storybook docs.

*/
export class ChatMessageWelcome extends FoundationElement {
@attr({ attribute: 'title' })
public welcomeTitle?: string;
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm guessing this isn't called title because it conflicts with a native element property? I hadn't registered that would be a problem. If that's the case then I think we should move away from that conflict completely and change the attribute name too: we don't want confusion between the native attributes and our own.

I guess welcome-title is a good enough name for the attribute. We can't copy the banner for precedent because it's able to use title since it's the name of a slot, which doesn't conflict with anything.

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