Skip to content

Commit

Permalink
Merge branch 'master' into marcosmoura/fix/card-a11y
Browse files Browse the repository at this point in the history
* master: (34 commits)
  chore(react-tooltip): migrate to new package structure (microsoft#25818)
  chore(react-field): migrate to new package structure (microsoft#25817)
  Update vr screenshotdiff lib to accept vr host url as param (microsoft#25772)
  feat(scripts): enable strict checking for additional sub-folders(packages) v4 (microsoft#25710)
  fix(tools): bump norhtstar packages v9 deps on dep mismatch resolution (microsoft#25806)
  feat: remove react-storybook and replace its functionality via standard react-storybook-addon package (microsoft#25786)
  applying package updates
  chore(react-spinbutton): migrate to new package structure (microsoft#25813)
  chore(react-spinner): migrate to new package structure (microsoft#25814)
  chore(react-provider): migrate to new package structure (microsoft#25809)
  chore(react-radio, shared-contexts): migrate to new package structure (microsoft#25810)
  chore(react-theme): migrate to new package structure (microsoft#25812)
  docs: add Fluent UI Insights EP04 to README (microsoft#25775)
  chore(react-migration-v8-v9): use same build process/setup as v9/ts-solution packages (microsoft#25679)
  docs: Improves `Table` documentation (microsoft#25787)
  feat: improve react-18 tests (microsoft#25758)
  docs: Add examples for DataGrid (microsoft#25783)
  chore(react-tree): scaffold TreeItemLayout (microsoft#25781)
  perf: make ts-minbar test compilation faster and asset preparation simpler (microsoft#25754)
  chore: creates TreeItem and basic Tree (microsoft#25742)
  ...
  • Loading branch information
marcosmoura committed Nov 29, 2022
2 parents 1d22afc + 3fdfc72 commit 231e0df
Show file tree
Hide file tree
Showing 565 changed files with 5,105 additions and 5,363 deletions.
1 change: 0 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ packages/react-monaco-editor @microsoft/fluentui-v8-website
packages/react-components/react-positioning @microsoft/teams-prg
packages/react-components/react-overflow @microsoft/teams-prg
packages/react-components/react-shared-contexts @microsoft/teams-prg
packages/react-components/react-storybook @microsoft/cxe-prg @microsoft/teams-prg
packages/react-components/react-storybook-addon @microsoft/cxe-prg
packages/react-components/react-tabster @microsoft/teams-prg
packages/react-components/react-theme @microsoft/teams-prg
Expand Down
3 changes: 1 addition & 2 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { withFluentProvider, withStrictMode } from '@fluentui/react-storybook';
import 'cypress-storybook/react';
import * as dedent from 'dedent';
import './docs-root.css';
Expand All @@ -23,7 +22,7 @@ window.__setCurrentStory = function (categorization, story) {
};

/** @type {NonNullable<import('@storybook/react').Story['decorators']>} */
export const decorators = [withFluentProvider, withStrictMode];
export const decorators = [];

/** @type {import('@storybook/addons').Parameters} */
export const parameters = {
Expand Down
6 changes: 3 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "Debug test",
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/scripts/debug-test.js",
"program": "${workspaceRoot}/scripts/executors/debug-test.js",
"cwd": "${fileDirname}",
"stopOnEntry": false,
"args": ["-i", "--watch"],
Expand All @@ -22,7 +22,7 @@
"name": "Debug current open test",
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/scripts/debug-test.js",
"program": "${workspaceRoot}/scripts/executors/debug-test.js",
"cwd": "${fileDirname}",
"stopOnEntry": false,
"args": ["-i", "--testPathPattern=\\b${fileBasenameNoExtension}", "--watch"],
Expand All @@ -39,7 +39,7 @@
"name": "Debug current open test (v0)",
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/scripts/debug-test.js",
"program": "${workspaceRoot}/scripts/executors/debug-test.js",
"cwd": "${fileDirname}",
"stopOnEntry": false,
"args": ["-i", "--testPathPattern=\\b${fileBasenameNoExtension}", "--watch"],
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ The following table will help you navigate the 3 projects and understand their d
| :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| <a href="https://learn.microsoft.com/en-us/shows/fluent-ui-insights/fluent-ui-insights-positioning?utm_source=github" target="_blank"><img src="ghdocs/medias/fluentui-ep01-preview.gif" alt="Watch EP01: Positioning" width="240" /></a> | <a href="https://learn.microsoft.com/en-us/shows/fluent-ui-insights/fluent-ui-insights-styling?utm_source=github" target="_blank"><img src="ghdocs/medias/fluentui-ep02-preview.gif" alt="Watch EP02: Styling" width="240" /></a> | <a href="https://learn.microsoft.com/en-us/shows/fluent-ui-insights/fluent-ui-insights-griffel?utm_source=github" target="_blank"><img src="ghdocs/medias/fluentui-ep03-preview.gif" alt="Watch EP03: Griffel" width="240" /></a> |

| EP04: Foundational APIs |
| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| <a href="https://youtu.be/uxuIJlYmKGk?utm_source=github" target="_blank"><img src="ghdocs/medias/fluentui-ep04-preview.gif" alt="Watch EP04: Foundational APIs" width="240" /></a> |

## Licenses

All files on the Fluent UI React GitHub repository are subject to the MIT license. Please read the License file at the root of the project.
Expand Down
2 changes: 1 addition & 1 deletion apps/perf-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"dependencies": {
"@fluentui/example-data": "^8.4.3",
"@fluentui/react": "^8.103.0",
"@fluentui/react": "^8.103.2",
"@fluentui/scripts": "^1.0.0",
"@microsoft/load-themed-styles": "^1.10.26",
"flamegrill": "0.2.0",
Expand Down
10 changes: 5 additions & 5 deletions apps/public-docsite-resources/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@
"@fluentui/scripts": "^1.0.0"
},
"dependencies": {
"@fluentui/react": "^8.103.0",
"@fluentui/react": "^8.103.2",
"@fluentui/react-examples": "^8.34.4",
"@microsoft/load-themed-styles": "^1.10.26",
"@fluentui/azure-themes": "^8.5.28",
"@fluentui/react-docsite-components": "^8.10.27",
"@fluentui/azure-themes": "^8.5.30",
"@fluentui/react-docsite-components": "^8.10.29",
"@fluentui/font-icons-mdl2": "^8.5.4",
"@fluentui/set-version": "^8.2.3",
"@fluentui/theme-samples": "^8.7.27",
"@fluentui/react-monaco-editor": "^1.7.27",
"@fluentui/theme-samples": "^8.7.29",
"@fluentui/react-monaco-editor": "^1.7.29",
"office-ui-fabric-core": "^11.0.0",
"react": "17.0.2",
"react-dom": "17.0.2",
Expand Down
2 changes: 1 addition & 1 deletion apps/public-docsite-v9/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@fluentui/scripts": "^1.0.0"
},
"dependencies": {
"@fluentui/react": "^8.103.0",
"@fluentui/react": "^8.103.2",
"@fluentui/react-northstar": "^0.64.0",
"@fluentui/react-icons-northstar": "^0.64.0",
"@fluentui/scripts": "^1.0.0",
Expand Down
10 changes: 5 additions & 5 deletions apps/public-docsite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,24 @@
"devDependencies": {
"@fluentui/common-styles": "^1.2.13",
"@fluentui/eslint-plugin": "*",
"@fluentui/react-monaco-editor": "^1.7.27",
"@fluentui/react-monaco-editor": "^1.7.29",
"@fluentui/scripts": "^1.0.0",
"write-file-webpack-plugin": "^4.1.0"
},
"dependencies": {
"@fluentui/font-icons-mdl2": "^8.5.4",
"@fluentui/public-docsite-resources": "^8.1.41",
"@fluentui/public-docsite-setup": "^0.3.13",
"@fluentui/react": "^8.103.0",
"@fluentui/react-docsite-components": "^8.10.27",
"@fluentui/react": "^8.103.2",
"@fluentui/react-docsite-components": "^8.10.29",
"@fluentui/react-examples": "^8.34.4",
"@fluentui/react-experiments": "^8.14.22",
"@fluentui/react-experiments": "^8.14.24",
"@fluentui/react-file-type-icons": "^8.8.3",
"@fluentui/react-icons-mdl2": "^1.3.27",
"@fluentui/react-icons-mdl2-branded": "^1.2.28",
"@fluentui/set-version": "^8.2.3",
"@fluentui/theme": "^2.6.19",
"@fluentui/theme-samples": "^8.7.27",
"@fluentui/theme-samples": "^8.7.29",
"@fluentui/utilities": "^8.13.4",
"@microsoft/load-themed-styles": "^1.10.26",
"office-ui-fabric-core": "^11.0.0",
Expand Down
7 changes: 2 additions & 5 deletions apps/react-18-tests-v8/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{
"extends": ["plugin:@fluentui/eslint-plugin/react--legacy"],
"extends": ["plugin:@fluentui/eslint-plugin/react"],
"root": true,
"rules": {
"deprecation/deprecation": "off",
"prefer-const": "off"
}
"rules": {}
}
11 changes: 10 additions & 1 deletion apps/react-18-tests-v8/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// @ts-check

const { resolveMergeStylesSerializer } = require('@fluentui/scripts/jest/jest-resources');
const getResolveAlias = require('@fluentui/scripts/webpack/getResolveAlias');

/**
* @type {import('@jest/types').Config.InitialOptions}
*/
Expand All @@ -9,12 +12,18 @@ module.exports = {
globals: {
'ts-jest': {
tsConfig: '<rootDir>/tsconfig.spec.json',
diagnostics: false,
diagnostics: { warnOnly: true, exclude: ['packages/**'] },
},
},
transform: {
'^.+\\.tsx?$': 'ts-jest',
},

coverageDirectory: './coverage',
setupFilesAfterEnv: ['./config/tests.js'],
moduleNameMapper: {
'\\.(scss)$': '@fluentui/scripts/jest/jest-style-mock.js',
...getResolveAlias(),
},
snapshotSerializers: [resolveMergeStylesSerializer()],
};
25 changes: 11 additions & 14 deletions apps/react-18-tests-v8/package.json
Original file line number Diff line number Diff line change
@@ -1,30 +1,27 @@
{
"name": "@fluentui/react-18-tests-v8",
"description": "React 18 test application",
"version": "1.0.0",
"version": "8.0.0",
"private": true,
"scripts": {
"build": "just-scripts build",
"clean": "just-scripts clean",
"code-style": "just-scripts code-style",
"type-check": "tsc -b tsconfig.json",
"format": "prettier -w . --ignore-path ../.prettierignore",
"format:check": "yarn format -c",
"e2e": "cypress run --component",
"e2e:local": "cypress open --component",
"lint": "just-scripts lint",
"test": "just-scripts test",
"just": "just-scripts",
"start": "webpack-dev-server --mode=development --config=webpack.config.js",
"type-check": "tsc -b tsconfig.json"
"lint": "eslint --ext .js,.ts.,.tsx ./src",
"test": "jest --passWithNoTests",
"start": "webpack-dev-server --mode=development"
},
"devDependencies": {
"@fluentui/eslint-plugin": "*",
"@fluentui/scripts": "^1.0.0",
"@types/react": "18.0.14",
"@types/react-dom": "18.0.6",
"swc-loader": "^0.2.3"
"@fluentui/scripts": "^1.0.0"
},
"dependencies": {
"@fluentui/react": "^8.103.0",
"@fluentui/react": "^8.103.2",
"@fluentui/react-hooks": "^8.6.14",
"@types/react": "18.0.14",
"@types/react-dom": "18.0.6",
"react": "18.2.0",
"react-dom": "18.2.0",
"tslib": "^2.1.0"
Expand Down
2 changes: 1 addition & 1 deletion apps/react-18-tests-v8/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react';
import { ThemeProvider, DefaultButton, PartialTheme, getTheme } from '@fluentui/react';
import { useBoolean } from '@fluentui/react-hooks';
import { ContextualMenuExample } from './components/index';
import { ContextualMenuExample } from './components';

// This app is here as a simple sandbox to render v8 controls inside of an React 18 environment.

Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import * as React from 'react';
import { mount } from '@cypress/react';

import { ContextualMenuExample } from './ContextualMenuExample';

const menuTriggerSelector = '[type="button"]';
const menuSelector = '[role="menu"]';

describe('ContextualMenu in React 18', () => {
it('renders ContextualMenu when trigger button is clicked', () => {
mount(
<React.StrictMode>
<ContextualMenuExample />
</React.StrictMode>,
);

cy.get(menuTriggerSelector).click().get(menuSelector).should('be.visible');
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import * as React from 'react';
import { render } from '@testing-library/react';
import userEvent from '@testing-library/user-event';

import { ContextualMenuExample } from './ContextualMenuExample';

describe('ContextualMenu in React 18', () => {
// eslint-disable-next-line @typescript-eslint/no-empty-function
const noop = () => {};

beforeEach(() => {
jest.spyOn(console, 'warn').mockImplementation(noop);
});

it('should render ContextualMenu when trigger button is clicked', () => {
const { getByRole, queryAllByRole } = render(
<React.StrictMode>
<ContextualMenuExample />
</React.StrictMode>,
);

expect(queryAllByRole('menu').length).toBe(0);

const menuTrigger = getByRole('button');
userEvent.click(menuTrigger);

expect(queryAllByRole('menu').length).toBe(1);
});
});
4 changes: 2 additions & 2 deletions apps/react-18-tests-v8/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"declaration": true,
"declarationDir": "dist/types",
"inlineSources": true,
"types": ["static-assets", "environment", "node"]
"types": ["static-assets", "environment"]
},
"exclude": ["./src/common/**", "**/*.spec.ts", "**/*.spec.tsx", "**/*.test.ts", "**/*.test.tsx"],
"exclude": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.test.ts", "**/*.test.tsx", "**/*.cy.ts", "**/*.cy.tsx"],
"include": ["./src/**/*.ts", "./src/**/*.tsx"]
}
4 changes: 2 additions & 2 deletions apps/react-18-tests-v8/tsconfig.cy.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"compilerOptions": {
"jsx": "react",
"isolatedModules": false,
"types": ["node", "cypress", "cypress-storybook/cypress", "cypress-real-events"],
"types": ["node", "cypress", "cypress-real-events"],
"lib": ["ES2019", "dom"]
},
"include": ["./src/**/*.e2e.ts", "./src/**/*.e2e.tsx"]
"include": ["./src/**/*.cy.ts", "./src/**/*.cy.tsx"]
}
Loading

0 comments on commit 231e0df

Please sign in to comment.