Skip to content

Commit 23cc91e

Browse files
authored
Merge branch 'main' into carocao/RTTCaptions
2 parents ff884e1 + 62022b5 commit 23cc91e

21 files changed

Lines changed: 276 additions & 39 deletions
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "patch",
3+
"area": "improvement",
4+
"workstream": "Eslint",
5+
"comment": "Fix Eslint errors for calling sample",
6+
"packageName": "@azure/communication-react",
7+
"email": "96077406+carocao-msft@users.noreply.github.com",
8+
"dependentChangeType": "patch"
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "patch",
3+
"area": "improvement",
4+
"workstream": "Eslint",
5+
"comment": "Fix Eslint errors for calling sample",
6+
"packageName": "@azure/communication-react",
7+
"email": "96077406+carocao-msft@users.noreply.github.com",
8+
"dependentChangeType": "patch"
9+
}

samples/Calling/eslint.config.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@ import { globalIgnores } from 'eslint/config';
1212
export default globalConfig([
1313
baseConfig,
1414
testFilesBaseConfig,
15-
{
16-
rules: {
17-
'jsdoc/require-jsdoc': 'off'
18-
}
19-
},
2015
baseGlobalIgnores,
2116
globalIgnores(['.babel*', 'webpack*'])
2217
]);

samples/Calling/src/app/App.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ initializeIcons();
4141

4242
type AppPages = 'home' | 'call';
4343

44+
/**
45+
* The main app component that renders the home screen or call screen based on the current page.
46+
* It fetches user credentials from the server and manages the state of the application.
47+
*/
4448
const App = (): JSX.Element => {
4549
const [page, setPage] = useState<AppPages>('home');
4650
// User credentials to join a call with - these are retrieved from the server

samples/Calling/src/app/styles/CallScreen.styles.ts

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,37 +3,60 @@
33

44
import { IStackItemStyles, IStackStyles } from '@fluentui/react';
55

6+
/**
7+
* Styles for the CallScreen component.
8+
* These styles are used to layout the call screen components.
9+
*/
610
export const headerStyles: IStackItemStyles = {
711
root: {
812
width: '100%'
913
}
1014
};
15+
16+
/**
17+
* Styles for the container of the call screen.
18+
* These styles ensure that the containers take up the full height and width of the screen.
19+
*/
1120
export const containerStyles: IStackStyles = {
1221
root: {
1322
height: '100%',
1423
width: '100%',
1524
overflow: 'hidden'
1625
}
1726
};
27+
/**
28+
* Styles for the sub-container of the call screen.
29+
* These styles ensure that the sub-containers take up the full height and width of the screen.
30+
*/
1831
export const subContainerStyles: IStackStyles = {
1932
root: {
2033
overflow: 'hidden',
2134
width: '100%',
2235
flexBasis: '0'
2336
}
2437
};
38+
/**
39+
* Styles for the pane of the call screen.
40+
* These styles ensure that the pane has a fixed width.
41+
*/
2542
export const paneStyles: IStackItemStyles = {
2643
root: {
2744
width: '17.875rem'
2845
}
2946
};
47+
/**
48+
* Styles for the active container of the call screen.
49+
* These styles ensure that the active container takes up the full height of the screen.
50+
*/
3051
export const activeContainerClassName: IStackItemStyles = {
3152
root: {
3253
display: 'flex',
3354
height: '100%'
3455
}
3556
};
36-
57+
/**
58+
* Styles for the loading spinner in the call screen.
59+
*/
3760
export const loadingStyle: IStackStyles = {
3861
root: {
3962
height: '100%',

samples/Calling/src/app/styles/DisplayNameField.styles.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,30 @@
33

44
import { mergeStyles } from '@fluentui/react';
55

6+
/**
7+
* Style properties for the TextField component's field group.
8+
* Controls the height of the input field.
9+
*/
610
export const TextFieldStyleProps = {
711
fieldGroup: {
812
height: '2.3rem'
913
}
1014
};
1115

16+
/**
17+
* Styles for the input box container.
18+
* Defines box sizing and border radius properties.
19+
*/
1220
export const inputBoxStyle = mergeStyles({
1321
boxSizing: 'border-box',
1422
borderRadius: '0.125rem'
1523
});
1624

25+
/**
26+
* Text styles for the input field and its placeholders.
27+
* Applies consistent font size, weight, and line height across
28+
* the input text and placeholders in different browsers.
29+
*/
1730
export const inputBoxTextStyle = mergeStyles({
1831
fontSize: '0.875rem',
1932
fontWeight: 600,

samples/Calling/src/app/styles/EndCall.styles.ts

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,46 +3,86 @@
33

44
import { IButtonStyles, IStackTokens, mergeStyles } from '@fluentui/react';
55

6+
/**
7+
* Style properties for the End Call component.
8+
* These styles are used to layout the end call screen components.
9+
*/
610
export const mainStackTokens: IStackTokens = {
711
childrenGap: '1rem'
812
};
13+
/**
14+
* Styles for the end call screen buttons stack.
15+
* These styles ensure that the buttons are spaced correctly.
16+
*/
917
export const buttonsStackTokens: IStackTokens = {
1018
childrenGap: '0.75rem'
1119
};
20+
/**
21+
* Styles for the end call screen buttons stack.
22+
* These styles ensure that the buttons are spaced correctly.
23+
*/
1224
export const upperStackTokens: IStackTokens = {
1325
childrenGap: '1.5rem'
1426
};
27+
/**
28+
* Styles for the end call screen bottom stack.
29+
* These styles ensure that the bottom stack is spaced correctly.
30+
*/
1531
export const bottomStackTokens: IStackTokens = {
1632
childrenGap: '1.4375rem'
1733
};
34+
/**
35+
* Styles for the end call screen container.
36+
* These styles ensure that the container takes up the full height and width of the screen.
37+
*/
1838
export const endCallContainerStyle = mergeStyles({
1939
height: '100%',
2040
width: '100% ',
2141
padding: '0.5rem', //half childrenGap from Stack
2242
minWidth: '21.625rem', // max of min-width from stack items + padding * 2 = 20.625 + 0.5 * 2
2343
minHeight: 'auto'
2444
});
45+
/**
46+
* Styles for the end call screen header.
47+
* These styles ensure that the header takes up the full width of the screen.
48+
*/
2549
export const endCallTitleStyle = mergeStyles({
2650
fontSize: '1.375rem',
2751
fontWeight: 600,
2852
width: '20rem'
2953
});
54+
/**
55+
* Styles for the end call screen button.
56+
* These styles ensure that the button text is styled correctly.
57+
*/
3058
export const buttonStyle = mergeStyles({
3159
fontWeight: 600,
3260
height: '2.5rem',
3361
width: '9.875rem',
3462
fontSize: '0.875rem', // 14px
3563
padding: 0
3664
});
65+
/**
66+
* Styles for the end call screen button with icon.
67+
* These styles ensure that the button text container is displayed correctly.
68+
*/
3769
export const buttonWithIconStyles: IButtonStyles = {
3870
textContainer: {
3971
display: 'contents'
4072
}
4173
};
74+
/**
75+
* Styles for the end call screen button icon.
76+
* These styles ensure that the icon is displayed correctly.
77+
*/
4278
export const videoCameraIconStyle = mergeStyles({
4379
marginRight: '0.375rem',
4480
fontSize: '1.375rem'
4581
});
82+
/**
83+
* Styles for the end call screen footer.
84+
* These styles ensure that the footer text is styled correctly.
85+
*/
4686
export const bottomStackFooterStyle = mergeStyles({
4787
fontSize: '0.875 rem'
4888
});

samples/Calling/src/app/styles/Footer.styles.ts

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,23 @@
22
// Licensed under the MIT License.
33

44
import { IButtonStyles, IStackStyles, IStackTokens, ITextFieldStyles, mergeStyles } from '@fluentui/react';
5-
5+
/**
6+
* Style properties for the pane footer component.
7+
*/
68
export const paneFooterStyles: IStackStyles = {
79
root: {
810
marginBottom: '1.25rem'
911
}
1012
};
11-
13+
/**
14+
* Style properties for the footer stack tokens.
15+
*/
1216
export const paneFooterTokens: IStackTokens = {
1317
childrenGap: '0.3125rem'
1418
};
15-
19+
/**
20+
* Style properties for the text field.
21+
*/
1622
export const textFieldStyles: Partial<ITextFieldStyles> = {
1723
field: {
1824
padding: 0
@@ -25,14 +31,19 @@ export const textFieldStyles: Partial<ITextFieldStyles> = {
2531
border: 'none'
2632
}
2733
};
28-
34+
/**
35+
* Style properties for the footer main text.
36+
*/
2937
export const footerMainTextStyle = mergeStyles({
3038
fontWeight: 600,
3139
fontSize: '1rem',
3240
marginLeft: '1rem',
3341
marginRight: '1rem'
3442
});
3543

44+
/**
45+
* Style properties for the copy link button.
46+
*/
3647
export const copyLinkButtonStyle = mergeStyles({
3748
fontWeight: 600,
3849
fontSize: '0.875rem', // 14px
@@ -42,12 +53,17 @@ export const copyLinkButtonStyle = mergeStyles({
4253
width: '90%'
4354
});
4455

56+
/**
57+
* Style properties for the button with icon.
58+
*/
4559
export const buttonWithIconStyles: IButtonStyles = {
4660
textContainer: {
4761
display: 'contents'
4862
}
4963
};
50-
64+
/**
65+
* Style properties for the copy icon.
66+
*/
5167
export const copyIconStyle = mergeStyles({
5268
marginRight: '0.5em'
5369
});

0 commit comments

Comments
 (0)