Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Update to 6.4.0 #2078

Merged
merged 39 commits into from
Sep 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
32cfa71
chore(release): 4.3.0 (#852)
ElinorW Feb 16, 2021
a42b742
chore(release): 4.4.0 (#860)
ElinorW Feb 22, 2021
8190568
chore(release): 4.4.1 (#878)
thewahome Mar 3, 2021
bc65ddf
chore(release): 4.4.2 (#912)
thewahome Mar 30, 2021
5368580
chore(release): 4.5.0 (#929)
thewahome Apr 13, 2021
d690cd8
Fix linting errors preventing the pipeline from runnings (#930)
thewahome Apr 13, 2021
69758cb
chore(release): 4.6.0 (#938)
thewahome May 5, 2021
9107145
Set GET as default HTTP method if method specified in query params is…
millicentachieng May 13, 2021
40d8316
Task: Update version number (#951)
millicentachieng May 13, 2021
e0ef4a4
chore(release): 4.9.0 (#989)
thewahome Jun 10, 2021
c477432
chore(release): 4.10.0 (#1014)
thewahome Jul 6, 2021
19733ac
chore(release): 4.11.0 (#1031)
thewahome Jul 15, 2021
c919328
chore(release): 4.12.0 (#1046)
thewahome Aug 3, 2021
d16607c
Release: September 2021 (#1091)
thewahome Sep 1, 2021
edfb717
Release: November 2021 (#1238)
ElinorW Nov 18, 2021
932a672
Release: December 2021 (#1308)
Onokaev Dec 9, 2021
194610a
Merge branch 'dev'
Onokaev Jan 5, 2022
f167a60
Revert "Merge branch 'dev'"
Onokaev Jan 5, 2022
1ff4ea0
Release 01-2022 (#1344)
millicentachieng Jan 13, 2022
0b3facd
Release: February 2022 (#1417)
ElinorW Feb 3, 2022
4be0d11
Chore (release): 4.17.0 (#1549)
github-actions[bot] Mar 10, 2022
8e825b1
Chore (release): 4.18.0 (#1553)
github-actions[bot] Mar 11, 2022
d47dd98
Chore (patch): 4.18.1 (#1558)
thewahome Mar 15, 2022
fef5627
Chore (release): 5.0.0 (#1582)
github-actions[bot] Mar 30, 2022
bb595f7
Chore (release): 5.1.0 (#1662)
github-actions[bot] Apr 13, 2022
bc54fb4
Chore (release): 5.1.1 (#1678)
github-actions[bot] Apr 22, 2022
d523741
Chore (release): 5.2.0 (#1729)
github-actions[bot] May 16, 2022
972e995
Chore (release): 6.0.0 (#1821)
github-actions[bot] Jun 15, 2022
e4a3615
Chore (release): 6.1.0 (#1928)
github-actions[bot] Jul 15, 2022
97ca0df
Chore (release): 6.2.0 (#1960)
github-actions[bot] Aug 3, 2022
f695350
Chore (release): 6.3.0 (#2015)
ElinorW Aug 10, 2022
96f1991
Bump version to 6.4.0
invalid-email-address Sep 1, 2022
53d8b94
Merge branch 'master' into release/6.4.0
thewahome Sep 1, 2022
cbe0b11
fix linting errors
thewahome Sep 2, 2022
f891e29
remove duplicate imports
thewahome Sep 2, 2022
41c6347
fix all imports
thewahome Sep 2, 2022
3b5dfbb
add react to scope
thewahome Sep 2, 2022
bee2e3b
fix page heights
thewahome Sep 2, 2022
dabee3e
revert styling changes
thewahome Sep 2, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "graph-explorer-v2",
"version": "6.3.0",
"version": "6.4.0",
"private": true,
"dependencies": {
"@augloop/types-core": "file:packages/types-core-2.16.189.tgz",
Expand Down Expand Up @@ -130,4 +130,4 @@
"resolutions": {
"@types/react": "17.0.30"
}
}
}
2 changes: 1 addition & 1 deletion src/app/services/actions/query-action-creator-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export async function anonymousRequest(
getState: Function
) {
const { proxyUrl, queryRunnerStatus } = getState();
const { graphUrl, options } = createAnonymousRequest(query, proxyUrl, queryRunnerStatus);
const { graphUrl, options } = createAnonymousRequest(query, proxyUrl, queryRunnerStatus);
dispatch(queryRunningStatus(true));
return fetch(graphUrl, options)
.catch(() => {
Expand Down
16 changes: 8 additions & 8 deletions src/app/views/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class App extends Component<IAppProps, IAppState> {
};
}

private setSidebarTabSelection = (selectedTab : string) => {
private setSidebarTabSelection = (selectedTab: string) => {
this.setState({
sidebarTabSelection: selectedTab
});
Expand Down Expand Up @@ -434,10 +434,10 @@ class App extends Component<IAppProps, IAppState> {
height: ''
}}
>
<Sidebar currentTab = { this.state.sidebarTabSelection }
setSidebarTabSelection = { this.setSidebarTabSelection } showSidebar={showSidebar}
<Sidebar currentTab={this.state.sidebarTabSelection}
setSidebarTabSelection={this.setSidebarTabSelection} showSidebar={showSidebar}
toggleSidebar={this.toggleSidebar}
mobileScreen={mobileScreen}/>
mobileScreen={mobileScreen} />
</Resizable>
)}
{graphExplorerMode === Mode.TryIt &&
Expand All @@ -455,17 +455,17 @@ class App extends Component<IAppProps, IAppState> {
height: ''
}}
style={!sidebarProperties.showSidebar && !mobileScreen ? {
marginLeft: '8px', display:'flex', flexDirection: 'column', alignItems: 'stretch', flex: 1
marginLeft: '8px', display: 'flex', flexDirection: 'column', alignItems: 'stretch', flex: 1
} : {
display:'flex', flexDirection: 'column', alignItems: 'stretch', flex: 1
display: 'flex', flexDirection: 'column', alignItems: 'stretch', flex: 1
}}
>
<div style={{ marginBottom: 2}} >
<div style={{ marginBottom: 2 }} >
<QueryRunner onSelectVerb={this.handleSelectVerb} />
</div>

<div style={{
display:'flex', flexDirection: 'column', alignItems: 'stretch', flex: 1
display: 'flex', flexDirection: 'column', alignItems: 'stretch', flex: 1
}}>
<div style={mobileScreen ? this.statusAreaMobileStyle : this.statusAreaFullScreenStyle}>
<StatusMessages />
Expand Down
18 changes: 8 additions & 10 deletions src/app/views/query-response/QueryResponse.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const QueryResponse = () => {
}, [dimensions]);

const flexQueryElement: CSSProperties = {
display:'flex',
display: 'flex',
flexDirection: 'column',
alignItems: 'stretch',
flex: 1,
Expand All @@ -47,7 +47,7 @@ const QueryResponse = () => {
return;
}
onPivotItemClick(sampleQuery, pivotItem);
if(pivotItem.props.itemKey !== 'expand-response') {
if (pivotItem.props.itemKey !== 'expand-response') {
setCurrentTab(pivotItem.props.itemKey!);
}
toggleModal(pivotItem);
Expand All @@ -60,15 +60,15 @@ const QueryResponse = () => {
}
};

const onModalPivotItemClicked = (pivotItem? : PivotItem) => {
if(!pivotItem){ return ;}
const onModalPivotItemClicked = (pivotItem?: PivotItem) => {
if (!pivotItem) { return; }
setCurrentTab(pivotItem.props.itemKey!);
onPivotItemClick(sampleQuery, pivotItem);
};

const onScroll = () => {
const queryResponseElements = document.getElementsByClassName('query-response');
if(queryResponseElements && queryResponseElements.length > 0){
if (queryResponseElements && queryResponseElements.length > 0) {
queryResponseElements[0].scrollTop = 0;
}
}
Expand All @@ -95,15 +95,13 @@ const QueryResponse = () => {
minHeight: 350,
height: '100%',
flex: 1
}}
onScroll={onScroll}>

}} onScroll={onScroll}>
<Pivot overflowBehavior='menu'
overflowAriaLabel={translateMessage('More items')}
onLinkClick={handlePivotItemClick}
className={'pivot-response'}
selectedKey={currentTab}
styles={{text: {fontSize: FontSizes.size14}}}
styles={{ text: { fontSize: FontSizes.size14 } }}
>
{GetPivotItems()}
<PivotItem
Expand All @@ -123,7 +121,7 @@ const QueryResponse = () => {
<Modal
isOpen={showModal}
onDismiss={toggleExpandResponse}
styles={ modalStyles }
styles={modalStyles}
>
<IconButton
styles={{
Expand Down
23 changes: 13 additions & 10 deletions src/app/views/query-response/adaptive-cards/AdaptiveCard.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import * as AdaptiveCardsAPI from 'adaptivecards';
import { FontSizes, getTheme, IStyle, ITheme, Label, Link,
MessageBar, MessageBarType, Pivot, PivotItem, styled } from '@fluentui/react';
import {
FontSizes, getTheme, IStyle, ITheme, Label, Link,
MessageBar, MessageBarType, Pivot, PivotItem, styled
} from '@fluentui/react';
import React, { Component } from 'react';
import { FormattedMessage, injectIntl } from 'react-intl';
import { connect } from 'react-redux';
Expand Down Expand Up @@ -57,7 +59,7 @@ class AdaptiveCard extends Component<IAdaptiveCardProps> {
if (JSON.stringify(this.props.body) !== JSON.stringify(nextProps.body)) {
return true; // body has changed so card will too
}
if (JSON.stringify(nextProps.card.data) === JSON.stringify(this.props.card.data) ) {
if (JSON.stringify(nextProps.card.data) === JSON.stringify(this.props.card.data)) {
return false; // card still the same no need to re-render
}
return true;
Expand All @@ -84,7 +86,7 @@ class AdaptiveCard extends Component<IAdaptiveCardProps> {
if (body && !pending) {
if (!data || (queryStatus && !queryStatus.ok)) {
return (
<Label styles={{root: this.textStyle}}>
<Label styles={{ root: this.textStyle }}>
<FormattedMessage id='The Adaptive Card for this response is not available' />
&nbsp;
<Link
Expand All @@ -102,13 +104,14 @@ class AdaptiveCard extends Component<IAdaptiveCardProps> {
try {
this.adaptiveCard!.parse(data.card);
const renderedCard = this.adaptiveCard!.render();
const handleCopy = async () =>{ trackedGenericCopy(JSON.stringify(data.template, null, 4),
componentNames.JSON_SCHEMA_COPY_BUTTON, sampleQuery);
const handleCopy = async () => {
trackedGenericCopy(JSON.stringify(data.template, null, 4),
componentNames.JSON_SCHEMA_COPY_BUTTON, sampleQuery);
}
return (
<Pivot className='pivot-response'
onLinkClick={(pivotItem) => onPivotItemClick(sampleQuery, pivotItem)}
styles={{text: {fontSize: FontSizes.size14}}}>
styles={{ text: { fontSize: FontSizes.size14 } }}>
<PivotItem
itemKey='card'
ariaLabel={translateMessage('card')}
Expand All @@ -121,10 +124,10 @@ class AdaptiveCard extends Component<IAdaptiveCardProps> {
<div id={'card-tab'}
ref={(n) => {
if (n && !n.firstChild) {
n.appendChild(renderedCard as HTMLElement);
n.appendChild(renderedCard as HTMLElement as HTMLElement);
} else {
if (n && n.firstChild) {
n.replaceChild(renderedCard as HTMLElement, n.firstChild);
n.replaceChild(renderedCard as HTMLElement as HTMLElement, n.firstChild);
}
}
}}
Expand Down Expand Up @@ -171,7 +174,7 @@ class AdaptiveCard extends Component<IAdaptiveCardProps> {
</PivotItem>
</Pivot>
);
} catch (err : any) {
} catch (err: any) {
return <div style={{ color: 'red' }}>{err.message}</div>;
}
}
Expand Down
16 changes: 5 additions & 11 deletions src/app/views/query-response/graph-toolkit/GraphToolkit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,14 @@ import { FormattedMessage } from 'react-intl';
import { connect } from 'react-redux';

import {
getTheme,
IStyle,
ITheme,
Label,
Link,
MessageBar,
MessageBarType,
styled
getTheme, IStyle, ITheme, Label, Link,
MessageBar, MessageBarType, styled
} from '@fluentui/react';
import { lookupToolkitUrl } from '../../../utils/graph-toolkit-lookup';
import { componentNames, telemetry } from '../../../../telemetry';
import { queryResponseStyles } from '../queryResponse.styles';
import { IRootState } from '../../../../types/root';
import { lookupToolkitUrl } from '../../../utils/graph-toolkit-lookup';
import { translateMessage } from '../../../utils/translate-messages';
import { queryResponseStyles } from '../queryResponse.styles';

class GraphToolkit extends Component<any> {
constructor(props: any) {
Expand Down Expand Up @@ -51,7 +45,7 @@ class GraphToolkit extends Component<any> {
}

return (
<Label styles={{root: this.textStyle}}>
<Label styles={{ root: this.textStyle }}>
<FormattedMessage id='We did not find a Graph toolkit for this query' />
&nbsp;
<Link
Expand Down
2 changes: 1 addition & 1 deletion src/app/views/query-response/pivot-items/pivot-items.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export const GetPivotItems = () => {
'aria-controls': 'response-headers-tab'
}}
>
<div id={'response-headers-tab'}><ResponseHeaders/></div>
<div id={'response-headers-tab'}><ResponseHeaders /></div>
</PivotItem>
];
if (mode === Mode.Complete) {
Expand Down
7 changes: 3 additions & 4 deletions src/app/views/query-response/snippets/Snippets.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import { FontSizes, Pivot, PivotItem } from '@fluentui/react';
import React from 'react';
import { useDispatch, useSelector } from 'react-redux';
import React from 'react';

import { componentNames, telemetry } from '../../../../telemetry';
import { IRootState } from '../../../../types/root';
import { setSnippetTabSuccess } from '../../../services/actions/snippet-action-creator';
import { renderSnippets } from './snippets-helper';

function GetSnippets() {
const dispatch = useDispatch();
const { snippets } = useSelector((state: IRootState) => state);
const { snippets } = useSelector((state: IRootState) => state);
const supportedLanguages = {
'CSharp': {
sdkDownloadLink: 'https://aka.ms/csharpsdk',
Expand Down Expand Up @@ -44,7 +43,7 @@ function GetSnippets() {
className={'pivot-response'}
selectedKey={snippets.snippetTab}
onLinkClick={handlePivotItemClick}
styles={{text: {fontSize: FontSizes.size14}}}
styles={{ text: { fontSize: FontSizes.size14 } }}
>
{renderSnippets(supportedLanguages)}
</Pivot>;
Expand Down
2 changes: 1 addition & 1 deletion src/app/views/query-runner/query-input/QueryInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const QueryInput = (props: IQueryInputProps) => {
dispatch(setSampleQuery(updatedQuery));
};

const getChangedQueryContent = (newUrl: string) : IQuery => {
const getChangedQueryContent = (newUrl: string): IQuery => {

const query = { ...sampleQuery };
const { queryVersion: newQueryVersion } = parseSampleUrl(newUrl);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,10 @@ const AutoComplete = (props: IAutoCompleteProps) => {
setSuggestions(filtered);
setShouldShowSuggestions(true);
}
} else {
setShouldShowSuggestions(false);
}

}

const trackSuggestionSelectionEvent = (suggestion: string) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ export {
cleanUpSelectedSuggestion,
getLastCharacterOf,
getSearchText
}
}
2 changes: 1 addition & 1 deletion src/app/views/query-runner/request/Request.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export class Request extends Component<IRequestComponent, any> {
onLinkClick={this.handlePivotItemClick}
className='pivot-request'
selectedKey={pivot}
styles={{text: {fontSize: FontSizes.size14}}}
styles={{ text: { fontSize: FontSizes.size14 } }}
>
{requestPivotItems}
</Pivot>
Expand Down
Loading