microsoft / microsoft/BotFramework-WebChat

Chores and code hygiene

Open
#4,968 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature-request
Dominant language
HTML
Stars
1.8k
Forks
1.6k
Avg merge
22h 58m
Merged PRs (30d)
2

Description

Is your feature request related to a problem?

We need to update Web Chat to clear up some chores and code hygiene. This is a non-exhaustive list.

Describe the suggestion or request in detail
  • XS: Do not use React FC/VFC types, use Props instead #4981
  • XS: Mark all props as read-only, also any arrays and objects under it #4981
  • XS: Prefer import { type ABC } over import type { ABC } #4981
  • XS: Move to use-ref-from and use-state-with-ref, from useValueRef
  • S: Change activity key type from string to ActivityKey of type wc.a.${string}
  • S: Consider using opaque/tagged type for channel ID or other IDs
  • S: Move predicates (e.g. isFromUser, hasSent) to core package
  • M: Dupe most style options into CSS custom properties
    • Should try redo time-sensitive style options, say "Send failed. Retry." into a CSS animation than a JavaScript effect
  • M: Mark WebChatActivity and many things as read-only
  • M: Move helper function to botframework-webchat-base (#5176)
    • The new base package will be bundled and not published
  • M: Port Direct Line emulator to TypeScript
  • L: Remove deprecated code
  • L: Add a wrapper for workarounding behavioral issues related to DirectLineJS
  • L: Componentize the active descendant trick (different narration between browse mode vs. scan mode)
  • XL: Add GitHub CI pipeline (#4976)
  • XL: Move to tsup (#5148)
  • XL: Move to modern middleware and react-chain-of-responsibility (#5118)
  • XL: #4847
  • XL: Move as much hooks to API as possible
  • XL: Unify middleware v1 (activity, etc.) and middleware v2 (attachment for screen reader) (#5118)
  • L: Combine attachment middleware and attachment for screen reader middleware in a single middleware (#5118)
  • XL: useStyleOptions inside activity middleware could read partial style options from channel data
  • XL: Moving some release testing into main repo: test hosting Web Chat in create-react-app, Webpack 4/5, esbuild
  • L: Fixing AzDO CI/CD automation
  • L: #5182
  • L: #4844
  • L: Move to dompurify
  • XL/Mutex: Update VRT snapshot file names
  • XL/Mutex: Move VRT into folder hierarchy
  • L: Remove remnants of IE11 and ES5
  • M: Upload VRT failure snapshots in CI
  • XL: Move our current Redux logics into a chat adapter shim and embrace for an updated chat adapter which exposes Activity[] instead of activity$
  • L: Move to CFS from Terrapin
  • L: Build a SSO sample out of the Copilot Studio sample
  • L: Plan CSAT payload
  • XL: Plan to make Web Chat exposed as both Web Component and React component
    • XL: Host Web Chat inside Web Component

Notes: Mutex = when this work is started, will block all other works

Describe alternatives you have considered

No response

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no single file, test, or entry point and contains a broad, non-exhaustive checklist. Start by choosing one unchecked item and reading its referenced issue where available, such as #4981, #5176, or #5118. Define a focused scope before inspecting the relevant Web Chat package and its existing checks; completion depends on the selected item.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, react, redux, typescript
Domain
developer-experience, frontend, testing-qa, tooling
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.