microsoft / BotFramework-WebChat

A highly-customizable web-based client for Azure Bot Services.
https://www.botframework.com/
MIT License
1.56k stars 1.51k forks source link

feat: Add decorators #5205

Closed OEvgeny closed 2 weeks ago

OEvgeny commented 3 weeks ago

Fixes #

Changelog Entry

Added

Description

This adds a way to decorate various things in WebChat in the future. For now it supports activity decoration with a custom border.

Design

The design introduces decorators to WebChat. The current implementation includes support for activity decoration with custom border decorator.

Key components of the design:

Flow

  1. Users provide an array of middleware functions to DecoratorComposer
  2. The DecoratorComposer initializes these functions based on the decorators type
  3. When, for example, an activity is rendered, it passes the activity to the ActivityDecorator to form a request and process middlewars, which apply the appropriate changes

Specific Changes

-

-

Review Checklist

This section is for contributors to review your work.