Skip to content

Commit

Permalink
Chore (release): 6.2.0 (#1960)
Browse files Browse the repository at this point in the history
* Chore: reduce PR body content (#1937)

* Fix: Center method names on sample queries (#1940)

* Feature: Add PHP Snippets tab. (#1923)

* Fix: Return focus to feedback button (#1941)

* Task: July dependabot upgrades (#1920)

* Task: Add missing header telemetry (#1944)

* Fix: Remove pivot tooltips (#1952)

* Fix: Remove toggleCollapse string (#1951)

* Fix: Toolkit component scrolling  (#1946)

* Chore(deps): Bump terser from 5.13.1 to 5.14.2 (#1953)

* Fix: Use resources as a source of truth (#1956)

* Task: Add PHP docs link telemetry (#1961)

* Revert "Feature: Add PHP Snippets tab. (#1923)" (#1985)

* Fix: Disable sanitization of query url when sharing query (#1993)

* Bump version to 6.2.0
  • Loading branch information
github-actions[bot] authored Aug 3, 2022
1 parent e4a3615 commit 97ca0df
Show file tree
Hide file tree
Showing 17 changed files with 1,009 additions and 763 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/cut-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ jobs:
git fetch origin master --depth 100
git fetch origin dev --depth 100
masterPrBody=$(git rev-list --oneline $branchName ^origin/master)
devPrBody=$(git rev-list --oneline $branchName ^origin/dev)
masterPrBody=$(git rev-list v$currentVersion.. --oneline $branchName ^origin/master)
devPrBody=$(git rev-list v$currentVersion.. --oneline $branchName ^origin/dev)
echo 'masterPrBody<<END_OF_OUTPUT' >> $GITHUB_ENV
echo "$masterPrBody" >> $GITHUB_ENV
Expand Down
1,580 changes: 906 additions & 674 deletions package-lock.json

Large diffs are not rendered by default.

38 changes: 19 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"name": "graph-explorer-v2",
"version": "6.1.0",
"version": "6.2.0",
"private": true,
"dependencies": {
"@augloop/types-core": "file:packages/types-core-2.16.189.tgz",
"@axe-core/webdriverjs": "4.4.2",
"@azure/msal-browser": "2.23.0",
"@babel/core": "7.17.9",
"@babel/runtime": "7.18.3",
"@axe-core/webdriverjs": "4.4.3",
"@azure/msal-browser": "2.27.0",
"@babel/core": "7.18.6",
"@babel/runtime": "7.18.6",
"@fluentui/react": "8.72.1",
"@fluentui/react-icons-mdl2": "1.3.8",
"@microsoft/applicationinsights-react-js": "3.3.4",
"@microsoft/applicationinsights-web": "2.7.6",
"@microsoft/applicationinsights-web": "2.8.4",
"@microsoft/microsoft-graph-client": "3.0.2",
"@monaco-editor/react": "4.4.5",
"@ms-ofb/officebrowserfeedbacknpm": "file:packages/officebrowserfeedbacknpm-1.6.6.tgz",
Expand All @@ -30,18 +30,18 @@
"eslint-webpack-plugin": "3.1.1",
"express": "4.18.1",
"file-loader": "6.2.0",
"fork-ts-checker-webpack-plugin": "7.2.3",
"fork-ts-checker-webpack-plugin": "7.2.11",
"fs-extra": "10.1.0",
"guid-typescript": "1.0.9",
"isomorphic-fetch": "3.0.0",
"localforage": "1.10.0",
"mini-css-extract-plugin": "2.6.0",
"mini-css-extract-plugin": "2.6.1",
"monaco-editor": "0.33.0",
"monaco-editor-webpack-plugin": "7.0.1",
"office-ui-fabric-core": "11.0.0",
"office-ui-fabric-core": "11.0.1",
"postcss-flexbugs-fixes": "5.0.2",
"postcss-loader": "7.0.0",
"postcss-preset-env": "7.7.0",
"postcss-preset-env": "7.7.2",
"re-resizable": "6.9.9",
"react": "16.14.0",
"react-app-polyfill": "3.0.0",
Expand All @@ -54,10 +54,10 @@
"sass": "1.50.0",
"sass-loader": "12.6.0",
"style-loader": "3.3.1",
"typescript": "4.7.2",
"typescript": "4.7.4",
"url": "0.11.0",
"url-loader": "4.1.1",
"webpack": "5.72.1",
"webpack": "5.73.0",
"webpack-dev-server": "4.9.1",
"webpack-manifest-plugin": "5.0.0",
"workbox-webpack-plugin": "6.5.3"
Expand Down Expand Up @@ -86,7 +86,7 @@
],
"devDependencies": {
"@testing-library/react": "12.1.5",
"@testing-library/user-event": "14.1.1",
"@testing-library/user-event": "14.2.1",
"@types/chromedriver": "81.0.1",
"@types/enzyme": "3.10.11",
"@types/enzyme-adapter-react-16": "1.0.6",
Expand All @@ -101,26 +101,26 @@
"@types/redux-mock-store": "1.0.3",
"@types/selenium-webdriver": "4.1.1",
"@typescript-eslint/eslint-plugin": "5.22.0",
"@typescript-eslint/parser": "5.27.0",
"@typescript-eslint/parser": "5.30.5",
"acorn": "8.7.1",
"babel-jest": "28.1.0",
"babel-jest": "28.1.2",
"chromedriver": "101.0.0",
"enzyme": "3.11.0",
"enzyme-adapter-react-16": "1.15.6",
"eslint": "8.12.0",
"html-webpack-plugin": "5.5.0",
"jest": "28.1.0",
"jest-environment-jsdom": "28.1.0",
"jest-environment-jsdom": "28.1.2",
"jest-fetch-mock": "3.0.3",
"jest-sonar-reporter": "2.0.0",
"jest-watch-typeahead": "1.0.0",
"jest-watch-typeahead": "1.1.0",
"node-notifier": "10.0.1",
"react-dev-utils": "12.0.1",
"redux-logger": "3.0.6",
"redux-mock-store": "1.5.4",
"selenium-webdriver": "4.2.0",
"selenium-webdriver": "4.3.0",
"start-server-and-test": "1.14.0",
"ts-jest": "28.0.1"
"ts-jest": "28.0.5"
},
"jestSonar": {
"reportPath": "reports",
Expand Down
3 changes: 1 addition & 2 deletions src/app/utils/generate-groups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export function generateGroupsFromList(list: any[], property: string) : IGroup[]
let isCollapsed = false;
let previousCount = 0;
let count = 0;
const toggleCollapse: string = isCollapsed ? 'collapsed ': 'expanded '

if (!list || list.length === 0 || list.some(e => !e[property])) {
return groups;
Expand All @@ -17,7 +16,7 @@ export function generateGroupsFromList(list: any[], property: string) : IGroup[]
if (!map.has(listItem[property])) {
map.set(listItem[property], true);
count = list.filter(item => item[property] === listItem[property]).length;
const ariaLabel: string = listItem[property] + ' has ' + count + ' results ' + toggleCollapse;
const ariaLabel: string = listItem[property] + ' has ' + count + ' results ';
if (groups.length > 0) {
isCollapsed = true;
}
Expand Down
8 changes: 7 additions & 1 deletion src/app/views/authentication/Authentication.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React, { useState } from 'react';
import { injectIntl } from 'react-intl';
import { useDispatch, useSelector } from 'react-redux';
import { authenticationWrapper } from '../../../modules/authentication';
import { componentNames, errorTypes, telemetry } from '../../../telemetry';
import { componentNames, errorTypes, eventTypes, telemetry } from '../../../telemetry';
import { IRootState } from '../../../types/root';
import { getAuthTokenSuccess, getConsentedScopesSuccess } from '../../services/actions/auth-action-creators';
import { setQueryResponseStatus } from '../../services/actions/query-status-action-creator';
Expand All @@ -29,6 +29,9 @@ const Authentication = (props: any) => {
}: any = props;
const signIn = async (): Promise<void> => {
setLoginInProgress(true);
telemetry.trackEvent(eventTypes.BUTTON_CLICK_EVENT, {
ComponentName: componentNames.SIGN_IN_BUTTON
});

try {
const authResponse = await authenticationWrapper.logIn();
Expand Down Expand Up @@ -65,6 +68,9 @@ const Authentication = (props: any) => {

const signInWithOther = async (): Promise<void> => {
setLoginInProgress(true);
telemetry.trackEvent(eventTypes.BUTTON_CLICK_EVENT, {
ComponentName: componentNames.SIGN_IN_WITH_OTHER_ACCOUNT_BUTTON
});
try{
const authResponse = await authenticationWrapper.logInWithOther();
if (authResponse) {
Expand Down
2 changes: 1 addition & 1 deletion src/app/views/common/monaco/Monaco.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export function Monaco(props: IMonaco) {
foldingStrategy: 'indentation',
showFoldingControls: 'always',
renderLineHighlight: 'none',
scrollBeyondLastLine: false,
scrollBeyondLastLine: true,
overviewRulerBorder: false
}}
onChange={onChange}
Expand Down
17 changes: 15 additions & 2 deletions src/app/views/main-header/FeedbackButton.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getTheme, IconButton, IIconProps, TooltipHost } from '@fluentui/react';
import React, { useState } from 'react';
import { getTheme, IButton, IconButton, IIconProps, TooltipHost } from '@fluentui/react';
import React, { useState, useEffect } from 'react';
import { translateMessage } from '../../utils/translate-messages';
import { useSelector } from 'react-redux';
import FeedbackForm from '../query-runner/request/feedback/FeedbackForm';
Expand All @@ -17,6 +17,18 @@ export const FeedbackButton = () => {
const feedbackTitle = translateMessage('Feedback');
const content = <div style={{padding:'3px'}}>{translateMessage('Feedback')}</div>

const feedbackButtonRef = React.useRef<IButton>(null)
const isFirstRender = React.useRef(true);
useEffect( () => {
if (isFirstRender.current) {
isFirstRender.current = false;
return;
}
if(!enableSurvey){
feedbackButtonRef.current?.focus();
}
},[enableSurvey])

const feedbackIconStyles = {
root:{
height: '50px',
Expand Down Expand Up @@ -66,6 +78,7 @@ export const FeedbackButton = () => {
styles={feedbackIconStyles}
role={'button'}
disabled={enableSurvey}
componentRef={feedbackButtonRef}
/>
</TooltipHost>

Expand Down
19 changes: 11 additions & 8 deletions src/app/views/main-header/Help.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const Help = () => {
iconProps: {
iconName: 'ReportWarning'
},
onClick: () => trackLinkClickEvents(componentNames.REPORT_AN_ISSUE_LINK)
onClick: (e: any) => telemetry.trackLinkClickEvent(e.currentTarget.href, componentNames.REPORT_AN_ISSUE_LINK)
},
{ key: 'divider_1', itemType: ContextualMenuItemType.Divider },
{
Expand All @@ -50,7 +50,7 @@ export const Help = () => {
iconProps: {
iconName: 'TextDocument'
},
onClick: () => trackLinkClickEvents(componentNames.GE_DOCUMENTATION_LINK)
onClick: (e: any) => telemetry.trackLinkClickEvent(e.currentTarget.href, componentNames.GE_DOCUMENTATION_LINK)
},
{
key: 'graph-documentation',
Expand All @@ -60,7 +60,9 @@ export const Help = () => {
iconProps: {
iconName: 'Documentation'
},
onClick: () => trackLinkClickEvents(componentNames.GRAPH_DOCUMENTATION_LINK)
onClick: (e: any) => telemetry.trackLinkClickEvent(
e.currentTarget.href,
componentNames.GRAPH_DOCUMENTATION_LINK)
},
{
key: 'github',
Expand All @@ -76,17 +78,17 @@ export const Help = () => {
}
}
},
onClick: () => trackLinkClickEvents(componentNames.GITHUB_LINK)
onClick: (e: any) => telemetry.trackLinkClickEvent(e.currentTarget.href, componentNames.GITHUB_LINK)
}
];
setItems(menuItems);
}, [authenticated]);

const trackLinkClickEvents = (componentName: string) => {
telemetry.trackEvent(eventTypes.LINK_CLICK_EVENT, {
ComponentName: componentName
const trackHelpButtonClickEvent = () => {
telemetry.trackEvent(eventTypes.BUTTON_CLICK_EVENT, {
ComponentName: componentNames.HELP_BUTTON
});
};
}

const calloutStyles: React.CSSProperties = {
overflowY: 'hidden'
Expand Down Expand Up @@ -121,6 +123,7 @@ export const Help = () => {
styles={helpButtonStyles}
menuIconProps={{ iconName: 'Help' }}
menuProps={menuProperties}
onMenuClick={trackHelpButtonClickEvent}
/>
</TooltipHost>
</div>
Expand Down
7 changes: 7 additions & 0 deletions src/app/views/main-header/settings/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@ export const Settings: React.FunctionComponent<ISettingsProps> = () => {
});
};

const trackSettingsButtonClickEvent = () => {
telemetry.trackEvent(eventTypes.BUTTON_CLICK_EVENT, {
ComponentName: componentNames.SETTINGS_BUTTON
});
}

const calloutStyles: React.CSSProperties = {
overflowY: 'hidden'
}
Expand Down Expand Up @@ -119,6 +125,7 @@ export const Settings: React.FunctionComponent<ISettingsProps> = () => {
styles={settingsButtonStyles}
menuIconProps={{ iconName: 'Settings' }}
menuProps={menuProperties}
onMenuClick={trackSettingsButtonClickEvent}
/>
</TooltipHost>
<div>
Expand Down
28 changes: 11 additions & 17 deletions src/app/views/query-response/QueryResponse.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
Announced, Dialog, DialogFooter, DialogType,
DefaultButton, FontSizes, getId, Icon, IconButton,
Modal, Pivot, PivotItem, TooltipHost
DefaultButton, FontSizes, IconButton,
Modal, Pivot, PivotItem
} from '@fluentui/react';
import { Resizable } from 're-resizable';
import React, { useState, useEffect } from 'react';
Expand Down Expand Up @@ -85,21 +85,15 @@ const QueryResponse = (props: IQueryResponseProps) => {
if(!pivotItem){ return ;}
setCurrentTab(pivotItem.props.itemKey!);
onPivotItemClick(sampleQuery, pivotItem);
}

const renderItemLink = (link: any) => {
return (
<TooltipHost
content={link.title}
id={getId()}
calloutProps={{ gapSpace: 0 }}
>
<Icon iconName={link.itemIcon} style={{ paddingRight: 5 }} />
{link.headerText}
</TooltipHost>
);
};

const onScroll = () => {
const queryResponseElements = document.getElementsByClassName('query-response');
if(queryResponseElements && queryResponseElements.length > 0){
queryResponseElements[0].scrollTop = 0;
}
}

return (
<>
<Resizable
Expand All @@ -121,7 +115,8 @@ const QueryResponse = (props: IQueryResponseProps) => {
<div className='query-response' style={{
minHeight: 350,
height: '100%'
}}>
}}
onScroll={onScroll}>

<Pivot overflowBehavior='menu'
overflowAriaLabel={translateMessage('More items')}
Expand All @@ -137,7 +132,6 @@ const QueryResponse = (props: IQueryResponseProps) => {
itemKey='expand-response'
ariaLabel={translateMessage('Expand response')}
title={translateMessage('Expand response')}
onRenderItemLink={renderItemLink}
/>
</Pivot>
</div>
Expand Down
7 changes: 4 additions & 3 deletions src/app/views/query-response/pivot-items/pivot-items.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getId, getTheme, Icon, ITheme, PivotItem, TooltipHost } from '@fluentui/react';
import { getTheme, Icon, ITheme, PivotItem } from '@fluentui/react';
import React from 'react';
import { useSelector } from 'react-redux';

Expand Down Expand Up @@ -49,13 +49,14 @@ export const getPivotItems = () => {

function renderItemLink(link: any) {
return (
<TooltipHost content={link.title} id={getId()} calloutProps={{ gapSpace: 0 }}>
<>
<Icon iconName={link.itemIcon} style={{ paddingRight: 5 }} />
{link.headerText}

{link.itemKey === 'adaptive-cards' && showDotIfAdaptiveCardPresent()}
{link.itemKey === 'toolkit-component' && showDotIfGraphToolkitPresent()}
</TooltipHost>
</>

);
}

Expand Down
9 changes: 2 additions & 7 deletions src/app/views/query-response/queryResponse.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,9 @@ export const queryResponseStyles = (theme: ITheme) => {
},
toolkitText: {
root: {
padding: '20px',
width: '100%',
margin: 'auto',
display: 'inline-block',
position: 'relative',
top: '160px',
lineHeight: '1.5',
textAlign: 'justify'
marginTop: '13%',
marginLeft: '16%'
}
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ export const ShareQuery = () => {

const query = { ...sampleQuery };
const sanitizedQueryUrl = sanitizeQueryUrl(query.sampleUrl);
query.sampleUrl = sanitizedQueryUrl;
const shareLink = createShareLink(query);
const shareLink = createShareLink(sampleQuery);

const toggleShareQueryDialogState = () => {
setShareQuaryDialogStatus(prevState => !prevState);
Expand All @@ -37,7 +36,7 @@ export const ShareQuery = () => {
telemetry.trackEvent(eventTypes.BUTTON_CLICK_EVENT,
{
ComponentName: componentNames.SHARE_QUERY_COPY_BUTTON,
QuerySignature: `${sampleQuery.selectedVerb} ${sanitizedQueryUrl}`
QuerySignature: `${query.selectedVerb} ${sanitizedQueryUrl}`
});
}

Expand Down
Loading

0 comments on commit 97ca0df

Please sign in to comment.