-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
No Scheduling page when bookings link is empty (#138)
* frequently asked questions * moving styles * review comments
- Release/1.3.0
- Release/1.2.5
- Release/1.2.4
- Nightly/202502082305
- Nightly/202502072305
- Nightly/202501212305
- Nightly/202304112302
- Nightly/202304012301
- Nightly/202303312301
- Nightly/202303292302
- Nightly/202212222302
- Nightly/202212212302
- Nightly/202212202320
- Nightly/202212202302
- Nightly/202212122301
- Nightly/202212082302
- Nightly/202212082021
- Nightly/202212080036
- Nightly/202212062302
- Nightly/202212052302
- Nightly/202212022301
- Nightly/202211292302
- Nightly/202211252301
- Nightly/202211232301
- 1.3.0
- 1.3.0-nightly-202502082305.0
- 1.3.0-nightly-202502072305.0
- 1.3.0-nightly-202501212305.0
- 1.2.5
- 1.2.5-nightly-202304112302.0
- 1.2.4
- 1.2.4-nightly-202304012301.0
- 1.2.4-nightly-202303312301.0
- 1.2.4-nightly-202303292302.0
- 1.2.4-nightly-202212222302.0
- 1.2.3-nightly-202212212302.0
- 1.2.2-nightly-202212202320.0
- 1.2.2-nightly-202212202302.0
- 1.2.2-nightly-202212122301.0
- 1.2.2-nightly-202212082302.0
- 1.2.2-nightly-202212082021.0
- 1.2.2-nightly-202212080036.0
- 1.2.2-nightly-202212062302.0
- 1.2.2-nightly-202212052302.0
- 1.2.2-nightly-202212022301.0
- 1.2.2-nightly-202211292302.0
- 1.2.2-nightly-202211252301.0
- 1.2.2-nightly-202211232301.0
1 parent
88245d7
commit e422878
Showing
6 changed files
with
302 additions
and
19 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Book should match snapshot when bookings link is empty 1`] = ` | ||
<div | ||
className="body-118" | ||
style={ | ||
Object { | ||
"height": "100%", | ||
} | ||
} | ||
> | ||
<div | ||
className="ms-Stack css-119" | ||
> | ||
<div | ||
className="ms-Stack css-120" | ||
> | ||
<div> | ||
<button | ||
aria-label="Menu Button" | ||
className="ms-Button ms-Button--icon root-121" | ||
data-is-focusable={true} | ||
id="waffle-menu" | ||
onClick={[Function]} | ||
onKeyDown={[Function]} | ||
onKeyPress={[Function]} | ||
onKeyUp={[Function]} | ||
onMouseDown={[Function]} | ||
onMouseUp={[Function]} | ||
type="button" | ||
> | ||
<span | ||
className="ms-Button-flexContainer flexContainer-122" | ||
data-automationid="splitbuttonprimary" | ||
> | ||
<i | ||
aria-hidden={true} | ||
className="ms-Icon root-105 ms-Button-icon icon-124" | ||
data-icon-name="Waffle" | ||
style={ | ||
Object { | ||
"fontFamily": undefined, | ||
} | ||
} | ||
/> | ||
</span> | ||
</button> | ||
</div> | ||
<span | ||
className="css-128" | ||
> | ||
</span> | ||
</div> | ||
<div | ||
className="ms-Stack css-129" | ||
> | ||
<div | ||
className="ms-Stack css-130" | ||
> | ||
<div | ||
className="ms-Stack css-131" | ||
> | ||
<span | ||
className="css-132" | ||
> | ||
No scheduling configured | ||
</span> | ||
<span | ||
className="css-133" | ||
> | ||
This sample does not have a Microsoft Bookings page configured. | ||
</span> | ||
<span | ||
className="css-134" | ||
> | ||
Frequently asked questions | ||
</span> | ||
<div | ||
className="ms-Stack css-135" | ||
> | ||
<a | ||
className="ms-Link root-136" | ||
href="https://aka.ms/virtual-appointments-sample-bookings" | ||
onClick={[Function]} | ||
tabIndex={0} | ||
target="_blank" | ||
> | ||
<div | ||
className="ms-Stack css-137" | ||
> | ||
<div | ||
className="ms-StackItem css-138" | ||
style={ | ||
Object { | ||
"fontFamily": "sf pro text", | ||
"fontSize": ".9375rem", | ||
"fontWeight": "400", | ||
"letterSpacing": "-0.015rem", | ||
"lineHeight": "1.25rem", | ||
"paddingRight": ".5rem", | ||
"textDecoration": "underline", | ||
"verticalAlign": "bottom", | ||
} | ||
} | ||
> | ||
How do I change my Microsoft Bookings page URL? | ||
</div> | ||
<div | ||
className="ms-StackItem css-138" | ||
style={ | ||
Object { | ||
"textDecoration": "none", | ||
} | ||
} | ||
> | ||
<span | ||
style={ | ||
Object { | ||
"alignItems": "center", | ||
"display": "flex", | ||
} | ||
} | ||
> | ||
<i | ||
aria-hidden={true} | ||
className="root-105" | ||
data-icon-name="OpenInNewWindow" | ||
/> | ||
</span> | ||
</div> | ||
</div> | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
`; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT license. | ||
|
||
import { LayerHost } from '@fluentui/react'; | ||
import { BOOKINGS_SPECIMEN_URL } from '../../utils/Constants'; | ||
import WarningBanner from './WarningBanner'; | ||
import { AppConfigModel } from '../../models/ConfigModel'; | ||
import { embededIframeStyles } from '../../styles/Book.styles'; | ||
|
||
const PARENT_ID = 'BookMeetingSection'; | ||
|
||
interface BookingsPageProps { | ||
config: AppConfigModel; | ||
} | ||
|
||
export const BookingsPage = (props: BookingsPageProps): JSX.Element => { | ||
return ( | ||
<LayerHost | ||
id={PARENT_ID} | ||
style={{ | ||
position: 'relative', | ||
height: '100%' | ||
}} | ||
> | ||
{props.config.microsoftBookingsUrl === BOOKINGS_SPECIMEN_URL ? <WarningBanner /> : <></>} | ||
<iframe src={props.config.microsoftBookingsUrl} scrolling="yes" style={embededIframeStyles}></iframe> | ||
</LayerHost> | ||
); | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT license. | ||
import { | ||
containerStyles, | ||
fullScreenStyles, | ||
innerContainer, | ||
lineHeight22px, | ||
lineHeight28px | ||
} from '../../styles/Book.styles'; | ||
import { Stack, Text } from '@fluentui/react'; | ||
import { FrequentlyAskedQuestions } from '../FrequentlyAskedQuestions'; | ||
import { AppConfigModel } from '../../models/ConfigModel'; | ||
|
||
interface NoSchedulingPageProps { | ||
config: AppConfigModel; | ||
} | ||
|
||
export const NoSchedulingPage = (props: NoSchedulingPageProps): JSX.Element => { | ||
return ( | ||
<Stack styles={fullScreenStyles}> | ||
<Stack horizontalAlign="center" styles={containerStyles(props.config.theme)} tokens={{ childrenGap: 15 }}> | ||
<Stack styles={innerContainer}> | ||
<Text styles={lineHeight28px}>No scheduling configured</Text> | ||
<Text styles={lineHeight22px}>This sample does not have a Microsoft Bookings page configured.</Text> | ||
<FrequentlyAskedQuestions /> | ||
</Stack> | ||
</Stack> | ||
</Stack> | ||
); | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,47 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT license. | ||
|
||
import { PartialTheme, Theme } from '@fluentui/theme'; | ||
|
||
export const embededIframeStyles = { | ||
width: '100%', | ||
height: '100%', | ||
border: '0px' | ||
}; | ||
|
||
export const fullScreenStyles = { | ||
root: { | ||
width: '100%', | ||
height: '100%' | ||
} | ||
}; | ||
|
||
export function containerStyles(theme: PartialTheme | Theme | undefined): any { | ||
return { | ||
root: { | ||
maxWidth: '64rem', | ||
width: '100%', | ||
height: '100%', | ||
display: 'flex', | ||
margin: 'auto', | ||
marginTop: '38px', | ||
backgroundColor: 'white', | ||
borderRadius: theme?.effects?.roundedCorner4 | ||
} | ||
}; | ||
} | ||
|
||
export const innerContainer = { | ||
root: { | ||
width: '600px', | ||
marginTop: '200px' | ||
} | ||
}; | ||
|
||
export const lineHeight28px = { | ||
root: { fontWeight: '600', fontSize: '20px', lineHeight: '28px' } | ||
}; | ||
|
||
export const lineHeight22px = { | ||
root: { fontWeight: '600', fontSize: '16px', lineHeight: '22px', marginBottom: '16px' } | ||
}; |