Skip to content

Commit 73b4290

Browse files
committed
Merge branch 'feat/fluent-v9-upgrade' of https://github.com/microsoftgraph/microsoft-graph-explorer-v4 into feat/fluent-v9-upgrade
2 parents 9553ebc + 7a9b2bd commit 73b4290

File tree

18 files changed

+170
-101
lines changed

18 files changed

+170
-101
lines changed

src/app/views/app-sections/StatusMessages.tsx

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ const intentMap: { [key: string]: MessageBarIntent } = {
1616

1717
const StatusMessages = () => {
1818
const dispatch = useAppDispatch();
19-
const queryRunnerStatus = useAppSelector((state)=> state.queryRunnerStatus);
20-
const sampleQuery = useAppSelector((state)=> state.sampleQuery);
19+
const queryRunnerStatus = useAppSelector((state) => state.queryRunnerStatus);
20+
const sampleQuery = useAppSelector((state) => state.sampleQuery);
2121

2222
function setQuery(link: string) {
2323
const query: IQuery = { ...sampleQuery };
@@ -27,26 +27,26 @@ const StatusMessages = () => {
2727
dispatch(setSampleQuery(query));
2828
}
2929

30-
if (queryRunnerStatus) {
31-
const { messageBarType, statusText, status, duration, hint } = queryRunnerStatus; return <MessageBar
32-
intent={intentMap[messageBarType]}
33-
politeness='assertive'
34-
>
35-
<MessageBarBody>
36-
<MessageDisplay message={`**${statusText} - **${status.toString()}`} onSetQuery={setQuery} />
37-
38-
{duration && <>
39-
{` - ${duration} ${translateMessage('milliseconds')}`}
40-
</>}
30+
if (
31+
!queryRunnerStatus?.status ||
32+
typeof queryRunnerStatus.status === 'string' && queryRunnerStatus.status.trim() === ''
33+
) {
34+
return <div />;
35+
}
4136

37+
const { messageBarType, statusText, status, duration, hint } = queryRunnerStatus;
38+
return (
39+
<MessageBar intent={intentMap[messageBarType]} politeness='assertive'>
40+
<MessageBarBody>
41+
<MessageDisplay message={`**${statusText} - **${status}`} onSetQuery={setQuery} />
42+
{duration && <> - {duration} {translateMessage('milliseconds')}</>}
4243
{status === 403 && <>
4344
{translateMessage('consent to scopes')}
4445
<span style={{ fontWeight: 600 }}>
4546
{translateMessage('modify permissions')}
4647
</span>
4748
{translateMessage('tab')}
4849
</>}
49-
5050
{hint && <div>{hint}</div>}
5151
</MessageBarBody>
5252
<MessageBarActions
@@ -59,9 +59,8 @@ const StatusMessages = () => {
5959
/>
6060
}
6161
/>
62-
</MessageBar>;
63-
}
64-
return <div />;
65-
}
62+
</MessageBar>
63+
);
64+
};
6665

67-
export default StatusMessages;
66+
export default StatusMessages;

src/app/views/authentication/auth-util-components/ProfileButton.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@ import { ProfileV9 } from '../profile/Profile';
66
export const PersonaSignIn = (props: Partial<PersonaProps>) => {
77
return (
88
<Persona
9+
aria-hidden={true}
910
presence={{ status: 'offline' }}
1011
{...props}
1112
/>
1213
);
1314
};
1415

1516
const SignInButton = ({signIn}: {signIn: ()=> void})=>{
16-
const styles = useHeaderStyles()
17+
const styles = useHeaderStyles();
1718
return (
1819
<Tooltip
1920
content={translateMessage('sign in')}

src/app/views/common/popups/DrawerWrapper.tsx

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ import {
77
DrawerHeaderTitle,
88
Button,
99
Spinner,
10-
makeStyles
10+
makeStyles,
11+
Tooltip
1112
} from '@fluentui/react-components';
1213
import { ArrowLeft24Regular, Dismiss24Regular } from '@fluentui/react-icons';
1314

@@ -66,22 +67,28 @@ export function DrawerWrapper(props: WrapperProps) {
6667
>
6768
<DrawerHeader>
6869
<DrawerHeaderTitle action={
69-
<Button
70-
icon={<Dismiss24Regular />}
71-
appearance='subtle'
72-
onClick={() => dismissPopup()}
73-
aria-label={translateMessage('Close')}
74-
/>
75-
76-
}>
77-
{showBackButton && (
70+
<Tooltip
71+
content={translateMessage('Close')} relationship='label'>
7872
<Button
79-
icon={<ArrowLeft24Regular />}
73+
icon={<Dismiss24Regular />}
8074
appearance='subtle'
8175
onClick={() => dismissPopup()}
82-
aria-label={translateMessage('Back')}
83-
className={drawerStyles.button}
76+
aria-label={translateMessage('Close')}
8477
/>
78+
</Tooltip>
79+
}>
80+
{showBackButton && (
81+
<Tooltip
82+
content={translateMessage('Back')}
83+
relationship='label'>
84+
<Button
85+
icon={<ArrowLeft24Regular />}
86+
appearance='subtle'
87+
onClick={() => dismissPopup()}
88+
aria-label={translateMessage('Back')}
89+
className={drawerStyles.button}
90+
/>
91+
</Tooltip>
8592
)}
8693
{title || ''}
8794
</DrawerHeaderTitle>

src/app/views/layout/LayoutResizeHandler.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,14 @@ export const LayoutResizeHandler = React.forwardRef<HTMLDivElement, HandleProps>
6464
ref={ref}
6565
onClick={handleClick}
6666
onMouseDown={onMouseDown}
67-
tabIndex={0}
67+
tabIndex={-1}
6868
className={hoverStyles}
6969
style={{
7070
position: 'absolute',
7171
borderRadius: '2px',
7272
...positioningProps
7373
}}
74+
aria-hidden={true}
7475
/>
7576
);
7677
}

src/app/views/main-header/FeedbackButton.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ const FeedbackButton = ()=>{
3131
<>
3232
<Tooltip content={translateMessage('Feedback')} relationship="description">
3333
<Button
34+
aria-label={translateMessage('Feedback')}
3435
onClick={activateSurvey}
3536
className={styles.iconButton} appearance="subtle" icon={<PersonFeedback20Regular />} />
3637
</Tooltip>

src/app/views/main-header/Help.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ const Help = ()=>{
3535
<Tooltip content={translateMessage('Help')} relationship="description">
3636
<MenuTrigger disableButtonEnhancement>
3737
<Button
38+
aria-label={translateMessage('Help')}
3839
onClick={trackHelpButtonClickEvent}
3940
className={styles.iconButton} appearance="subtle" icon={<ChatHelp20Regular />} />
4041
</MenuTrigger>

src/app/views/main-header/settings/Settings.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ const Settings = ()=>{
4242
<Tooltip content={translateMessage('Settings')} relationship="description">
4343
<MenuTrigger disableButtonEnhancement>
4444
<Button
45+
aria-label={translateMessage('Settings')}
4546
onClick={trackSettingsButtonClickEvent}
4647
className={styles.iconButton} appearance="subtle" icon={<Settings20Regular />} />
4748
</MenuTrigger>

src/app/views/query-response/QueryResponse.tsx

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ import {
66
DialogSurface,
77
DialogTrigger,
88
makeStyles,
9-
tokens
9+
tokens,
10+
Tooltip
1011
} from '@fluentui/react-components';
1112
import { DismissRegular, ExpandUpLeftRegular } from '@fluentui/react-icons';
1213
import { useState } from 'react';
1314
import { GetPivotItems } from './pivot-items/pivot-item';
15+
import { translateMessage } from '../../utils/translate-messages';
1416

1517
const useStyles = makeStyles({
1618
container: {
@@ -45,13 +47,15 @@ const PivotItemsDialog = () => {
4547

4648
return (
4749
<div>
48-
<Button
49-
appearance='transparent'
50-
icon={<ExpandUpLeftRegular />}
51-
aria-label='Expand'
52-
className={styles.dialogBtn}
53-
onClick={() => setOpen(true)}
54-
/>
50+
<Tooltip content={translateMessage('Expand')} relationship='label'>
51+
<Button
52+
appearance='transparent'
53+
icon={<ExpandUpLeftRegular />}
54+
aria-label={translateMessage('Expand')}
55+
className={styles.dialogBtn}
56+
onClick={() => setOpen(true)}
57+
/>
58+
</Tooltip>
5559
<Dialog open={open} onOpenChange={(_event, data) => setOpen(data.open)}>
5660
<DialogSurface className={styles.dialog}>
5761
<DialogBody>
@@ -60,13 +64,15 @@ const PivotItemsDialog = () => {
6064
</DialogContent>
6165
</DialogBody>
6266
<DialogTrigger disableButtonEnhancement>
63-
<Button
64-
appearance='transparent'
65-
icon={<DismissRegular />}
66-
aria-label='Collapse'
67-
className={styles.dismissBtn}
68-
onClick={() => setOpen(false)}
69-
/>
67+
<Tooltip relationship='label' content={translateMessage('Close')}>
68+
<Button
69+
appearance='transparent'
70+
icon={<DismissRegular />}
71+
aria-label={translateMessage('Close')}
72+
className={styles.dismissBtn}
73+
onClick={() => setOpen(false)}
74+
/>
75+
</Tooltip>
7076
</DialogTrigger>
7177
</DialogSurface>
7278
</Dialog>

src/app/views/query-response/pivot-items/pivot-item.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ const useStyles = makeStyles({
5050
height: '100%',
5151
overflow: 'hidden'
5252
},
53+
tabList:{
54+
padding: '5px 5px'
55+
},
5356
tabContent: {
5457
flex: 1,
5558
display: 'flex',
@@ -137,7 +140,7 @@ export const GetPivotItems = () => {
137140
</TabList>
138141
</Overflow>
139142
) : (
140-
<TabList selectedValue={selectedValue} onTabSelect={onTabSelect} size='small'>
143+
<TabList selectedValue={selectedValue} onTabSelect={onTabSelect} size='small' className={styles.tabList}>
141144
{tabs.map((tab) => (
142145
<Tab key={tab.id} value={tab.id} icon={tab.icon}>
143146
{tab.name}

src/app/views/query-response/response/ResponseDisplay.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const ResponseDisplay = (props: ResponseDisplayProps) => {
2323
default:
2424
if (isImageResponse(contentType) && typeof body !== 'string') {
2525
return (
26-
<Image styles={{ padding: '10px', height: '300px', width: '300px' }} body={body} alt='profile image' />
26+
<Image styles={{ padding: '10px', height: '240px', width: '240px' }} body={body} alt='profile image' />
2727
);
2828
}
2929
return (

0 commit comments

Comments
 (0)