Skip to content

Commit

Permalink
Add storybook doc note to highlight that landscape is unsupported whe…
Browse files Browse the repository at this point in the history
…n formfactor is mobile (#1109)

* Adding info message to storybook about unsupported landscape mode

* Change files

* Adding docs to meeting composite
  • Loading branch information
anjulgarg authored Nov 18, 2021
1 parent 2583959 commit bb58f5a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Adding info message to storybook about unsupported landscape mode",
"packageName": "@internal/storybook",
"email": "[email protected]",
"dependentChangeType": "patch"
}
14 changes: 9 additions & 5 deletions packages/storybook/stories/CallComposite/CallCompositeDocs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
// Licensed under the MIT license.

import { CallComposite } from '@azure/communication-react';
import { Description, Heading, Props, Source, Title } from '@storybook/addon-docs';
import { MessageBar } from '@fluentui/react';
import { Description, Heading, Props, Source, Title, Canvas } from '@storybook/addon-docs';
import React from 'react';
// also exported from '@storybook/react' if you can deal with breaking changes in 6.1

Expand Down Expand Up @@ -62,12 +63,15 @@ export const getDocs: () => JSX.Element = () => {
<Heading>Running in a Mobile browser</Heading>
<Description>
CallComposite by default is optimized for desktop views. To provide an optimized mobile experience, you may set
the `formFactor` property to `"mobile"`. Currently the mobile form factor only supports Portrait orientation and
not Landscape. The CallComposite does not detect if it is running on mobile device vs desktop, instead you must
identify if your clients device is a mobile device and set the `formFactor` property to `"mobile"`. This prop
can be set at any time and immediately updates the composite UI to be optimized for a mobile device.
the `formFactor` property to `"mobile"`. The CallComposite does not detect if it is running on mobile device vs
desktop, instead you must identify if your clients device is a mobile device and set the `formFactor` property
to `"mobile"`. This prop can be set at any time and immediately updates the composite UI to be optimized for a
mobile device.
</Description>
<Source code={formFactorSnippet} />
<MessageBar>
Note: Only Protrait mode is supported when the `formFactor` is set to "mobile". Landscape mode is not supported.
</MessageBar>
<Description>
You can try out the form factor property in the [CallComposite Basic
Example](./?path=/story/composites-call-basicexample--basic-example).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

import { MessageBar } from '@fluentui/react';
import { Title, Description, Heading, Source } from '@storybook/addon-docs';
import React from 'react';

Expand Down Expand Up @@ -40,12 +41,15 @@ export const getDocs: () => JSX.Element = () => {
<Heading>Running in a Mobile browser</Heading>
<Description>
MeetingComposite by default is optimized for desktop views. To provide an optimized mobile experience, you may
set the `formFactor` property to `"mobile"`. Currently the mobile form factor only supports Portrait orientation
and not Landscape. The MeetingComposite does not detect if it is running on mobile device vs desktop, instead
you must identify if your clients device is a mobile device and set the `formFactor` property to `"mobile"`.
This prop can be set at any time and immediately updates the composite UI to be optimized for a mobile device.
set the `formFactor` property to `"mobile"`. The MeetingComposite does not detect if it is running on mobile
device vs desktop, instead you must identify if your clients device is a mobile device and set the `formFactor`
property to `"mobile"`. This prop can be set at any time and immediately updates the composite UI to be
optimized for a mobile device.
</Description>
<Source code={formFactorSnippet} />
<MessageBar>
Note: Only Protrait mode is supported when the `formFactor` is set to "mobile". Landscape mode is not supported.
</MessageBar>
<Description>
You can try out the form factor property in the [MeetingComposite Basic
Example](./?path=/story/composites-meeting-basicexample--basic-example).
Expand Down

0 comments on commit bb58f5a

Please sign in to comment.