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

Fluent: add decorators for loading and completion states #5269

Merged
merged 8 commits into from
Aug 28, 2024

Conversation

OEvgeny
Copy link
Collaborator

@OEvgeny OEvgeny commented Aug 28, 2024

Changelog Entry

Added

  • Added decorators for loading and completion states to the Fluent theme, in PR #5269, by @OEvgeny

Description

This PR enhances the Fluent theme by introducing decorators for loading and completion states of activities.

Design

Added two new components:

  1. BorderLoader: Displays an animated loading bar for activities in the preparation state.
  2. BorderFlair: Shows a colorful animated border for activities in the completion state.

Then WebChatDecorator applies them based on the activity's livestreaming state. The implementation uses CSS animations and custom properties for flexibility and performance.

Specific Changes

  • Added new files:
    • BorderFlair.module.css and BorderFlair.tsx
    • BorderLoader.module.css and BorderLoader.tsx
  • Updated Decorator.tsx to use new BorderFlair and BorderLoader components
  • Removed old decorator files (Flair.tsx, Loader.tsx, etc.)
  • Updated FluentThemeProvider.tsx to wrap children with WebChatDecorator
  • Added new CSS variables for animation colors in Theme.module.css
  • Added test file withBuiltinDecorator.html for visual testing

-

  • I have added tests and executed them locally
  • I have updated CHANGELOG.md
  • I have updated documentation

Review Checklist

This section is for contributors to review your work.

  • Accessibility reviewed (tab order, content readability, alt text, color contrast)
  • Browser and platform compatibilities reviewed
  • CSS styles reviewed (minimal rules, no z-index)
  • Documents reviewed (docs, samples, live demo)
  • Internationalization reviewed (strings, unit formatting)
  • package.json and package-lock.json reviewed
  • Security reviewed (no data URIs, check for nonce leak)
  • Tests reviewed (coverage, legitimacy)

@OEvgeny OEvgeny marked this pull request as ready for review August 28, 2024 19:45
compulim
compulim previously approved these changes Aug 28, 2024
Co-authored-by: William Wong <compulim@users.noreply.github.com>
OEvgeny and others added 3 commits August 28, 2024 20:13
Co-authored-by: William Wong <compulim@users.noreply.github.com>
Co-authored-by: William Wong <compulim@users.noreply.github.com>
@OEvgeny OEvgeny enabled auto-merge (squash) August 28, 2024 20:30
@OEvgeny OEvgeny merged commit 5171477 into main Aug 28, 2024
25 checks passed
@OEvgeny OEvgeny deleted the feature/fluent-decorators branch August 28, 2024 20:39
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