-
Notifications
You must be signed in to change notification settings - Fork 78
[Call Readiness] Unsupported browser version UI #2552
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
Merged
dmceachernmsft
merged 28 commits into
main
from
dmceachernmsft/unsupported-browser-version
Nov 30, 2022
Merged
Changes from 26 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
8fd0102
add new types and exports
dmceachernmsft 5f1e236
planning comments
dmceachernmsft 4f7eced
add new component to storybook
dmceachernmsft f97ea92
storybook updates for new component
dmceachernmsft 1034054
build API files
dmceachernmsft bbda291
update logic to show new component in composite
dmceachernmsft 4c0c466
Change files
dmceachernmsft 76e1be9
Duplicate change files for beta release
dmceachernmsft 60f2046
Update @azure-communication-react-0c042af8-f59d-4af5-a8ed-26ff9ea334f…
dmceachernmsft 89b3a03
Update @azure-communication-react-0c042af8-f59d-4af5-a8ed-26ff9ea334f…
dmceachernmsft 98e5fce
Merge branch 'main' into dmceachernmsft/unsupported-browser-version
dmceachernmsft 917dfd6
fix lint
dmceachernmsft ea31277
fix cc issues
dmceachernmsft dc0a89c
Merge branch 'main' into dmceachernmsft/unsupported-browser-version
dmceachernmsft 30631fa
refactor to use Child component
dmceachernmsft c68fc57
Merge branch 'dmceachernmsft/unsupported-browser-version' of https://…
dmceachernmsft 5855626
Merge branch 'main' into dmceachernmsft/unsupported-browser-version
dmceachernmsft 2b1ba58
Merge branch 'main' into dmceachernmsft/unsupported-browser-version
dmceachernmsft 70447d6
update for comments
dmceachernmsft 05c615a
fix cc issues
dmceachernmsft 789939b
Merge branch 'main' into dmceachernmsft/unsupported-browser-version
dmceachernmsft 99af1f0
fix cc issues
dmceachernmsft 35a738d
Merge branch 'main' into dmceachernmsft/unsupported-browser-version
dmceachernmsft b37a79e
Merge branch 'main' into dmceachernmsft/unsupported-browser-version
dmceachernmsft e9b7297
updates per comments
dmceachernmsft b5fdf8d
Merge branch 'main' into dmceachernmsft/unsupported-browser-version
dmceachernmsft 3ebabd4
Merge branch 'main' into dmceachernmsft/unsupported-browser-version
dmceachernmsft e07e79e
flip storybook default behavior
dmceachernmsft File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
change-beta/@azure-communication-react-0c042af8-f59d-4af5-a8ed-26ff9ea334f1.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "prerelease", | ||
| "comment": "Introduce UI to inform the user that their browser version is out of date.", | ||
| "packageName": "@azure/communication-react", | ||
| "email": "94866715+dmceachernmsft@users.noreply.github.com", | ||
| "dependentChangeType": "patch" | ||
| } |
7 changes: 7 additions & 0 deletions
7
change/@azure-communication-react-0c042af8-f59d-4af5-a8ed-26ff9ea334f1.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "type": "prerelease", | ||
| "comment": "Introduce UI to inform the user that their browser version is out of date.", | ||
| "packageName": "@azure/communication-react", | ||
| "email": "94866715+dmceachernmsft@users.noreply.github.com", | ||
| "dependentChangeType": "patch" | ||
| } |
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
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
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
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
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
43 changes: 43 additions & 0 deletions
43
packages/react-components/src/components/UnsupportedBrowserVersion.tsx
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT license. | ||
|
|
||
| import { _pxToRem } from '@internal/acs-ui-common'; | ||
| import React from 'react'; | ||
| import { UnsupportedEnvironment } from './UnsupportedEnvironment'; | ||
|
|
||
| /** | ||
| * Strings for UnsupportedBrowser component | ||
| * | ||
| * @beta | ||
| */ | ||
| export interface UnsupportedBrowserVersionStrings { | ||
| /** String for the primary text */ | ||
| primaryText: string; | ||
| /** String for the secondary text */ | ||
| secondaryText: string; | ||
| /** String to display in the text for the help link */ | ||
| moreHelpText: string; | ||
| } | ||
|
|
||
| /** | ||
| * props for {@link UnsupportedBrowserVersion} UI | ||
| * | ||
| * @beta | ||
| */ | ||
| export interface UnsupportedBrowserVersionProps { | ||
| /** Handler to perform an action when the help link is actioned */ | ||
| onTroubleshootingClick?: () => void; | ||
| /** String overrides for the component */ | ||
| strings: UnsupportedBrowserVersionStrings; | ||
| } | ||
|
|
||
| /** | ||
| * UI to display to the user that the browser version they are using is out of date | ||
| * and not supported by Azure Communications Calling service. | ||
| * | ||
| * @beta | ||
| */ | ||
| export const UnsupportedBrowserVersion = (props: UnsupportedBrowserVersionProps): JSX.Element => { | ||
| const { onTroubleshootingClick, strings } = props; | ||
| return <UnsupportedEnvironment onTroubleshootingClick={onTroubleshootingClick} strings={strings} />; | ||
| }; | ||
78 changes: 78 additions & 0 deletions
78
packages/react-components/src/components/UnsupportedEnvironment.tsx
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT license. | ||
|
|
||
| /* @conditional-compile-remove(unsupported-browser) */ | ||
| import { Icon, Link, Stack, Text } from '@fluentui/react'; | ||
| /* @conditional-compile-remove(unsupported-browser) */ | ||
| import { _pxToRem } from '@internal/acs-ui-common'; | ||
| import React from 'react'; | ||
| /* @conditional-compile-remove(unsupported-browser) */ | ||
| import { | ||
| containerStyles, | ||
| iconStyles, | ||
| linkTextStyles, | ||
| mainTextStyles, | ||
| secondaryTextStyles | ||
| } from './styles/UnsupportedEnvironment.styles'; | ||
|
|
||
| /** | ||
| * @private | ||
| */ | ||
| export interface UnsupportedEnvironmentStrings { | ||
| /** String for the primary text */ | ||
| primaryText: string; | ||
| /** String for the secondary text */ | ||
| secondaryText: string; | ||
| /** String to display in the text for the help link */ | ||
| moreHelpText: string; | ||
| } | ||
|
|
||
| /** | ||
| * props for {@link UnsupportedEnvironment} UI | ||
| * | ||
| * @private | ||
| */ | ||
| export interface UnsupportedEnvironmentProps { | ||
| /** Handler to perform a action when the help link is actioned */ | ||
| onTroubleshootingClick?: () => void; | ||
| /** String overrides for the component */ | ||
| strings: UnsupportedEnvironmentStrings; | ||
| } | ||
|
|
||
| /* @conditional-compile-remove(unsupported-browser) */ | ||
| const UnsupportedEnvironmentContainer = (props: UnsupportedEnvironmentProps): JSX.Element => { | ||
| const { onTroubleshootingClick, strings } = props; | ||
| return ( | ||
| <Stack styles={containerStyles}> | ||
| <Icon | ||
| styles={iconStyles} | ||
| iconName="UnsupportedEnvironmentWarning" | ||
| data-ui-id="unsupported-environment-icon" | ||
| ></Icon> | ||
| <Text styles={mainTextStyles}>{strings.primaryText}</Text> | ||
| <Text styles={secondaryTextStyles}>{strings.secondaryText}</Text> | ||
| {onTroubleshootingClick && ( | ||
| <Link | ||
| styles={linkTextStyles} | ||
| onClick={() => { | ||
| onTroubleshootingClick(); | ||
| }} | ||
| data-ui-id="unsupported-environment-link" | ||
| > | ||
| {strings.moreHelpText} | ||
| </Link> | ||
| )} | ||
| </Stack> | ||
| ); | ||
| }; | ||
|
|
||
| /** | ||
| * UI to display to the user that the browser they are using is not supported by calling application. | ||
| * | ||
| * @private | ||
| */ | ||
| export const UnsupportedEnvironment = (props: UnsupportedEnvironmentProps): JSX.Element => { | ||
| /* @conditional-compile-remove(unsupported-browser) */ | ||
| return <UnsupportedEnvironmentContainer {...props} />; | ||
| return <></>; | ||
| }; |
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.