Separate components for spright chat message types#2835
Conversation
packages/blazor-workspace/SprightBlazor/Components/SprightChatMessage.razor.cs
Show resolved
Hide resolved
|
FYI @jattasNI this change introduced the following Angular build warnings: i.e. the following import which only imports types: should change to: import type {
FoundationElementTemplate
} from '@ni/fast-foundation'; which will elide the whole import. As-is, the behavior of mport { html, ViewTemplate } from '@ni/fast-element';
import {} from '@ni/fast-foundation';
export const template = () => html `
<div class="container">
<section class="message-content">
<slot></slot>
</section>
</div>
`;
//# sourceMappingURL=template.js.mapEdit: Maybe we should just enable |
@rajsite Good catch, sorry for not noticing! I'll address in #2848. |
#2848) # Pull Request ## 🤨 Rationale Fixes #2845 and addresses warnings introduced by #2835 and described in [this comment](#2835 (comment)) on that PR. ## 👩💻 Implementation Enable the [@typescript-eslint/no-import-type-side-effects](https://typescript-eslint.io/rules/no-import-type-side-effects/) lint rule. Fix the violations including the one I introduced in spright chat plus some other pre-existing ones. ## 🧪 Testing Inspected build output and warnings are now gone. Lint is now passing after addressing the violations. ## ✅ Checklist <!--- Review the list and put an x in the boxes that apply or ~~strike through~~ around items that don't (along with an explanation). --> - [ ] I have updated the project documentation to reflect my changes or determined no changes are needed.
No worries and great that the line rule helps out! |
Pull Request
🤨 Rationale
One of the tasks in #2610 is to create separate components for different message types instead of a single chat message with a
message-typeattribute. This would have some benefits:footer-actionsandendare only available on inbound messages) but are currently present on all👩💻 Implementation
spright-chat-message-inbound,spright-chat-message-outbound,spright-chat-message-systemby copying existing message and removing code that was specific to other types.spright-chat-messageas deprecated. We can remove it once clients migrate to the new messages.🧪 Testing
✅ Checklist