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

merge with master #14

Merged
merged 20 commits into from
May 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
8b044f2
chore: fix error noise in yarn format from prettier + mp3 file (#2688)
dbjorge May 15, 2020
dd08300
feat(nav-bar-content): add table section to requirements view (#2690)
waabid May 15, 2020
4df86fe
feat(manual-auto-pass): add auto-pass for CSS content and CSS positio…
dbjorge May 15, 2020
a6384b9
remove update-handler from ReflowAssessmentView (#2699)
pownkel May 15, 2020
55e5f4c
chore: fix build break from cross-PR merge conflict (#2702)
dbjorge May 15, 2020
2da9ca8
chore: split PR build web e2es into separate build job (#2700)
dbjorge May 15, 2020
320d492
refactor(nav-bar-content): use const getting started string (#2701)
waabid May 15, 2020
18014fb
feat(nav-bar-content): fix left nav selection (#2697)
pownkel May 15, 2020
2756024
feat(nav-bar-content): nav-bar width increase for ReflowUI view (#2704)
JGibson2019 May 15, 2020
452f36e
chore(deps-dev): bump @types/jsdom from 16.2.2 to 16.2.3 (#2706)
dependabot-preview[bot] May 18, 2020
c093dd4
chore(deps-dev): bump ts-jest from 25.5.1 to 26.0.0 (#2707)
dependabot-preview[bot] May 18, 2020
86d8cd0
chore(deps-dev): bump @types/q from 1.5.3 to 1.5.4 (#2710)
dependabot-preview[bot] May 18, 2020
70cc059
chore(deps-dev): bump codecov from 3.6.5 to 3.7.0 (#2709)
dependabot-preview[bot] May 18, 2020
2c1b57c
chore(deps-dev): bump puppeteer from 3.0.4 to 3.1.0 (#2708)
dependabot-preview[bot] May 18, 2020
9b57fc6
feat(nav-bar-content): add RequirementView to ReflowAssessmentView (#…
lisli1 May 18, 2020
01470da
fix wcag mappings (#2713)
haonliu May 18, 2020
2909f90
feat(nav-bar-content): add test title to getting started + minor styl…
waabid May 18, 2020
e1789ee
feat(nav-bar-content): smaller requirement icons in left nav and bett…
waabid May 19, 2020
a737f46
feat(nav-bar-content): add guidance icon to getting started view (#2716)
lisli1 May 19, 2020
ead336b
feat(android-bug-filing): Refactor platform info (#2703)
AhmedAbdoOrtiga May 19, 2020
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
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
**/*.gitignore
**/*.icns
**/*.ico
**/*.mp3
**/*.nsh
**/*.png
**/*.snap
Expand Down
12 changes: 9 additions & 3 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,25 +97,31 @@ jobs:
displayName: publish drop
timeoutInMinutes: 5

- job: 'e2e_mac_web_unified'
- job: 'e2e_web_mac'
pool:
vmImage: macOS-10.15
steps:
- template: pipeline/install-node-prerequisites.yaml
- template: pipeline/e2e-test-from-agent.yaml
- template: pipeline/e2e-test-publish-results.yaml

- job: 'e2e_unified_mac'
pool:
vmImage: macOS-10.15
steps:
- template: pipeline/install-node-prerequisites.yaml
- template: pipeline/unified/unified-e2e-test-interactive.yaml
- template: pipeline/unified/unified-e2e-publish-results.yaml

- job: 'e2e_linux_unified'
- job: 'e2e_unified_linux'
pool:
vmImage: ubuntu-18.04
steps:
- template: pipeline/install-node-prerequisites.yaml
- template: pipeline/unified/unified-e2e-test-linux.yaml
- template: pipeline/unified/unified-e2e-publish-results.yaml

- job: 'e2e_windows_unified'
- job: 'e2e_unified_windows'
pool:
vmImage: windows-2019
steps:
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@
"@types/enzyme": "^3.10.5",
"@types/enzyme-adapter-react-16": "^1.0.6",
"@types/jest": "^25.2.2",
"@types/jsdom": "^16.2.2",
"@types/jsdom": "^16.2.3",
"@types/lodash": "^4.14.151",
"@types/make-dir": "^2.1.0",
"@types/moment": "^2.13.0",
"@types/puppeteer": "^2.1.0",
"@types/q": "^1.5.3",
"@types/q": "^1.5.4",
"@types/react": "^16.9.35",
"@types/react-copy-to-clipboard": "^4.3.0",
"@types/react-dom": "^16.9.8",
Expand All @@ -80,7 +80,7 @@
"@types/uuid": "^7.0.3",
"app-builder-lib": "^22.6.1",
"case-sensitive-paths-webpack-plugin": "^2.3.0",
"codecov": "^3.6.5",
"codecov": "^3.7.0",
"commander": "^5.1.0",
"core-js-bundle": "^3.6.5",
"cross-env": "^7.0.2",
Expand Down Expand Up @@ -113,7 +113,7 @@
"npm-run-all": "^4.1.5",
"preprocess": "^3.2.0",
"prettier": "^2.0.5",
"puppeteer": "^3.0.4",
"puppeteer": "^3.1.0",
"react-devtools": "^4.6.0",
"regenerator-runtime": "^0.13.5",
"sass-loader": "^8.0.2",
Expand All @@ -123,7 +123,7 @@
"source-map-loader": "^0.2.4",
"spectron": "^10.0.1",
"terser-webpack-plugin": "^3.0.1",
"ts-jest": "^25.5.1",
"ts-jest": "^26.0.0",
"ts-loader": "^7.0.4",
"tslint": "^5.20.1",
"tslint-microsoft-contrib": "6.2.0",
Expand Down
8 changes: 7 additions & 1 deletion src/DetailsView/Styles/detailsview.scss
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,9 @@ div.insights-file-issue-details-dialog-container {
grid-template-rows: 1fr;
width: 100%;
min-height: 0;

&.reflow-ui {
grid-template-columns: $detailsViewReflowLeftNavWidth 1fr;
}
.details-view-test-nav-area {
box-sizing: border-box;
max-height: calc(
Expand Down Expand Up @@ -393,10 +395,14 @@ div.insights-file-issue-details-dialog-container {
.dark-gray {
color: $neutral-60;
}
.is-selected .button-flex-container {
color: $always-black;
}
.button-flex-container {
padding-left: 5%;
padding-right: 8%;
width: $detailsViewLeftNavWidth;
color: $primary-text;
.status-icon {
font-size: 24px;
}
Expand Down
11 changes: 8 additions & 3 deletions src/DetailsView/components/assessment-test-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,17 @@ export const AssessmentTestView = NamedFC<AssessmentTestViewProps>(
return (
<ReflowAssessmentView
deps={deps}
assessmentNavState={assessmentNavState}
assessmentData={assessmentData}
currentTarget={currentTarget}
prevTarget={prevTarget}
assessmentTestResult={assessmentTestResult}
scanningInProgress={isScanning}
selectedRequirementIsEnabled={selectedRequirementIsEnabled}
assessmentNavState={assessmentNavState}
assessmentData={assessmentData}
assessmentDefaultMessageGenerator={deps.assessmentDefaultMessageGenerator}
assessmentTestResult={assessmentTestResult}
assessmentInstanceTableHandler={props.assessmentInstanceTableHandler}
featureFlagStoreData={props.featureFlagStoreData}
pathSnippetStoreData={props.pathSnippetStoreData}
/>
);
};
Expand Down
16 changes: 16 additions & 0 deletions src/DetailsView/components/getting-started-view.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,19 @@
padding-left: 6px;
padding-top: 1vh;
}

.getting-started-header {
@include text-style-title-m;
padding-top: 8px;
i {
font-size: 16px;
}
}

.getting-started-header-title {
margin-right: 8px;
}

.getting-started-title {
@include text-style-title-s;
}
13 changes: 12 additions & 1 deletion src/DetailsView/components/getting-started-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,26 @@
import { NamedFC } from 'common/react/named-fc';
import * as styles from 'DetailsView/components/getting-started-view.scss';
import * as React from 'react';
import { ContentLink, ContentLinkDeps } from 'views/content/content-link';
import { ContentPageComponent } from 'views/content/content-page';

export type GettingStartedViewDeps = ContentLinkDeps;

export interface GettingStartedViewProps {
deps: GettingStartedViewDeps;
gettingStartedContent: JSX.Element;
title: string;
guidance: ContentPageComponent;
}

export const GettingStartedView = NamedFC<GettingStartedViewProps>('GettingStartedView', props => {
return (
<div className={styles.gettingStartedView}>
<h2>Getting Started</h2>
<h1 className={styles.gettingStartedHeader}>
<span className={styles.gettingStartedHeaderTitle}>{props.title}</span>
<ContentLink deps={props.deps} reference={props.guidance} iconName="info" />
</h1>
<h2 className={styles.gettingStartedTitle}>Getting Started</h2>
{props.gettingStartedContent}
</div>
);
Expand Down
4 changes: 2 additions & 2 deletions src/DetailsView/components/issue-filing-dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { cloneDeep, isEqual } from 'lodash';
import { Dialog, DialogFooter, DialogType } from 'office-ui-fabric-react';
import * as React from 'react';

import { EnvironmentInfoProvider } from '../../common/environment-info-provider';
import { ToolData } from 'common/types/store-data/unified-data-interface';
import { IssueFilingActionMessageCreator } from '../../common/message-creators/issue-filing-action-message-creator';
import { UserConfigMessageCreator } from '../../common/message-creators/user-config-message-creator';
import { CreateIssueDetailsTextData } from '../../common/types/create-issue-details-text-data';
Expand All @@ -29,7 +29,7 @@ export interface IssueFilingDialogProps {
}

export type IssueFilingDialogDeps = {
environmentInfoProvider: EnvironmentInfoProvider;
toolData: ToolData;
userConfigMessageCreator: UserConfigMessageCreator;
issueFilingServiceProvider: IssueFilingServiceProvider;
issueFilingActionMessageCreator: IssueFilingActionMessageCreator;
Expand Down
7 changes: 7 additions & 0 deletions src/DetailsView/components/left-nav/details-view-left-nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { AssessmentsProvider } from 'assessments/types/assessments-provider';
import { FlaggedComponent } from 'common/components/flagged-component';
import { FeatureFlags } from 'common/feature-flags';
import { DetailsViewPivotType } from 'common/types/details-view-pivot-type';
import { generateReflowAssessmentTestKey } from 'DetailsView/components/left-nav/left-nav-link-builder';
import { Switcher, SwitcherDeps } from 'DetailsView/components/switcher';
import { leftNavSwitcherStyleNames } from 'DetailsView/components/switcher-style-names';
import { NamedFC } from '../../../common/react/named-fc';
Expand Down Expand Up @@ -49,6 +50,12 @@ export const DetailsViewLeftNav = NamedFC<DetailsViewLeftNavProps>('DetailsViewL

const selectedKey: string = rightPanelConfiguration.GetLeftNavSelectedKey({
visualizationType: selectedTest,
selectedSubview: assessmentStoreData.assessmentNavState.selectedTestSubview,
featureFlagStoreData,
assessmentsProvider,
deps: {
generateReflowAssessmentTestKey,
},
});
const filteredProvider = assessmentsProviderWithFeaturesEnabled(
assessmentsProvider,
Expand Down
24 changes: 23 additions & 1 deletion src/DetailsView/components/left-nav/get-left-nav-selected-key.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,37 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
import { AssessmentsProvider } from 'assessments/types/assessments-provider';
import { FeatureFlags } from 'common/feature-flags';
import { GettingStarted, RequirementName } from 'common/types/store-data/assessment-result-data';
import { FeatureFlagStoreData } from 'common/types/store-data/feature-flag-store-data';
import { reflowAssessmentTestKeyGenerator } from 'DetailsView/components/left-nav/left-nav-link-builder';
import { VisualizationType } from '../../../common/types/visualization-type';

export type GetLeftNavSelectedKeyDeps = {
generateReflowAssessmentTestKey: reflowAssessmentTestKeyGenerator;
};

export type GetLeftNavSelectedKeyProps = {
deps: GetLeftNavSelectedKeyDeps;
visualizationType: VisualizationType;
assessmentsProvider: AssessmentsProvider;
featureFlagStoreData: FeatureFlagStoreData;
selectedSubview: RequirementName | GettingStarted;
};

export function getOverviewKey(): string {
return 'Overview';
}

export function getTestViewKey(props: GetLeftNavSelectedKeyProps): string {
return VisualizationType[props.visualizationType];
if (
props.assessmentsProvider.isValidType(props.visualizationType) === false ||
props.featureFlagStoreData[FeatureFlags.reflowUI] === false
) {
return VisualizationType[props.visualizationType];
}
return props.deps.generateReflowAssessmentTestKey(
props.visualizationType,
props.selectedSubview,
);
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
@import '../../../common/styles/common.scss';
.getting-started {
padding-left: 5%;
color: $primary-text;
}

:global(.is-selected) .getting-started {
color: $always-black;
}
6 changes: 4 additions & 2 deletions src/DetailsView/components/left-nav/left-nav-icon.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
import { INavLink } from 'office-ui-fabric-react';
import { css, INavLink } from 'office-ui-fabric-react';
import * as React from 'react';
import { NamedFC } from '../../../common/react/named-fc';
import { StatusIcon } from '../status-icon';

export type LeftNavIconProps = {
item: INavLink;
className?: string;
};

export const LeftNavStatusIcon = NamedFC<LeftNavIconProps>('LeftNavStatusIcon', props => {
const { item } = props;
const classes = css('dark-gray', props.className);

return <StatusIcon status={item.status} className={'dark-gray'} level="test" />;
return <StatusIcon status={item.status} className={classes} level="test" />;
});

export const LeftNavIndexIcon = NamedFC<LeftNavIconProps>('LeftNavIndexIcon', props => {
Expand Down
10 changes: 10 additions & 0 deletions src/DetailsView/components/left-nav/left-nav-link-builder.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

/*
Specificity due to clashes with details-view.scss & avoiding use of !important
*/
:global(#details-container .details-view-body-nav-content-layout .left-nav .button-flex-container)
.requirement-status-icon {
font-size: 20px;
}
23 changes: 17 additions & 6 deletions src/DetailsView/components/left-nav/left-nav-link-builder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
} from 'DetailsView/components/left-nav/assessment-left-nav';
import { GettingStartedNavLink } from 'DetailsView/components/left-nav/getting-started-nav-link';
import { LeftNavIndexIcon, LeftNavStatusIcon } from 'DetailsView/components/left-nav/left-nav-icon';
import { requirementStatusIcon } from 'DetailsView/components/left-nav/left-nav-link-builder.scss';
import { NavLinkHandler } from 'DetailsView/components/left-nav/nav-link-handler';
import { map } from 'lodash';
import * as React from 'react';
Expand Down Expand Up @@ -46,6 +47,15 @@ export type AssessmentLinkBuilderDeps = {

export type VisualizationConfigurationLinkBuilderDeps = {};

export function generateReflowAssessmentTestKey(
test: VisualizationType,
selectedSubview: string,
): string {
return `${VisualizationType[test]}: ${selectedSubview}`;
}

export type reflowAssessmentTestKeyGenerator = typeof generateReflowAssessmentTestKey;

export class LeftNavLinkBuilder {
public buildOverviewLink(
deps: OverviewLinkBuilderDeps,
Expand Down Expand Up @@ -165,11 +175,11 @@ export class LeftNavLinkBuilder {
VisualizationType[assessment.visualizationType],
index,
l => <TestViewLeftNavLink link={l} renderIcon={this.renderAssessmentTestIcon} />,
navLinkHandler.onAssessmentTestClick,
() => {},
);

const gettingStartedLink = this.buildGettingStartedLink(
navLinkHandler.onRequirementClick,
navLinkHandler.onGettingStartedClick,
assessment,
);

Expand Down Expand Up @@ -214,7 +224,7 @@ export class LeftNavLinkBuilder {

const baselink = this.buildBaseLink(
name,
requirement.key,
generateReflowAssessmentTestKey(test, requirement.key),
requirementIndex,
l => <TestViewLeftNavLink link={l} renderIcon={this.renderRequirementIcon} />,
onClick,
Expand All @@ -234,11 +244,12 @@ export class LeftNavLinkBuilder {
onClick: onTestGettingStartedClick,
test: Assessment,
): TestGettingStartedNavLink {
const testType = test.visualizationType;
return {
testType: test.visualizationType,
testType,
...this.buildBaseLink(
'Getting Started',
gettingStartedSubview,
generateReflowAssessmentTestKey(testType, gettingStartedSubview),
0,
() => <GettingStartedNavLink />,
onClick,
Expand All @@ -251,7 +262,7 @@ export class LeftNavLinkBuilder {
return <>{link.displayedIndex}</>;
}

return <LeftNavStatusIcon item={link} />;
return <LeftNavStatusIcon className={requirementStatusIcon} item={link} />;
};

private renderAssessmentTestIcon: onBaseLeftNavItemRender = (link: AssessmentLeftNavLink) => {
Expand Down
Loading