Skip to content

Commit

Permalink
Merge branch 'master' into marcosmoura/feat/drawer-component
Browse files Browse the repository at this point in the history
* master: (141 commits)
  chore: prerequisite changes before migrating v9 packages to SWC based transpilation (microsoft#26965)
  feat: Add InfoLabel component (microsoft#27118)
  fix(tools): update migrate-converged generator to add node field to package.json exports map (microsoft#27152)
  applying package updates
  fix: Embed play/pause indicator should render correctly in high contrast mode (microsoft#27213)
  feat(tokens): Add colorNeutralBackgroundAlpha and colorNeutralStrokeAlpha tokens (microsoft#27034)
  chore: Prepare release 0.66.4 (microsoft#27163)
  fix(react-datepicker-compat): Fix text entry issues with input (microsoft#27204)
  fix: Smooth out animation of indeterminate progress bar (microsoft#27201)
  Add cxe-red as a codeowner of react-file-type-icons (microsoft#27147)
  Added documentation about custom style hooks (microsoft#27087)
  Custom style react-text (microsoft#27078)
  Custom style react-image (microsoft#27066)
  Add JSDoc for tabster focus indicator selector (microsoft#27041)
  Theme designer: Move colors to local files (microsoft#27191)
  docs(react-card): move card out of preview (microsoft#27185)
  Include values in typography table (microsoft#27189)
  feat: accept a className in `mountNode` in `Portal` (microsoft#27008)
  RFC: Extend `mountNode` prop in `Portal` (microsoft#27009)
  applying package updates
  ...
  • Loading branch information
marcosmoura committed Mar 15, 2023
2 parents 05a6c99 + 189ef97 commit 68ba7bf
Show file tree
Hide file tree
Showing 1,651 changed files with 35,084 additions and 10,927 deletions.
18 changes: 0 additions & 18 deletions .devops/templates/runpublishvrscreenshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ parameters:
- name: vrTestPackagePath
type: string
default: 'apps/vr-tests'
- name: shouldBuildstorybookaddon
type: boolean
default: false
- name: shouldBuildNorthstar
type: boolean
default: false

steps:
- task: Bash@3
Expand All @@ -39,18 +33,6 @@ steps:
fi
displayName: Check if vrTests should be skipped
- ${{ if eq(parameters.shouldBuildstorybookaddon, 'true') }}:
- script: |
yarn build --to @fluentui/react-storybook-addon
displayName: Build react-storybook-addon
condition: eq(variables['vrTestSkip'], 'no')
- ${{ if eq(parameters.shouldBuildNorthstar, 'true') }}:
- script: |
yarn build --to @fluentui/docs
displayName: Build react-northstar
condition: eq(variables['vrTestSkip'], 'no')
- script: |
yarn workspace ${{ parameters.vrTestPackageName }} vr:build
displayName: Build VR tests components package
Expand Down
15 changes: 9 additions & 6 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,12 @@ apps/public-docsite-v9 @microsoft/cxe-red @microsoft/cxe-coastal @microsoft/flue
apps/theming-designer @microsoft/fluentui-react
apps/ssr-tests-v9 @microsoft/fluentui-react-build
apps/stress-test @microsoft/cxe-red @spmonahan @micahgodbolt
apps/recipes-react-components @microsoft/cxe-red @microsoft/cxe-coastal @microsoft/fluentui-react-build @sopranopillow
apps/react-18-tests-v8 @microsoft/cxe-red @microsoft/cxe-coastal @micahgodbolt
apps/react-18-tests-v9 @microsoft/cxe-red @microsoft/cxe-coastal @micahgodbolt
apps/recipes-react-components @microsoft/cxe-red @microsoft/cxe-coastal @microsoft/fluentui-react @sopranopillow

#### Packages
packages/azure-themes @robtaft-ms @Jacqueline-ms
packages/azure-themes @Jacqueline-ms
packages/bundle-size @microsoft/teams-prg
packages/date-time-utilities @microsoft/cxe-red
packages/eslint-plugin @microsoft/fluentui-react-build
Expand All @@ -138,8 +140,9 @@ packages/react-components/react-conformance-griffel @microsoft/teams-prg
packages/react-components/react-context-selector @microsoft/teams-prg
packages/react-date-time @microsoft/cxe-red
packages/react-docsite-components @microsoft/fluentui-v8-website
packages/react-file-type-icons @jahnp @bigbadcapers
packages/react-file-type-icons @microsoft/cxe-red @jahnp @bigbadcapers
packages/react-hooks @microsoft/cxe-red
packages/react-icons-mdl2 @microsoft/cxe-red @microsoft/cxe-coastal
packages/react-monaco-editor @microsoft/fluentui-v8-website
packages/react-components/react-positioning @microsoft/teams-prg
packages/react-components/react-overflow @microsoft/teams-prg
Expand Down Expand Up @@ -214,7 +217,7 @@ packages/tokens @microsoft/teams-prg
packages/react-components/react-tags @microsoft/cxe-coastal @TristanWatanabe
packages/react-components/react-data-grid-react-window @microsoft/teams-prg
packages/react-components/react-migration-v0-v9 @microsoft/teams-prg
packages/react-components/react-datepicker @microsoft/cxe-red @sopranopillow @khmakoto
packages/react-components/react-datepicker-compat @microsoft/cxe-red @sopranopillow @khmakoto
packages/react-components/react-migration-v8-v9 @microsoft/cxe-red @microsoft/cxe-coastal @geoffcoxmsft
packages/react-components/react-breadcrumb @microsoft/cxe-prg
packages/react-components/react-drawer @microsoft/cxe-prg
Expand All @@ -233,11 +236,11 @@ packages/react/src/components/CalendarDayGrid @microsoft/cxe-red
packages/react/src/components/Check @microsoft/cxe-red @microsoft/cxe-coastal @ThomasMichon @khmakoto
packages/react/src/components/Checkbox @microsoft/cxe-red @microsoft/cxe-coastal @khmakoto
packages/react/src/components/ChoiceGroup @microsoft/cxe-red @microsoft/cxe-coastal
packages/react/src/components/Coachmark @microsoft/cxe-red @microsoft/cxe-coastal @leddie24
packages/react/src/components/Coachmark @microsoft/cxe-red @microsoft/cxe-coastal
packages/react/src/components/ColorPicker @microsoft/cxe-red @microsoft/cxe-coastal
packages/react/src/components/DatePicker @microsoft/cxe-red
packages/react/src/components/DetailsList @microsoft/cxe-red @microsoft/cxe-coastal @ThomasMichon
packages/react/src/components/DocumentCard @microsoft/cxe-red @microsoft/cxe-coastal @yiminwu
packages/react/src/components/DocumentCard @microsoft/cxe-red @microsoft/cxe-coastal
packages/react/src/components/Fabric @microsoft/cxe-red @microsoft/cxe-coastal @dzearing
packages/react/src/components/Facepile @microsoft/cxe-red @microsoft/cxe-coastal
packages/react/src/components/FolderCover @microsoft/cxe-red @microsoft/cxe-coastal @ThomasMichon @bigbadcapers
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/check-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: actions/setup-node@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,5 @@
"typescript.preferences.importModuleSpecifierEnding": "index",
"typescript.tsdk": "./node_modules/typescript/lib",
"typescript.reportStyleChecksAsWarnings": false,
"cSpell.words": ["beachball", "fluentui", "griffel", "spinbutton", "tabster"]
"cSpell.words": ["beachball", "borderless", "fluentui", "griffel", "spinbutton", "tabster"]
}
16 changes: 8 additions & 8 deletions apps/perf-test-react-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
},
"dependencies": {
"@griffel/core": "^1.9.0",
"@fluentui/react-avatar": "^9.3.7",
"@fluentui/react-button": "^9.2.5",
"@fluentui/react-field": "9.0.0-alpha.21",
"@fluentui/react-infobutton": "9.0.0-beta.17",
"@fluentui/react-persona": "^9.1.13",
"@fluentui/react-provider": "^9.3.5",
"@fluentui/react-spinbutton": "^9.1.7",
"@fluentui/react-theme": "^9.1.5",
"@fluentui/react-avatar": "^9.4.3",
"@fluentui/react-button": "^9.3.3",
"@fluentui/react-field": "9.0.0-alpha.25",
"@fluentui/react-infobutton": "9.0.0-beta.21",
"@fluentui/react-persona": "^9.2.3",
"@fluentui/react-provider": "^9.4.3",
"@fluentui/react-spinbutton": "^9.2.3",
"@fluentui/react-theme": "^9.1.6",
"@microsoft/load-themed-styles": "^1.10.26",
"flamegrill": "0.2.0",
"lodash": "^4.17.15",
Expand Down
3 changes: 1 addition & 2 deletions apps/perf-test-react-components/src/scenarios/Persona.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ const Scenario = () => (
presence={{ status: 'available' }}
avatar={{
image: {
src:
'https://res-1.cdn.office.net/files/fabric-cdn-prod_20221209.001/office-ui-fabric-react-assets/persona-male.png',
src: 'https://res-1.cdn.office.net/files/fabric-cdn-prod_20221209.001/office-ui-fabric-react-assets/persona-male.png',
},
}}
/>
Expand Down
15 changes: 8 additions & 7 deletions apps/perf-test-react-components/tasks/perf-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,15 +226,16 @@ export async function getPerfRegressions() {
* Create test summary based on test results.
*/
function createReport(scenarioSettings: ScenarioSetting, testResults: CookResults) {
const report = '## [Perf Analysis (`@fluentui/react-components`)](https://github.com/microsoft/fluentui/wiki/Perf-Testing)\n'
const report =
'## [Perf Analysis (`@fluentui/react-components`)](https://github.com/microsoft/fluentui/wiki/Perf-Testing)\n'

// Show only significant changes by default.
.concat(createScenarioTable(scenarioSettings, testResults, false))
// Show only significant changes by default.
.concat(createScenarioTable(scenarioSettings, testResults, false))

// Show all results in a collapsible table.
.concat('<details><summary>All results</summary><p>')
.concat(createScenarioTable(scenarioSettings, testResults, true))
.concat('</p></details>\n\n');
// Show all results in a collapsible table.
.concat('<details><summary>All results</summary><p>')
.concat(createScenarioTable(scenarioSettings, testResults, true))
.concat('</p></details>\n\n');

return report;
}
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 @@ -18,7 +18,7 @@
},
"dependencies": {
"@fluentui/example-data": "^8.4.6",
"@fluentui/react": "^8.106.1",
"@fluentui/react": "^8.106.6",
"@microsoft/load-themed-styles": "^1.10.26",
"flamegrill": "0.2.0",
"lodash": "^4.17.15",
Expand Down
4 changes: 3 additions & 1 deletion apps/perf-test/tasks/perf-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ export async function getPerfRegressions() {
}
});

const scenarioList = scenariosArg.length > 0 ? scenariosArg : scenariosAvailable;
let scenarioList = scenariosArg.length > 0 ? scenariosArg : scenariosAvailable;
// TeachingBubble perf test is hanging after puppeteer pin to v19. Disabling for now to unblock SWC migration work.
scenarioList = scenarioList.filter(scenario => scenario !== 'TeachingBubble');

const scenarios: Scenarios = {};
const scenarioSettings: ScenarioSetting = {};
Expand Down
12 changes: 6 additions & 6 deletions apps/public-docsite-resources/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@
"@fluentui/scripts-webpack": "*"
},
"dependencies": {
"@fluentui/react": "^8.106.1",
"@fluentui/react": "^8.106.6",
"@fluentui/react-examples": "^8.34.4",
"@microsoft/load-themed-styles": "^1.10.26",
"@fluentui/azure-themes": "^8.5.64",
"@fluentui/react-docsite-components": "^8.11.25",
"@fluentui/font-icons-mdl2": "^8.5.9",
"@fluentui/azure-themes": "^8.5.69",
"@fluentui/react-docsite-components": "^8.11.30",
"@fluentui/font-icons-mdl2": "^8.5.12",
"@fluentui/set-version": "^8.2.5",
"@fluentui/theme-samples": "^8.7.60",
"@fluentui/react-monaco-editor": "^1.7.60",
"@fluentui/theme-samples": "^8.7.65",
"@fluentui/react-monaco-editor": "^1.7.65",
"office-ui-fabric-core": "^11.0.0",
"react": "17.0.2",
"react-dom": "17.0.2",
Expand Down
4 changes: 2 additions & 2 deletions apps/public-docsite-v9/.storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ module.exports = /** @type {Omit<import('../../../.storybook/main'), 'typescript
'../src/**/*.stories.mdx',
'../src/**/*.stories.@(ts|tsx)',
...getPackageStoriesGlob({ packageName: '@fluentui/react-components', callerPath: __dirname }),
'../../../packages/react-components/react-migration-v0-v9/src/**/@(index.stories.@(ts|tsx)|*.stories.mdx)',
'../../../packages/react-components/react-migration-v8-v9/src/**/@(index.stories.@(ts|tsx)|*.stories.mdx)',
'../../../packages/react-components/react-migration-v0-v9/stories/**/@(index.stories.@(ts|tsx)|*.stories.mdx)',
'../../../packages/react-components/react-migration-v8-v9/stories/**/@(index.stories.@(ts|tsx)|*.stories.mdx)',
],
staticDirs: ['../public'],
addons: [...rootMain.addons],
Expand Down
10 changes: 5 additions & 5 deletions apps/public-docsite-v9/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
"@fluentui/scripts-tasks": "*"
},
"dependencies": {
"@fluentui/react-migration-v8-v9": "^9.1.9",
"@fluentui/react-migration-v8-v9": "^9.2.0",
"@fluentui/react-migration-v0-v9": "9.0.0-alpha.0",
"@fluentui/react": "^8.106.1",
"@fluentui/react-northstar": "^0.66.1",
"@fluentui/react-icons-northstar": "^0.66.1",
"@fluentui/react-components": "^9.15.6",
"@fluentui/react": "^8.106.6",
"@fluentui/react-northstar": "^0.66.4",
"@fluentui/react-icons-northstar": "^0.66.4",
"@fluentui/react-components": "^9.18.1",
"@fluentui/react-storybook-addon": "9.0.0-rc.1",
"@fluentui/react-storybook-addon-codesandbox": "9.0.0-alpha.0",
"@griffel/react": "^1.5.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
import { Meta } from '@storybook/addon-docs';

<Meta title="Concepts/Migration/from v0/Components/Box Migration" />

# Box component Migration guide

## Overview:

`Box` component is replaced by `Primitive`.

Before:

```tsx
import { Box } from '@fluentui/react-northstar';
const Component = () => <Box />;
```

After:

```tsx
import { Primitive } from '@fluentui/react-migration-v0-v9';
const Component = () => <Primitive />;
```

## How to migrate props:

| Box props | migrate guide |
| ------------------------- | -------------------------------------------------------------------------------------------------------- |
| as, className | keep it as is |
| content | see [Migrate content prop](#./Migrate-`content`-prop) in this document |
| variables, design, styles | see [Migrate style overrides](#./Migrate-style-overrides) in this document |
| accessibility | see [migrate-custom-accessibility.md](?path=/docs/concepts-migration-from-v0-custom-accessibility--page) |

---

## Migrate `content` prop

Move `content` to JSX children.

Before:

```tsx
import { Box } from '@fluentui/react-northstar';
const Component = () => <Box content="hi" />;
```

After:

```tsx
import { Primitive } from '@fluentui/react-migration-v0-v9';
const Component = () => <Primitive>hi</Primitive>;
```

## Migrate style overrides

⚠️ **If this is your first migration**, please read [the general guide on how to migrate styles](?path=/docs/concepts-migration-from-v0-custom-style-overrides--page).

### Example for migrate boolean `variables`:

Before:

```tsx
// in COMPONENT_NAME.tsx
import { Box } from '@fluentui/react-northstar';

export const Component = () => <Box variables={{ isWideBox: true }} />;

// in box-styles.ts
export const boxStyles1 = {
root: ({ variables: { isWideBox } }) => ({
...(isWideBox && {
width: '100%',
}),
}),
};
```

After:

```tsx
// in COMPONENT_NAME.tsx
import { Primitive } from '@fluentui/react-migration-v0-v9';
import { useStyles } from './COMPONENT_NAME.styles.ts';

export const Component = () => {
const classes = useStyles();
return <Primitive className={classes.wideBox} />;
};

// in COMPONENT_NAME.styles.ts
import { makeStyles } from '@fluentui/react-components';

export const useStyles = makeStyles({
wideBox: {
width: '100%',
},
});
```
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import { Meta } from '@storybook/addon-docs';

## Overview:

To help with the migration we also offer a mixin that [can be checked here](/docs/migration-shims-v0-buttonmixins--disabled-cursor)

Before:

```tsx
Expand Down
Loading

0 comments on commit 68ba7bf

Please sign in to comment.