-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add useObserveTranscriptFocus
hook and focus fix on IE11
#3755
Merged
compulim
merged 11 commits into
microsoft:master
from
compulim:feat-useobservetranscriptfocus
Feb 24, 2021
Merged
Add useObserveTranscriptFocus
hook and focus fix on IE11
#3755
compulim
merged 11 commits into
microsoft:master
from
compulim:feat-useobservetranscriptfocus
Feb 24, 2021
Conversation
This file contains 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
compulim
changed the title
Add
Add Feb 24, 2021
useObserveTranscriptFocus
hookuseObserveTranscriptFocus
hook and focus fix on IE11
compulim
requested review from
a-b-r-o-w-n,
amal-khalaf,
beyackle,
corinagum,
cwhitten,
srinaath,
tdurnford and
tonyanziano
as code owners
February 24, 2021 00:35
corinagum
reviewed
Feb 24, 2021
corinagum
reviewed
Feb 24, 2021
corinagum
reviewed
Feb 24, 2021
corinagum
reviewed
Feb 24, 2021
corinagum
approved these changes
Feb 24, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - pending comments
Co-authored-by: Corina <14900841+corinagum@users.noreply.github.com>
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.
Changelog Entry
Added
useObserveTranscriptFocus
hook, by @compulim in PR #3755Description
Added a new
useObserveTranscriptFocus
hook to allow apps to observe which elements in the transcript the user is focusing on.Also added a focus redirection mechanism to fix an issue in IE11, excerpt from comment in code:
Design
Today, Emulator has a mechanism to select/highlight a single activity.
Since Web Chat also introduced similar "transcript navigation" feature in PR #3703, Emulator can move to Web Chat official feature.
To enable that, we need to add an
useObserveTranscriptFocus
hook to let the app to know which activity is user is selecting.Tomorrow, we can extend this hook by allowing the user to focus on attachments as well.
Specific Changes
useObserveTranscriptFocus
hook, similar to existinguseObserveScrollPosition
hookBasicTranscript.js
to emit transcript focus to its observers when the focus has changeduseObserveTranscriptFocus
<div>
used to push the message bubbles to the bottom of the transcript initiallyflex-grow: 1
andflex-shrink: 10000
, that means, it is very likely to get shrunk and very unlikely to growCHANGELOG.md
Review Checklist
CSS styles reviewed (minimal rules, noz-index
)Internationalization reviewed (strings, unit formatting)package.json
andpackage-lock.json
reviewedSecurity reviewed (no data URIs, check for nonce leak)