add focusSendBoxInput method#5512
Closed
marclundgren wants to merge 13 commits intomicrosoft:mainfrom
Closed
Conversation
beyackle2
suggested changes
Jul 22, 2025
Contributor
beyackle2
left a comment
There was a problem hiding this comment.
Normally I'd approve this, but I know William is very specific about the format of the changelog; fix that and I'll re-approve.
CHANGELOG.md
Outdated
| ### Added | ||
|
|
||
| - Resolves [#5081](https://github.com/microsoft/BotFramework-WebChat/issues/5081). Added `uploadAccept` and `uploadMultiple` style options, by [@ms-jb](https://github.com/ms-jb) | ||
| - Added `ComposerRef` type and ref-based focus control to `Composer` component, enabling programmatic focus of the send box input via `focusSendBoxInput()` method |
Contributor
There was a problem hiding this comment.
This should follow one of the changelog line templates above (e.g. link to an issue or your GH page)
9065b3c to
0f478d8
Compare
Contributor
Author
|
Hi @beyackle2! 👋 I've updated the CHANGELOG.md entry to follow the proper format. The entry now includes:
The updated entry matches the format used by other entries in the changelog. The change has been committed and pushed. Thanks for the feedback! 🙏 |
Collaborator
|
How about moving composer upper in the tree and utilizing existing The use-case seems can be solved in userland without the proposed modification. |
added 2 commits
August 20, 2025 15:54
…ut method; update type exports for ComposerRef
3dae392 to
0741a48
Compare
b55300d to
622ba1c
Compare
0784b4b to
5085a30
Compare
5085a30 to
4cc913c
Compare
- Add proper type parameters to generic types (Promise<void>, Readonly<{...}>)
- Remove unused imports (DecoratorMiddleware, HTMLContentTransformMiddleware, ContextOf)
- Define proper prop types for ComposerCoreUIProps and ComposerCoreProps
This fixes the build errors preventing declaration file generation in CI.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Add decoratorMiddleware and htmlContentTransformMiddleware to ComposerProps type - Import required DecoratorMiddleware and HTMLContentTransformMiddleware types - Add PropTypes validation for new middleware properties This fixes the remaining TypeScript compilation errors in CI: - Property 'decoratorMiddleware' does not exist on type 'PropsWithChildren<ComposerProps>' - Property 'htmlContentTransformMiddleware' does not exist on type 'PropsWithChildren<ComposerProps>' - PropTypes validation mismatch errors 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
Replace spread operator with explicit PropTypes definitions to avoid type conflicts between APIComposer.propTypes and ComposerCore.propTypes. This fixes CI error: "The types of 'suggestedActionsAccessKey[nominalTypeHack].type' are incompatible between these types" by explicitly defining PropTypes instead of using spread which was causing TypeScript validation conflicts. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
The connectToWebChat function was removed in commit 73ee44a as part of the ESM build refactoring, but the bundle package still referenced it, causing TypeScript compilation errors. This removes the obsolete import references from the bundle package and fixes the addVersion import path. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add ref-based focus control to Composer component to enable focus send box
Summary
This PR adds a ref prop to the Composer component that exposes a focusSendBoxInput() method, allowing parent components to programmatically focus the chat input field.
Changes
Usage Example
CHANGELOG.mdReview Checklist
z-index)package.jsonandpackage-lock.jsonreviewed