Skip to content

Commit

Permalink
Merge branch 'master' into fix/overflow-all-children-elements
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentinaKozlova authored Apr 3, 2023
2 parents 1ba8224 + 2bea5b2 commit fbaa26b
Show file tree
Hide file tree
Showing 101 changed files with 979 additions and 701 deletions.
2 changes: 1 addition & 1 deletion .devops/templates/runpublishvrscreenshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ steps:
isPR=${{lower(eq(variables['Build.Reason'], 'PullRequest'))}}
echo $isPR
if [[ $isPR == true ]]; then
packageAffected=$(yarn --silent check:affected-package --packages ${{ parameters.vrTestPackageName }} --pr=true)
packageAffected=$(yarn --silent check:affected --package ${{ parameters.vrTestPackageName }})
if [[ $packageAffected == false ]]; then
echo "In PR pipeline but NOT affecting test package. Skipping test run"
echo "##vso[task.setvariable variable=vrTestSkip;]yes"
Expand Down
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ scripts/ts-node @microsoft/fluentui-react-build
scripts/update-release-notes @microsoft/fluentui-react-build
scripts/utils @microsoft/fluentui-react-build
scripts/webpack @microsoft/fluentui-react-build
scripts/perf-test-flamegrill @microsoft/fluentui-react-build

#### Fluent UI N*
packages/a11y-rules @microsoft/fluentui-northstar
Expand Down
21 changes: 21 additions & 0 deletions apps/perf-test-react-components/config/perf-test/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import * as path from 'path';
import { scenarioIterations } from './scenarioIterations';
import { scenarioRenderTypes } from './scenarioRenderTypes';
import { scenarioNames } from './scenarioNames';

const projectRoot = path.join(__dirname, '../../');
const projectRootPath = 'apps/perf-test-react-components';
const outDir = path.join(projectRoot, './dist');
const tempDir = path.join(projectRoot, './logfiles');
const scenariosSrcDirPath = path.join(projectRoot, './src/scenarios');

export const config = {
projectName: '@fluentui/react-components',
projectRootPath,
outDir,
tempDir,
scenariosSrcDirPath,
scenarioIterations,
scenarioRenderTypes,
scenarioNames,
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { ScenarioIterations } from '@fluentui/scripts-tasks';
// You don't have to add scenarios to this structure unless you want their iterations to differ from the default.
export const scenarioIterations = {
export const scenarioIterations: ScenarioIterations = {
MakeStyles: 50000,
FluentProviderWithTheme: 10,
};
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { ScenarioNames } from '@fluentui/scripts-tasks';
// You don't have to add scenarios to this structure unless you want their display name to differ
// from their scenario name.
export const scenarioNames = {};
export const scenarioNames: ScenarioNames = {};
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { AllRenderTypes, ScenarioRenderTypes } from '@fluentui/scripts-tasks';
/**
* You don't have to add scenarios to this structure unless
* you want their render types to differ from the default (mount only).
Expand All @@ -8,9 +9,6 @@
* memoization logic help avoid certain code paths.
*/

const AllRenderTypes = ['mount', 'virtual-rerender', 'virtual-rerender-with-unmount'];
export const DefaultRenderTypes = ['mount'];

export const scenarioRenderTypes = {
export const scenarioRenderTypes: ScenarioRenderTypes = {
FluentProviderWithTheme: AllRenderTypes,
};
7 changes: 4 additions & 3 deletions apps/perf-test-react-components/just.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { getPerfRegressions } from './tasks/perf-test';
import { preset, task, series } from '@fluentui/scripts-tasks';
import { preset, task, series, getPerfRegressions } from '@fluentui/scripts-tasks';

import { config } from './config/perf-test';

preset();

task('run-perf-test', getPerfRegressions);
task('run-perf-test', () => getPerfRegressions(config));
task('perf-test', series('build', 'bundle', 'run-perf-test'));
4 changes: 1 addition & 3 deletions apps/perf-test-react-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"@fluentui/scripts-webpack": "*"
},
"dependencies": {
"@fluentui/scripts-perf-test-flamegrill": "*",
"@griffel/core": "^1.9.0",
"@fluentui/react-avatar": "^9.4.6",
"@fluentui/react-button": "^9.3.6",
Expand All @@ -27,9 +28,6 @@
"@fluentui/react-spinbutton": "^9.2.6",
"@fluentui/react-theme": "^9.1.7",
"@microsoft/load-themed-styles": "^1.10.26",
"flamegrill": "0.2.0",
"lodash": "^4.17.15",
"querystring": "^0.2.0",
"react": "17.0.2",
"react-dom": "17.0.2",
"tslib": "^2.1.0"
Expand Down
10 changes: 10 additions & 0 deletions apps/perf-test-react-components/src/app.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { loadScenarios, render } from '@fluentui/scripts-perf-test-flamegrill';

bootstrap();

function bootstrap() {
const reqContext = require.context('./scenarios/', false, /^\.\/[^\.]*\.(j|t)sx?$/);
const scenarios = loadScenarios(reqContext);

render(scenarios);
}
57 changes: 0 additions & 57 deletions apps/perf-test-react-components/src/index.scenarios.tsx

This file was deleted.

14 changes: 0 additions & 14 deletions apps/perf-test-react-components/src/scenarios/scenarioList.ts

This file was deleted.

2 changes: 1 addition & 1 deletion apps/perf-test-react-components/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const { resources } = require('@fluentui/scripts-webpack');
// TODO: Should root cause why this only works as a serve config.
module.exports = resources.createServeConfig(
{
entry: './src/index.scenarios.tsx',
entry: './src/app.tsx',
mode: 'production',
output: {
filename: 'perf-test.js',
Expand Down
24 changes: 24 additions & 0 deletions apps/perf-test/config/perf-test/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import * as path from 'path';
import { scenarioIterations } from './scenarioIterations';
import { scenarioRenderTypes } from './scenarioRenderTypes';
import { scenarioNames } from './scenarioNames';

const projectRoot = path.join(__dirname, '../../');
const projectRootPath = 'apps/perf-test';
const outDir = path.join(projectRoot, './dist');
const tempDir = path.join(projectRoot, './logfiles');
const scenariosSrcDirPath = path.join(projectRoot, './src/scenarios');

export const config = {
projectName: '@fluentui/react',
projectRootPath,
outDir,
tempDir,
scenarioIterations,
scenarioRenderTypes,
scenariosSrcDirPath,
excludeScenarios: [
// TeachingBubble perf test is hanging after puppeteer pin to v19. Disabling for now to unblock SWC migration work.
'TeachingBubble',
],
};
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import type { ScenarioIterations } from '@fluentui/scripts-tasks';

// You don't have to add scenarios to this structure unless you want their iterations to differ from the default.
export const scenarioIterations = {
export const scenarioIterations: ScenarioIterations = {
DocumentCardTitle: 1000,
Breadcrumb: 1000,
CommandBar: 1000,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import type { ScenarioNames } from '@fluentui/scripts-tasks';

// You don't have to add scenarios to this structure unless you want their display name to differ
// from their scenario name.
export const scenarioNames = {
export const scenarioNames: ScenarioNames = {
DetailsRowFast: 'DetailsRow (fast icons)',
DetailsRowNoStyles: 'DetailsRow without styles',
DocumentCardTitle: 'DocumentCardTitle with truncation',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { ScenarioRenderTypes, AllRenderTypes } from '@fluentui/scripts-tasks';

/**
* You don't have to add scenarios to this structure unless
* you want their render types to differ from the default (mount only).
Expand All @@ -8,10 +10,7 @@
* memoization logic help avoid certain code paths.
*/

const AllRenderTypes = ['mount', 'virtual-rerender', 'virtual-rerender-with-unmount'];
export const DefaultRenderTypes = ['mount'];

export const scenarioRenderTypes = {
export const scenarioRenderTypes: ScenarioRenderTypes = {
ThemeProvider: AllRenderTypes,
GroupedList: AllRenderTypes,
GroupedListV2: AllRenderTypes,
Expand Down
7 changes: 4 additions & 3 deletions apps/perf-test/just.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { getPerfRegressions } from './tasks/perf-test';
import { preset, task, series } from '@fluentui/scripts-tasks';
import { preset, task, series, getPerfRegressions } from '@fluentui/scripts-tasks';

import { config } from './config/perf-test';

preset();

task('run-perf-test', getPerfRegressions);
task('run-perf-test', () => getPerfRegressions(config));
task('perf-test', series('build', 'bundle', 'run-perf-test'));
6 changes: 2 additions & 4 deletions apps/perf-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,10 @@
"@fluentui/scripts-webpack": "*"
},
"dependencies": {
"@fluentui/scripts-perf-test-flamegrill": "*",
"@fluentui/example-data": "^8.4.7",
"@fluentui/react": "^8.107.0",
"@fluentui/react": "^8.107.1",
"@microsoft/load-themed-styles": "^1.10.26",
"flamegrill": "0.2.0",
"lodash": "^4.17.15",
"querystring": "^0.2.0",
"react": "17.0.2",
"react-dom": "17.0.2",
"tslib": "^2.1.0"
Expand Down
14 changes: 14 additions & 0 deletions apps/perf-test/src/app.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { loadScenarios, render } from '@fluentui/scripts-perf-test-flamegrill';

import { initializeIcons } from '@fluentui/react/lib/Icons';

bootstrap();

function bootstrap() {
const reqContext = require.context('./scenarios/', false, /^\.\/[^\.]*\.(j|t)sx?$/);
const scenarios = loadScenarios(reqContext);

initializeIcons();

render(scenarios);
}
60 changes: 0 additions & 60 deletions apps/perf-test/src/index.scenarios.tsx

This file was deleted.

14 changes: 0 additions & 14 deletions apps/perf-test/src/scenarios/scenarioList.ts

This file was deleted.

Loading

0 comments on commit fbaa26b

Please sign in to comment.