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: integrate webchat focus management #5150

Merged
merged 9 commits into from
May 1, 2024
Merged

Conversation

OEvgeny
Copy link
Collaborator

@OEvgeny OEvgeny commented Apr 29, 2024

Fixes #

Changelog Entry

  • (Experimental) Added botframework-webchat-fluent-theme package for applying Fluent UI theme to Web Chat, by @compulim and @OEvgeny
    • Integrated focus management for send box, by @OEvgeny in PR #5150
  • Removed deprecated useFocusSendBox() hook, please use useFocus('sendBox') instead, by @OEvgeny, in PR #5150
  • Fixed suggested actions keyboard navigation skips actions after suggested actions got updated, by @OEvgeny, in PR #5150

Description

The PR refactors existing sendbox focus management code to use use-propagate provided hooks and exposes the newly added useRegisterFocusSendBox hook along with SendBoxFocusOptions so that Fluent SendBoxe's focus can be wired-in and managed by WebChat.

Design

The new component/src/hooks/sendBoxFocus file contains useRegisterFocusSendBox, useFocusSendBox hooks which are used in place of the old context.

Context bindings and other related code was removed.

Specific Changes

  • Added use-propagate dependency
  • Replaced context usage with usePropogate for sendbox focus
  • Removed now unused types and the previous implementation
  • Added a test case
  • Removed deprecated useFocusSendBox hoook
  • Updated hook usage in tests
  • Fixed suggested actions roving navigation

-

  • 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 April 29, 2024 22:27
@OEvgeny
Copy link
Collaborator Author

OEvgeny commented Apr 29, 2024

I'll update usage with use-propagate when the version with the React@>=16 support is out

@OEvgeny OEvgeny requested a review from compulim April 30, 2024 23:23
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