Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update padding and width of message component #727

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

ellynliu
Copy link
Contributor

@ellynliu ellynliu commented Nov 18, 2024

Link: preview

Update the width and the padding of the message component to match fluent 2. Changes only affect message-sm, so the padding changes do not apply to the regular sized message.

Sources:
Fluent AI storybook: https://ai.fluentui.dev/?path=/docs/components-copilotchat-v2-usermessagev2--docs
Yonder's specs: https://www.figma.com/design/3TjpAzAIwxnPv4zpA1D2Iq/AI-Assistant-on-Microsoft-Learn?node-id=826-78921&t=r4kQ5xoqPCMfvMOE-1

image

Changes:

image

Contributor checklist

  • Did you update the description of this pull request with a review link and test steps?
  • Did you submit a changeset? Changesets are required for all code changes.
  • Does your pull request implement complex UI logic (js/ts)? Consider adding an integration test to test your user flow.
  • Does your pull request add a new page to the documentation site? Add your new page for automated accessibility testing in /integration/tests/accessibility.

@ellynliu ellynliu requested a review from a team as a code owner November 18, 2024 19:42
Copy link

changeset-bot bot commented Nov 18, 2024

🦋 Changeset detected

Latest commit: 3c00eaf

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@microsoft/atlas-site Minor
@microsoft/atlas-css Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

homing1
homing1 previously approved these changes Nov 19, 2024
wibjorn
wibjorn previously approved these changes Dec 6, 2024
@wibjorn wibjorn self-requested a review December 6, 2024 18:17
@wibjorn wibjorn dismissed their stale review December 6, 2024 18:18

Recheck something

}

&.message-sm.message-sender {
width: auto;
Copy link
Contributor

@wibjorn wibjorn Dec 6, 2024

Choose a reason for hiding this comment

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

I think width:auto may not be the expected behavior here for all chats, and why is it scoped to message-sm?

Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need it baked in here? what about using width-auto?

@@ -52,6 +52,43 @@ For a copilot-friendly input, with a series of buttons placed within the visual
</div>
```

## Copilot-like chat messages

To mimic a copilot chat experience, apply `message-sm` and `message-sender` to automatically fit to the width of the sender's message. For the AI responses (`message-sm`), the message will take up the full width.
Copy link
Contributor

Choose a reason for hiding this comment

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

The classes don't seem to match the behaviors here.

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.

3 participants