From 5eb2074cc416ca6a53ea97e99955a9044848931d Mon Sep 17 00:00:00 2001 From: Elinor Date: Tue, 12 Jul 2022 20:49:35 +0300 Subject: [PATCH] Fix: Update link classes (#1902) --- package-lock.json | 19 ++++++++++++++++--- src/app/views/App.styles.ts | 3 --- src/app/views/App.tsx | 2 +- .../views/app-sections/HeaderMessaging.tsx | 6 +++--- src/app/views/app-sections/StatusMessages.tsx | 4 ++-- .../views/app-sections/TermsOfUseMessage.tsx | 8 +++----- .../adaptive-cards/AdaptiveCard.tsx | 4 ++-- .../graph-toolkit/GraphToolkit.tsx | 6 ++---- .../response/ResponseMessages.tsx | 6 +++--- .../request/permissions/TabList.tsx | 2 +- .../sidebar/sample-queries/SampleQueries.tsx | 2 +- 11 files changed, 34 insertions(+), 28 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1beed2d10..e1eadf6be 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3758,6 +3758,19 @@ "dev": true, "requires": { "@types/react": "*" + }, + "dependencies": { + "@types/react": { + "version": "17.0.30", + "resolved": "https://registry.npmjs.org/@types/react/-/react-17.0.30.tgz", + "integrity": "sha512-3Dt/A8gd3TCXi2aRe84y7cK1K8G+N9CZRDG8kDGguOKa0kf/ZkSwTmVIDPsm/KbQOVMaDJXwhBtuOXxqwdpWVg==", + "dev": true, + "requires": { + "@types/prop-types": "*", + "@types/scheduler": "*", + "csstype": "^3.0.2" + } + } } } } @@ -5351,7 +5364,7 @@ "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", "dev": true }, "at-least-node": { @@ -12910,7 +12923,7 @@ "lz-string": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.4.4.tgz", - "integrity": "sha512-0ckx7ZHRPqb0oUm8zNr+90mtf9DQB60H1wMCjBtfi62Kl3a7JbHob6gA2bC+xRvZoOL+1hzUK8jeuEIQE8svEQ==", + "integrity": "sha1-wNjq82BZ9wV5bh40SBHPTEmNOiY=", "dev": true }, "magic-string": { @@ -16908,4 +16921,4 @@ "dev": true } } -} +} \ No newline at end of file diff --git a/src/app/views/App.styles.ts b/src/app/views/App.styles.ts index 2f58ee038..bb5e61fd6 100644 --- a/src/app/views/App.styles.ts +++ b/src/app/views/App.styles.ts @@ -42,9 +42,6 @@ export const appStyles = (theme: ITheme) => { separator: { borderBottom: '1px solid ' + theme.palette.neutralLight }, - links: { - color: `${theme.palette.blueMid} !important` - }, sidebarToggle: { marginBottom: theme.spacing.s1, marginTop: theme.spacing.s1 diff --git a/src/app/views/App.tsx b/src/app/views/App.tsx index 17b75abb3..40076b7bb 100644 --- a/src/app/views/App.tsx +++ b/src/app/views/App.tsx @@ -442,7 +442,7 @@ class App extends Component { )} {graphExplorerMode === Mode.TryIt && - headerMessaging(classes, query)} + headerMessaging(query)} {displayContent && (

, - + .

@@ -28,7 +28,7 @@ export function headerMessaging(classes: any, query: string): React.ReactNode {

, - + .

diff --git a/src/app/views/app-sections/StatusMessages.tsx b/src/app/views/app-sections/StatusMessages.tsx index 086c6c37c..db15298d9 100644 --- a/src/app/views/app-sections/StatusMessages.tsx +++ b/src/app/views/app-sections/StatusMessages.tsx @@ -31,9 +31,9 @@ const StatusMessages = () => { const link = urls[part]; if (link) { if (link.includes(GRAPH_URL)) { - return setQuery(link)}>{link}; + return setQuery(link)}>{link}; } - return {link}; + return {link}; } }; return ( diff --git a/src/app/views/app-sections/TermsOfUseMessage.tsx b/src/app/views/app-sections/TermsOfUseMessage.tsx index 82cedfd50..ccae800d8 100644 --- a/src/app/views/app-sections/TermsOfUseMessage.tsx +++ b/src/app/views/app-sections/TermsOfUseMessage.tsx @@ -7,15 +7,13 @@ import { geLocale } from '../../../appLocale'; import { componentNames, telemetry } from '../../../telemetry'; import { IRootState } from '../../../types/root'; import { clearTermsOfUse } from '../../services/actions/terms-of-use-action-creator'; -import { classNames } from '../classnames'; import { appStyles } from '../App.styles'; -const styledTermsOfUseMessage = (props: any) => { +const styledTermsOfUseMessage = () => { const { termsOfUse } = useSelector((state: IRootState) => state); - const classes = classNames(props); const dispatch = useDispatch(); if (termsOfUse) { return { telemetry.trackLinkClickEvent(e.currentTarget.href, componentNames.MICROSOFT_APIS_TERMS_OF_USE_LINK)} - className={classes.links} href={'https://docs.microsoft.com/' + geLocale + + className={'ms-Link'} href={'https://docs.microsoft.com/' + geLocale + '/legal/microsoft-apis/terms-of-use?context=graph/context'} target='_blank' rel='noopener noreferrer'> . telemetry.trackLinkClickEvent(e.currentTarget.href, componentNames.MICROSOFT_PRIVACY_STATEMENT_LINK)} - className={classes.links} href={'https://privacy.microsoft.com/' + geLocale + '/privacystatement'} + className={'ms-Link'} href={'https://privacy.microsoft.com/' + geLocale + '/privacystatement'} target='_blank' rel='noopener noreferrer'> . ; diff --git a/src/app/views/query-response/adaptive-cards/AdaptiveCard.tsx b/src/app/views/query-response/adaptive-cards/AdaptiveCard.tsx index ef1566ba3..77089e8b3 100644 --- a/src/app/views/query-response/adaptive-cards/AdaptiveCard.tsx +++ b/src/app/views/query-response/adaptive-cards/AdaptiveCard.tsx @@ -140,7 +140,7 @@ class AdaptiveCard extends Component { target='_blank' rel='noopener noreferrer' tabIndex={0} - className={classes.link} + className={'ms-Link'} > @@ -149,7 +149,7 @@ class AdaptiveCard extends Component { target='_blank' rel='noopener noreferrer' tabIndex={0} - className={classes.link} + className={'ms-Link'} > diff --git a/src/app/views/query-response/graph-toolkit/GraphToolkit.tsx b/src/app/views/query-response/graph-toolkit/GraphToolkit.tsx index 504804edb..4decfa157 100644 --- a/src/app/views/query-response/graph-toolkit/GraphToolkit.tsx +++ b/src/app/views/query-response/graph-toolkit/GraphToolkit.tsx @@ -13,7 +13,6 @@ import { } from '@fluentui/react'; import { lookupToolkitUrl } from '../../../utils/graph-toolkit-lookup'; import { componentNames, telemetry } from '../../../../telemetry'; -import { classNames } from '../../classnames'; import { queryResponseStyles } from '../queryResponse.styles'; import { IRootState } from '../../../../types/root'; import { translateMessage } from '../../../utils/translate-messages'; @@ -29,7 +28,6 @@ class GraphToolkit extends Component { public render() { const { sampleQuery } = this.props; const { toolkitUrl, exampleUrl } = lookupToolkitUrl(sampleQuery); - const classes = classNames(this.props); if (toolkitUrl && exampleUrl) { return ( @@ -40,7 +38,7 @@ class GraphToolkit extends Component { onClick={(e) => telemetry.trackLinkClickEvent(e.currentTarget.href, componentNames.GRAPH_TOOLKIT_PLAYGROUND_LINK)} tabIndex={0} href={exampleUrl} target='_blank' rel='noopener noreferrer' - className={classes.link}> + className={'ms-Link'}> . @@ -55,7 +53,7 @@ class GraphToolkit extends Component {   : @odata.{odataLink.name} - setQuery()}> + setQuery()}>   @@ -68,7 +68,7 @@ export function responseMessages(
- +   @@ -82,7 +82,7 @@ export function responseMessages(
- + . diff --git a/src/app/views/query-runner/request/permissions/TabList.tsx b/src/app/views/query-runner/request/permissions/TabList.tsx index e36c15202..af6c2dade 100644 --- a/src/app/views/query-runner/request/permissions/TabList.tsx +++ b/src/app/views/query-runner/request/permissions/TabList.tsx @@ -32,7 +32,7 @@ const TabList = ({ columns, classes, renderItemColumn, renderDetailsHeader, maxH const displayNoPermissionsFoundMessage = () : JSX.Element => { return ( telemetry.trackLinkClickEvent(e.currentTarget.href, componentNames.MICROSOFT_GRAPH_API_REFERENCE_DOCS_LINK)} href={`https://docs.microsoft.com/${geLocale}/graph/api/overview?view=graph-rest-1.0`}