Skip to content

Commit

Permalink
Merge branch 'main' into usr/fengqi/exportContext
Browse files Browse the repository at this point in the history
  • Loading branch information
FengQiMS authored Feb 12, 2025
2 parents c3d35f4 + 71fdd08 commit fcdf69a
Show file tree
Hide file tree
Showing 524 changed files with 27,551 additions and 5,528 deletions.
77 changes: 71 additions & 6 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,34 @@
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nx", "import", "@rnx-kit"],
"rules": {
"no-restricted-globals": [
"error",
"window",
"document",
"customElements",
"devicePixelRatio",
"location",
"navigator",
"performance",
"cancelAnimationFrame",
"cancelIdleCallback",
"clearImmediate",
"clearInterval",
"clearTimeout",
"fetch",
"getComputedStyle",
"matchMedia",
"requestAnimationFrame",
"requestIdleCallback",
"setImmediate",
"setInterval",
"setTimeout",
"IntersectionObserver",
"MutationObserver",
"ResizeObserver"
]
},
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
Expand All @@ -12,10 +40,14 @@
"*.spec.tsx",
"*.spec.js",
"*.spec.jsx",
"*.component-browser-spec.tsx",
"*.component-browser-test.tsx",
"*.stories.ts",
"*.stories.tsx",
"**/generators/**/files/**",
"**/.storybook/**"
"**/.storybook/**",
"**/playwright.config.ts",
"**/playwright/**"
],
"rules": {
"import/no-extraneous-dependencies": ["error"]
Expand Down Expand Up @@ -49,25 +81,58 @@
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nx/typescript"],
"rules": {
"@typescript-eslint/consistent-type-definitions": "off"
"@typescript-eslint/consistent-type-definitions": "off",
"@typescript-eslint/no-extra-semi": "error",
"no-extra-semi": "off"
}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nx/javascript"],
"rules": {}
"rules": {
"@typescript-eslint/no-extra-semi": "error",
"no-extra-semi": "off"
}
},
{
"files": ["*.spec.ts", "*.spec.tsx", "*.spec.js", "*.spec.jsx"],
"files": [
"*.spec.ts",
"*.spec.tsx",
"*.spec.js",
"*.spec.jsx",
"*test.ts",
"*.test.tsx"
],
"env": {
"jest": true
},
"rules": {}
"rules": {
"no-restricted-globals": "off"
}
},
{
"files": "*.json",
"parser": "jsonc-eslint-parser",
"rules": {}
"rules": {
"@nx/dependency-checks": [
"error",
{
"includeTransitiveDependencies": false,
"ignoredDependencies": [
"@types/react",
"@types/react-dom",
"@swc/helpers"
],
"ignoredFiles": [
"{projectRoot}/playwright.config.ts",
"{projectRoot}/playwright/**",
"{projectRoot}/.storybook/**",
"{projectRoot}/stories/**",
"{projectRoot}/**/*.component-browser-spec.tsx"
]
}
]
}
}
]
}
27 changes: 21 additions & 6 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,15 +1,30 @@
#### Applications
apps/docsite @microsoft/cxe-prg

#### Packages
packages/react-chat/ @microsoft/teams-prg
packages/react-data-grid-react-window/ @microsoft/teams-prg
packages/react-shadow/ @microsoft/teams-prg
packages/nx-plugin/ @microsoft/teams-prg @microsoft/fluentui-react-build
packages/react-tree-grid/ @microsoft/teams-prg
packages/react-data-grid-react-window-grid/ @microsoft/ms-fabric
packages/react-draggable-dialog/ @microsoft/cxe-prg @marcosmoura
packages/pierce-dom @spmonahan
packages/pierce-dom/ @spmonahan
packages/houdini-utils @microsoft/teams-prg
packages/react-headless-provider/ @microsoft/teams-prg
packages/react-resize-handler/ @microsoft/teams-prg
packages/stylelint-plugin/ @microsoft/teams-prg
packages/react-themeless-provider/ @spmonahan
packages/azure-theme/ @microsoft/azure-ux-design-engineering
packages/variant-theme @microsoft/fluentui-variant-theme
packages/react-keytips @microsoft/cxe-prg @mainframev
packages/react-interactive-tab @microsoft/cxe-prg @dmytrokirpa
packages/react-gamepad-navigation @microsoft/cxe-prg @hectorjjb
packages/teams-components @microsoft/teams-prg
# <%= NX-CODEOWNER-PLACEHOLDER %>

#### Build/Infra
/tools/ @microsoft/fluentui-react-build
/.github/ @microsoft/fluentui-react-build
/tsconfig.base.json @microsoft/fluentui-react-build
/yarn.lock @microsoft/fluentui-react-build
Expand All @@ -29,9 +44,9 @@ packages/houdini-utils @microsoft/teams-prg
/.yarn/ @microsoft/fluentui-react-build

#### License and READMEs
/LICENSE @microsoft/teams-prg
/LICENSE @microsoft/teams-prg @microsoft/fluentui-react-build
/README.md @microsoft/teams-prg @microsoft/fluentui-react-build
/CONTRIBUTING.md @microsoft/teams-prg
/CODE_OF_CONDUCT.md @microsoft/teams-prg
/SECURITY.md @microsoft/teams-prg
/SUPPORT.md @microsoft/teams-prg
/CONTRIBUTING.md @microsoft/teams-prg @microsoft/fluentui-react-build
/CODE_OF_CONDUCT.md @microsoft/teams-prg @microsoft/fluentui-react-build
/SECURITY.md @microsoft/teams-prg @microsoft/fluentui-react-build
/SUPPORT.md @microsoft/teams-prg @microsoft/fluentui-react-build
6 changes: 3 additions & 3 deletions .github/workflows/ci-change.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: '18'
node-version: '20'

- run: npx beachball check --changehint "Run 'yarn change' to generate a change file"
50 changes: 22 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,29 @@ on:
- main
pull_request:

env:
NX_PARALLEL: 2 # ubuntu-latest = 2-core CPU / 7 GB of RAM
NX_VERBOSE_LOGGING: true

jobs:
main:
runs-on: ubuntu-latest
permissions:
contents: 'read'
actions: 'read'

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v2
uses: nrwl/nx-set-shas@v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
cache: 'yarn'
node-version: '18'
node-version: '20'

- run: yarn install --frozen-lockfile

Expand All @@ -28,33 +36,19 @@ jobs:

- run: yarn check-dependencies

- run: yarn nx affected --target=type-check --parallel --max-parallel=3
- run: yarn nx affected --target=build --parallel --max-parallel=3
- run: yarn nx affected --target=build-storybook --parallel --max-parallel=3
- run: yarn nx affected --target=test --parallel --max-parallel=2
- run: yarn nx affected --target=component-test --parallel --max-parallel=2
- run: yarn nx affected --target=lint --parallel --max-parallel=3
- name: Install Playwright Browsers
run: npx playwright install --with-deps

- run: yarn nx affected --target=verify-integrity
- run: yarn nx affected --target=build
- run: yarn nx affected --target=build-storybook
- run: yarn nx affected --target=type-check
- run: yarn nx affected --target=lint
- run: yarn nx affected --target=test
- run: yarn nx affected --target=component-test --skipInstall
- run: yarn nx format:check --base origin/main

- name: 'Check for unstaged changes'
run: |
git status --porcelain
git diff-index --quiet HEAD -- || exit 1
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Derive appropriate SHAs for base and head for `nx affected` commands
uses: nrwl/nx-set-shas@v2

- uses: actions/setup-node@v3
with:
cache: 'yarn'
node-version: '18'

- run: yarn install --frozen-lockfile
- run: yarn nx affected --target=build-storybook --parallel --max-parallel=3
12 changes: 8 additions & 4 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ permissions:
pages: write
id-token: write

env:
NX_PARALLEL: 2 # ubuntu-latest = 2-core CPU / 7 GB of RAM
NX_VERBOSE_LOGGING: true

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
Expand All @@ -26,17 +30,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
cache: 'yarn'
node-version: '18'
node-version: '20'

- run: yarn install --frozen-lockfile
- run: yarn nx run-many --target=build-storybook --parallel --max-parallel=3
- run: yarn nx run-many --target=build-storybook

- name: Setup Pages
uses: actions/configure-pages@v3
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ tmp

# dependencies
node_modules
# we use yarn
package-lock.json

# IDEs and editors
/.idea
Expand Down Expand Up @@ -40,6 +42,7 @@ Thumbs.db

# nx
.nx/cache
.nx/workspace-data

# playwright
**/test-results/
Expand Down
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
.yarn/
patches/
packages/nx-plugin/src/generators/**/files/

/.nx/cache
/.nx/workspace-data
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import * as React from 'react';
import { DocsContainer, type DocsContextProps } from '@storybook/addon-docs';
import { webLightTheme, FluentProvider } from '@fluentui/react-components';

interface FluentDocsContainerProps {
children: React.ReactNode;
context: DocsContextProps;
}

/**
* A container that wraps storybook's native docs container to add extra components to the docs experience
*/
export const FluentDocsContainer = ({
children,
context,
}: FluentDocsContainerProps) => {
return (
<FluentProvider
className="sb-unstyled"
style={{ backgroundColor: 'transparent' }}
theme={webLightTheme}
>
<DocsContainer context={context}>{children}</DocsContainer>
</FluentProvider>
);
};
Loading

0 comments on commit fcdf69a

Please sign in to comment.