diff --git a/.devops/templates/publish-website.yml b/.devops/templates/publish-website.yml new file mode 100644 index 00000000000000..9dae51b47ff6b6 --- /dev/null +++ b/.devops/templates/publish-website.yml @@ -0,0 +1,50 @@ +parameters: + - name: version + type: string + default: 8 + +steps: + - task: AzureCLI@2 + displayName: 'Copy website drop to Azure' + inputs: + azureSubscription: 'Azure - fabricweb storage - NEW' + scriptType: 'bash' + scriptLocation: inlineScript + inlineScript: | + az storage blob upload-batch \ + --destination 'fabric-website' \ + --source $(System.DefaultWorkingDirectory)/apps/public-docsite/dist \ + --account-name fabricweb \ + --destination-path v${{ parameters.version }}/$(Build.BuildNumber)/ \ + --auth-mode login \ + --overwrite + + - task: AzureCLI@2 + displayName: 'Update dogfood manifest in Azure blob' + inputs: + azureSubscription: 'Azure - fabricweb storage - NEW' + scriptType: 'bash' + scriptLocation: inlineScript + inlineScript: | + az storage blob upload \ + --account-name fabricweb \ + --container-name fabric-website \ + --name manifests/v${{ parameters.version }}-df.js \ + --file $(System.DefaultWorkingDirectory)/site-manifests/v${{ parameters.version }}-df.js \ + --auth-mode login \ + --overwrite + + - task: AzureCLI@2 + displayName: 'Update prod manifest in Azure blob' + inputs: + azureSubscription: 'Azure - fabricweb storage - NEW' + scriptType: 'bash' + scriptLocation: inlineScript + inlineScript: | + az storage blob upload \ + --account-name fabricweb \ + --container-name fabric-website \ + --name manifests/v${{ parameters.version }}-prod.js \ + --file $(System.DefaultWorkingDirectory)/site-manifests/v${{ parameters.version }}-prod.js \ + --auth-mode login \ + --overwrite diff --git a/.devops/templates/runpublishvrscreenshot.yml b/.devops/templates/runpublishvrscreenshot.yml index 431f032ec55125..f2c5c063ba6f89 100644 --- a/.devops/templates/runpublishvrscreenshot.yml +++ b/.devops/templates/runpublishvrscreenshot.yml @@ -67,7 +67,7 @@ steps: - bash: | set -exuo pipefail - npx vr-approval-cli@0.4.5 create-policy --nonBlockingPipelines '{"$(pipelineId)":{"pipelineStatus": "PENDING","pipelineName": "$(pipelineName)"}}' --clientType 'FLUENTUI' + npx vr-approval-cli@0.4.11 create-policy --nonBlockingPipelines '{"$(pipelineId)":{"pipelineStatus": "PENDING","pipelineName": "$(pipelineName)"}}' --clientType 'FLUENTUI' displayName: VR App - Create Policy env: VR_APP_API_URL: $(VR_APP_API_URL) @@ -94,5 +94,5 @@ steps: scriptLocation: 'inlineScript' # ciDefinitionId is set to 205 because that is the ID of the baseline pipeline (https://uifabric.visualstudio.com/fabricpublic/_build?definitionId=205) used by the master branch inlineScript: | - npx vr-approval-cli@0.4.5 run-diff --screenshotsDirectory ./screenshots --buildType pr --clientType "FLUENTUI" --ciDefinitionId 205 --groupName $(pipelineName) --locationPrefix ${{ parameters.locationPrefix }} --locationPostfix ${{ parameters.locationPostfix }} --pipelineId $(pipelineId) --clientName ${{ parameters.clientName }} --threshold '0.04' --cumThreshold '1' + npx vr-approval-cli@0.4.11 run-diff --screenshotsDirectory ./screenshots --buildType pr --clientType "FLUENTUI" --ciDefinitionId 205 --groupName $(pipelineName) --locationPrefix ${{ parameters.locationPrefix }} --locationPostfix ${{ parameters.locationPostfix }} --pipelineId $(pipelineId) --clientName ${{ parameters.clientName }} --threshold '0.04' --cumThreshold '1' condition: and(eq(variables.isPR, true), eq(variables['vrTestSkip'], 'no')) diff --git a/.githooks/post-checkout b/.githooks/post-checkout index 6cc6605c05fb6b..6b9eeb6ed80652 100755 --- a/.githooks/post-checkout +++ b/.githooks/post-checkout @@ -1,4 +1,4 @@ #!/bin/sh changedFiles="$(git diff-tree -r --name-only --no-commit-id $1 $2)" -node ./scripts/package-manager/src/notify-lockfile-changes.js $changedFiles +node ./scripts/package-manager/src/notify-on-file-changes.js $changedFiles diff --git a/.githooks/post-merge b/.githooks/post-merge index 25d290c5b08ed0..fa1901f2602d06 100755 --- a/.githooks/post-merge +++ b/.githooks/post-merge @@ -1,4 +1,4 @@ #!/bin/sh changedFiles="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)" -node ./scripts/package-manager/src/notify-lockfile-changes.js $changedFiles +node ./scripts/package-manager/src/notify-on-file-changes.js $changedFiles diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 3241ec03e771e4..6822b498246488 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -72,7 +72,7 @@ /LICENSE @microsoft/fluentui-react-build @justSlone @jurokapsiar @tudorpopams /packages/react/LICENSE @microsoft/fluentui-react-build @justSlone @jurokapsiar @tudorpopams /.github/CODEOWNERS @microsoft/fluentui-react-build @justSlone @jurokapsiar @tudorpopams -/.github/ISSUE_TEMPLATE* @justSlone @jurokapsiar @tudorpopams +/.github/ISSUE_TEMPLATE/ @microsoft/fluentui-react-build @justSlone @jurokapsiar @tudorpopams ## Tooling packages scripts/api-extractor @microsoft/fluentui-react-build @@ -128,11 +128,16 @@ apps/public-docsite-v9 @microsoft/cxe-red @microsoft/cxe-prg @microsoft/teams-pr apps/theming-designer @microsoft/fluentui-react apps/ssr-tests-v9 @microsoft/fluentui-react-build apps/react-18-tests-v8 @microsoft/cxe-red @micahgodbolt -apps/react-18-tests-v9 @microsoft/cxe-red @micahgodbolt +apps/react-18-tests-v9 @microsoft/fluentui-react-build +apps/chart-docsite @microsoft/charting-team #### Packages packages/azure-themes @Jacqueline-ms @robtaft-ms packages/react-conformance @microsoft/fluentui-react-build +packages/charts/chart-web-components @microsoft/charting-team +packages/charts/react-charting @microsoft/charting-team +packages/charts/react-charts-preview/library @microsoft/charting-team +packages/charts/react-charts-preview/stories @microsoft/charting-team packages/date-time-utilities @microsoft/cxe-red packages/eslint-plugin @microsoft/fluentui-react-build packages/foundation-legacy @microsoft/cxe-red @khmakoto @@ -147,7 +152,6 @@ packages/react-components/react-aria @microsoft/teams-prg packages/react-components/react-aria/library @microsoft/teams-prg packages/react-components/react-aria/stories @microsoft/teams-prg packages/react-cards @microsoft/cxe-red @khmakoto -packages/react-charting @microsoft/charting-team 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 @@ -163,15 +167,15 @@ packages/react-components/react-positioning @microsoft/teams-prg packages/react-components/react-overflow @microsoft/teams-prg packages/react-components/react-overflow/library @microsoft/teams-prg packages/react-components/react-overflow/stories @microsoft/teams-prg -packages/react-components/react-shared-contexts @microsoft/teams-prg @microsoft/cxe-red -packages/react-components/react-shared-contexts/library @microsoft/teams-prg @microsoft/cxe-red -packages/react-components/react-shared-contexts/stories @microsoft/teams-prg @microsoft/cxe-red +packages/react-components/react-shared-contexts @microsoft/teams-prg @microsoft/cxe-prg +packages/react-components/react-shared-contexts/library @microsoft/teams-prg @microsoft/cxe-prg +packages/react-components/react-shared-contexts/stories @microsoft/teams-prg @microsoft/cxe-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 packages/react-components/react-theme/library @microsoft/teams-prg packages/react-components/react-theme/stories @microsoft/teams-prg -packages/react-components/react-utilities @microsoft/teams-prg +packages/react-components/react-utilities @microsoft/teams-prg @microsoft/cxe-prg packages/storybook @microsoft/cxe-prg @microsoft/teams-prg packages/style-utilities @dzearing @microsoft/cxe-red packages/style-utilities/src/interfaces @phkuo @dzearing @microsoft/cxe-red @@ -188,50 +192,50 @@ common/_common.scss @microsoft/cxe-red @phkuo ## vNext packages packages/react-components/keyboard-keys @microsoft/teams-prg -packages/react-components/react-accordion @microsoft/cxe-red -packages/react-components/react-accordion/library @microsoft/cxe-red -packages/react-components/react-accordion/stories @microsoft/cxe-red -packages/react-components/react-avatar @microsoft/cxe-red @behowell @khmakoto @sopranopillow -packages/react-components/react-avatar/library @microsoft/cxe-red @behowell @khmakoto @sopranopillow -packages/react-components/react-avatar/stories @microsoft/cxe-red @behowell @khmakoto @sopranopillow -packages/react-components/react-badge @microsoft/cxe-red @behowell -packages/react-components/react-badge/library @microsoft/cxe-red @behowell -packages/react-components/react-badge/stories @microsoft/cxe-red @behowell +packages/react-components/react-accordion @microsoft/cxe-prg +packages/react-components/react-accordion/library @microsoft/cxe-prg +packages/react-components/react-accordion/stories @microsoft/cxe-prg +packages/react-components/react-avatar @microsoft/cxe-prg +packages/react-components/react-avatar/library @microsoft/cxe-prg +packages/react-components/react-avatar/stories @microsoft/cxe-prg +packages/react-components/react-badge @microsoft/cxe-prg +packages/react-components/react-badge/library @microsoft/cxe-prg +packages/react-components/react-badge/stories @microsoft/cxe-prg packages/react-components/react-button @microsoft/cxe-red @khmakoto packages/react-components/react-button/library @microsoft/cxe-red @khmakoto packages/react-components/react-button/stories @microsoft/cxe-red @khmakoto packages/react-components/react-card @microsoft/cxe-prg @marcosmoura packages/react-components/react-card/library @microsoft/cxe-prg @marcosmoura packages/react-components/react-card/stories @microsoft/cxe-prg @marcosmoura -packages/react-components/react-checkbox @microsoft/cxe-red @khmakoto -packages/react-components/react-checkbox/library @microsoft/cxe-red @khmakoto -packages/react-components/react-checkbox/stories @microsoft/cxe-red @khmakoto -packages/react-components/react-combobox @microsoft/cxe-red @microsoft/teams-prg @smhigley -packages/react-components/react-combobox/library @microsoft/cxe-red @microsoft/teams-prg @smhigley -packages/react-components/react-combobox/stories @microsoft/cxe-red @microsoft/teams-prg @smhigley +packages/react-components/react-checkbox @microsoft/cxe-prg +packages/react-components/react-checkbox/library @microsoft/cxe-prg +packages/react-components/react-checkbox/stories @microsoft/cxe-prg +packages/react-components/react-combobox @microsoft/cxe-prg @microsoft/teams-prg +packages/react-components/react-combobox/library @microsoft/cxe-prg @microsoft/teams-prg +packages/react-components/react-combobox/stories @microsoft/cxe-prg @microsoft/teams-prg packages/react-components/react-components @microsoft/fluentui-react packages/react-components/react-dialog @microsoft/teams-prg packages/react-components/react-dialog/library @microsoft/teams-prg packages/react-components/react-dialog/stories @microsoft/teams-prg -packages/react-components/react-divider @microsoft/cxe-red -packages/react-components/react-divider/library @microsoft/cxe-red -packages/react-components/react-divider/stories @microsoft/cxe-red -packages/react-components/react-field @microsoft/cxe-red @behowell -packages/react-components/react-field/library @microsoft/cxe-red @behowell -packages/react-components/react-field/stories @microsoft/cxe-red @behowell +packages/react-components/react-divider @microsoft/cxe-prg +packages/react-components/react-divider/library @microsoft/cxe-prg +packages/react-components/react-divider/stories @microsoft/cxe-prg +packages/react-components/react-field @microsoft/cxe-prg +packages/react-components/react-field/library @microsoft/cxe-prg +packages/react-components/react-field/stories @microsoft/cxe-prg packages/react-focus @microsoft/cxe-red @khmakoto packages/react-components/react-image @microsoft/cxe-prg packages/react-components/react-image/library @microsoft/cxe-prg packages/react-components/react-image/stories @microsoft/cxe-prg -packages/react-components/react-input @microsoft/cxe-red @spmonahan -packages/react-components/react-input/library @microsoft/cxe-red @spmonahan -packages/react-components/react-input/stories @microsoft/cxe-red @spmonahan -packages/react-components/react-label @microsoft/cxe-red @sopranopillow @micahgodbolt -packages/react-components/react-label/library @microsoft/cxe-red @sopranopillow @micahgodbolt -packages/react-components/react-label/stories @microsoft/cxe-red @sopranopillow @micahgodbolt -packages/react-components/react-link @microsoft/cxe-red @khmakoto -packages/react-components/react-link/library @microsoft/cxe-red @khmakoto -packages/react-components/react-link/stories @microsoft/cxe-red @khmakoto +packages/react-components/react-input @microsoft/cxe-prg +packages/react-components/react-input/library @microsoft/cxe-prg +packages/react-components/react-input/stories @microsoft/cxe-prg +packages/react-components/react-label @microsoft/cxe-prg +packages/react-components/react-label/library @microsoft/cxe-prg +packages/react-components/react-label/stories @microsoft/cxe-prg +packages/react-components/react-link @microsoft/cxe-prg +packages/react-components/react-link/library @microsoft/cxe-prg +packages/react-components/react-link/stories @microsoft/cxe-prg packages/react-components/react-menu @microsoft/teams-prg packages/react-components/react-menu/library @microsoft/teams-prg packages/react-components/react-menu/stories @microsoft/teams-prg @@ -247,33 +251,33 @@ packages/react-components/react-provider/stories @microsoft/teams-prg packages/react-components/react-radio @microsoft/cxe-red @behowell @spmonahan packages/react-components/react-radio/library @microsoft/cxe-red @behowell @spmonahan packages/react-components/react-radio/stories @microsoft/cxe-red @behowell @spmonahan -packages/react-components/react-select @microsoft/cxe-red @smhigley -packages/react-components/react-select/library @microsoft/cxe-red @smhigley -packages/react-components/react-select/stories @microsoft/cxe-red @smhigley -packages/react-components/react-slider @microsoft/cxe-red @micahgodbolt -packages/react-components/react-slider/library @microsoft/cxe-red @micahgodbolt -packages/react-components/react-slider/stories @microsoft/cxe-red @micahgodbolt -packages/react-components/react-spinbutton @microsoft/cxe-red @spmonahan -packages/react-components/react-spinbutton/library @microsoft/cxe-red @spmonahan -packages/react-components/react-spinbutton/stories @microsoft/cxe-red @spmonahan -packages/react-components/react-spinner @microsoft/cxe-red @tomi-msft -packages/react-components/react-spinner/library @microsoft/cxe-red @tomi-msft -packages/react-components/react-spinner/stories @microsoft/cxe-red @tomi-msft -packages/react-components/react-switch @microsoft/cxe-red @behowell @khmakoto -packages/react-components/react-switch/library @microsoft/cxe-red @behowell @khmakoto -packages/react-components/react-switch/stories @microsoft/cxe-red @behowell @khmakoto +packages/react-components/react-select @microsoft/cxe-prg +packages/react-components/react-select/library @microsoft/cxe-prg +packages/react-components/react-select/stories @microsoft/cxe-prg +packages/react-components/react-slider @microsoft/cxe-prg +packages/react-components/react-slider/library @microsoft/cxe-prg +packages/react-components/react-slider/stories @microsoft/cxe-prg +packages/react-components/react-spinbutton @microsoft/cxe-prg +packages/react-components/react-spinbutton/library @microsoft/cxe-prg +packages/react-components/react-spinbutton/stories @microsoft/cxe-prg +packages/react-components/react-spinner @microsoft/cxe-prg +packages/react-components/react-spinner/library @microsoft/cxe-prg +packages/react-components/react-spinner/stories @microsoft/cxe-prg +packages/react-components/react-switch @microsoft/cxe-prg +packages/react-components/react-switch/library @microsoft/cxe-prg +packages/react-components/react-switch/stories @microsoft/cxe-prg packages/react-components/react-tabs @microsoft/cxe-prg @dmytrokirpa packages/react-components/react-tabs/library @microsoft/cxe-prg @dmytrokirpa packages/react-components/react-tabs/stories @microsoft/cxe-prg @dmytrokirpa packages/react-components/react-text @microsoft/cxe-prg @marcosmoura packages/react-components/react-text/library @microsoft/cxe-prg @marcosmoura packages/react-components/react-text/stories @microsoft/cxe-prg @marcosmoura -packages/react-components/react-textarea @microsoft/cxe-red @sopranopillow -packages/react-components/react-textarea/library @microsoft/cxe-red @sopranopillow -packages/react-components/react-textarea/stories @microsoft/cxe-red @sopranopillow -packages/react-components/react-tooltip @microsoft/cxe-red @behowell @khmakoto -packages/react-components/react-tooltip/library @microsoft/cxe-red @behowell @khmakoto -packages/react-components/react-tooltip/stories @microsoft/cxe-red @behowell @khmakoto +packages/react-components/react-textarea @microsoft/cxe-prg +packages/react-components/react-textarea/library @microsoft/cxe-prg +packages/react-components/react-textarea/stories @microsoft/cxe-prg +packages/react-components/react-tooltip @microsoft/cxe-prg +packages/react-components/react-tooltip/library @microsoft/cxe-prg +packages/react-components/react-tooltip/stories @microsoft/cxe-prg packages/react-components/react-toolbar @microsoft/teams-prg @chpalac @ling1726 packages/react-components/react-toolbar/library @microsoft/teams-prg @chpalac @ling1726 packages/react-components/react-toolbar/stories @microsoft/teams-prg @chpalac @ling1726 @@ -286,32 +290,32 @@ packages/react-components/babel-preset-global-context @microsoft/teams-prg packages/react-components/react-table @microsoft/teams-prg packages/react-components/react-table/library @microsoft/teams-prg packages/react-components/react-table/stories @microsoft/teams-prg -packages/react-components/react-progress @microsoft/cxe-red @tomi-msft -packages/react-components/react-progress/library @microsoft/cxe-red @tomi-msft -packages/react-components/react-progress/stories @microsoft/cxe-red @tomi-msft -packages/react-components/react-persona @microsoft/cxe-red @sopranopillow -packages/react-components/react-persona/library @microsoft/cxe-red @sopranopillow -packages/react-components/react-persona/stories @microsoft/cxe-red @sopranopillow +packages/react-components/react-progress @microsoft/cxe-prg +packages/react-components/react-progress/library @microsoft/cxe-prg +packages/react-components/react-progress/stories @microsoft/cxe-prg +packages/react-components/react-persona @microsoft/cxe-prg +packages/react-components/react-persona/library @microsoft/cxe-prg +packages/react-components/react-persona/stories @microsoft/cxe-prg packages/react-components/react-tree @microsoft/teams-prg packages/react-components/react-tree/library @microsoft/teams-prg packages/react-components/react-tree/stories @microsoft/teams-prg packages/react-components/react-virtualizer @microsoft/xc-uxe @Mitch-At-Work packages/react-components/react-virtualizer/library @microsoft/xc-uxe @Mitch-At-Work packages/react-components/react-virtualizer/stories @microsoft/xc-uxe @Mitch-At-Work -packages/react-components/react-skeleton @microsoft/cxe-red -packages/react-components/react-skeleton/library @microsoft/cxe-red -packages/react-components/react-skeleton/stories @microsoft/cxe-red +packages/react-components/react-skeleton @microsoft/cxe-prg +packages/react-components/react-skeleton/library @microsoft/cxe-prg +packages/react-components/react-skeleton/stories @microsoft/cxe-prg packages/tokens @microsoft/teams-prg -packages/react-components/react-tags @microsoft/cxe-red @microsoft/teams-prg -packages/react-components/react-tags/library @microsoft/cxe-red @microsoft/teams-prg -packages/react-components/react-tags/stories @microsoft/cxe-red @microsoft/teams-prg +packages/react-components/react-tags @microsoft/cxe-prg @microsoft/teams-prg +packages/react-components/react-tags/library @microsoft/cxe-prg @microsoft/teams-prg +packages/react-components/react-tags/stories @microsoft/cxe-prg @microsoft/teams-prg packages/react-components/react-migration-v0-v9/library @microsoft/teams-prg packages/react-components/react-migration-v0-v9/stories @microsoft/teams-prg -packages/react-components/react-datepicker-compat @microsoft/cxe-red @sopranopillow @khmakoto -packages/react-components/react-datepicker-compat/library @microsoft/cxe-red @sopranopillow @khmakoto -packages/react-components/react-datepicker-compat/stories @microsoft/cxe-red @sopranopillow @khmakoto -packages/react-components/react-migration-v8-v9/library @microsoft/cxe-red @geoffcoxmsft -packages/react-components/react-migration-v8-v9/stories @microsoft/cxe-red @geoffcoxmsft +packages/react-components/react-datepicker-compat @microsoft/cxe-prg +packages/react-components/react-datepicker-compat/library @microsoft/cxe-prg +packages/react-components/react-datepicker-compat/stories @microsoft/cxe-prg +packages/react-components/react-migration-v8-v9/library @microsoft/cxe-prg @geoffcoxmsft +packages/react-components/react-migration-v8-v9/stories @microsoft/cxe-prg @geoffcoxmsft packages/react-components/react-breadcrumb @microsoft/cxe-prg packages/react-components/react-breadcrumb/library @microsoft/cxe-prg packages/react-components/react-breadcrumb/stories @microsoft/cxe-prg @@ -324,9 +328,9 @@ packages/react-components/react-jsx-runtime @microsoft/teams-prg packages/react-components/react-toast @microsoft/teams-prg packages/react-components/react-toast/library @microsoft/teams-prg packages/react-components/react-toast/stories @microsoft/teams-prg -packages/react-components/react-search @microsoft/cxe-red @smhigley -packages/react-components/react-search/library @microsoft/cxe-red @smhigley -packages/react-components/react-search/stories @microsoft/cxe-red @smhigley +packages/react-components/react-search @microsoft/cxe-prg +packages/react-components/react-search/library @microsoft/cxe-prg +packages/react-components/react-search/stories @microsoft/cxe-prg packages/react-components/react-colorpicker-compat @microsoft/cxe-red @sopranopillow packages/react-components/react-nav-preview @microsoft/cxe-red @microsoft/xc-uxe @mltejera packages/react-components/react-nav-preview/library @microsoft/cxe-red @microsoft/xc-uxe @mltejera @@ -334,21 +338,21 @@ packages/react-components/react-nav-preview/stories @microsoft/cxe-red @microsof packages/react-components/react-message-bar @microsoft/teams-prg packages/react-components/react-message-bar/library @microsoft/teams-prg packages/react-components/react-message-bar/stories @microsoft/teams-prg -packages/react-components/react-rating @microsoft/cxe-red @tomi-msft -packages/react-components/react-rating/library @microsoft/cxe-red @tomi-msft -packages/react-components/react-rating/stories @microsoft/cxe-red @tomi-msft +packages/react-components/react-rating @microsoft/cxe-prg +packages/react-components/react-rating/library @microsoft/cxe-prg +packages/react-components/react-rating/stories @microsoft/cxe-prg packages/react-components/react-swatch-picker @microsoft/cxe-prg packages/react-components/react-swatch-picker/library @microsoft/cxe-prg packages/react-components/react-swatch-picker/stories @microsoft/cxe-prg -packages/react-components/react-calendar-compat @microsoft/cxe-red @sopranopillow -packages/react-components/react-calendar-compat/library @microsoft/cxe-red @sopranopillow -packages/react-components/react-calendar-compat/stories @microsoft/cxe-red @sopranopillow -packages/react-components/react-infolabel @microsoft/cxe-red @sopranopillow -packages/react-components/react-infolabel/library @microsoft/cxe-red @sopranopillow -packages/react-components/react-infolabel/stories @microsoft/cxe-red @sopranopillow -packages/react-components/react-list-preview @microsoft/teams-prg -packages/react-components/react-list-preview/library @microsoft/teams-prg -packages/react-components/react-list-preview/stories @microsoft/teams-prg +packages/react-components/react-calendar-compat @microsoft/cxe-prg +packages/react-components/react-calendar-compat/library @microsoft/cxe-prg +packages/react-components/react-calendar-compat/stories @microsoft/cxe-prg +packages/react-components/react-infolabel @microsoft/cxe-prg +packages/react-components/react-infolabel/library @microsoft/cxe-prg +packages/react-components/react-infolabel/stories @microsoft/cxe-prg +packages/react-components/react-list @microsoft/teams-prg +packages/react-components/react-list/library @microsoft/teams-prg +packages/react-components/react-list/stories @microsoft/teams-prg packages/react-components/react-motion @microsoft/teams-prg packages/react-components/react-motion/library @microsoft/teams-prg packages/react-components/react-motion/stories @microsoft/teams-prg @@ -364,18 +368,16 @@ packages/react-components/react-icons-compat/stories @microsoft/cxe-red @tomi-ms packages/react-components/react-tag-picker @microsoft/teams-prg packages/react-components/react-tag-picker/library @microsoft/teams-prg packages/react-components/react-tag-picker/stories @microsoft/teams-prg -packages/react-components/react-carousel-preview @microsoft/xc-uxe @microsoft/teams-prg @Mitch-At-Work -packages/react-components/react-carousel-preview/library @microsoft/xc-uxe @microsoft/teams-prg @Mitch-At-Work -packages/react-components/react-carousel-preview/stories @microsoft/xc-uxe @microsoft/teams-prg @Mitch-At-Work +packages/react-components/react-carousel @microsoft/xc-uxe @microsoft/teams-prg @Mitch-At-Work +packages/react-components/react-carousel/library @microsoft/xc-uxe @microsoft/teams-prg @Mitch-At-Work +packages/react-components/react-carousel/stories @microsoft/xc-uxe @microsoft/teams-prg @Mitch-At-Work packages/react-components/recipes @microsoft/fluentui-react @sopranopillow packages/react-components/react-motion-components-preview/library @microsoft/teams-prg packages/react-components/react-motion-components-preview/stories @microsoft/teams-prg -packages/react-components/react-utilities-compat/library @microsoft/cxe-red -packages/react-components/react-utilities-compat/stories @microsoft/cxe-red +packages/react-components/react-utilities-compat/library @microsoft/cxe-prg +packages/react-components/react-utilities-compat/stories @microsoft/cxe-prg packages/react-components/react-color-picker-preview/library @microsoft/cxe-prg packages/react-components/react-color-picker-preview/stories @microsoft/cxe-prg -packages/react-components/react-keytips-preview/library @microsoft/cxe-prg -packages/react-components/react-keytips-preview/stories @microsoft/cxe-prg # <%= NX-CODEOWNER-PLACEHOLDER %> ## Components @@ -429,6 +431,7 @@ packages/react/src/components/WeeklyDayPicker @microsoft/cxe-red packages/react/src/utilities/ThemeProvider @microsoft/cxe-red @dzearing packages/fluent2-theme @microsoft/cxe-red @geoffcoxmsft ## Experiments +packages/react-experiments @microsoft/cxe-red packages/react-experiments/src/components/Signals @ThomasMichon packages/react-experiments/src/components/Tile @ThomasMichon packages/react-experiments/src/components/TileList @ThomasMichon diff --git a/.github/ISSUE_TEMPLATE/01-react-components-bug-report.yml b/.github/ISSUE_TEMPLATE/01-react-components-bug-report.yml new file mode 100644 index 00000000000000..3ac9d7de51cab4 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/01-react-components-bug-report.yml @@ -0,0 +1,239 @@ +name: 'โ๏ธ React Components (v9) - ๐ Bug Report' +description: File a bug report. +title: '[Bug]: ' +labels: ['Type: Bug :bug:', 'Needs: Triage :mag:', 'Fluent UI react-components (v9)'] +projects: ['microsoft/395'] +assignees: [] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report! + + - type: dropdown + id: component-id + attributes: + label: Component + description: | + Which Component/Utility is affected + + > ๐ก available options align with our docs menu https://react.fluentui.dev/ + options: + - Accordion + - Avatar + - AvatarGroup + - Badge + - Breadcrumb + - Button + - Card + - CardFooter + - CardHeader + - CardPreview + - Carousel + - CarouselNav + - Checkbox + - Combobox + - CompoundButton + - Counter Badge + - DataGrid + - Dialog + - Divider + - Drawer + - Dropdown + - Field + - FluentProvider + - Image + - InfoLabel + - Input + - InteractionTag + - Label + - Link + - List + - Menu + - MenuButton + - MenuList + - MessageBar + - Overflow + - Persona + - Popover + - Portal + - PresenceBadge + - ProgressBar + - RadioGroup + - Rating + - RatingDisplay + - SearchBox + - Select + - Skeleton + - Slider + - SpinButton + - Spinner + - SplitButton + - SwatchPicker + - Switch + - TabList + - Table + - Tag + - TagGroup + - TagPicker + - TeachingPopover + - Text + - Textarea + - Toast + - ToggleButton + - Toolbar + - Tooltip + - Tree + - ColorPicker (Preview) + - Nav (Preview) + - Virtualizer (Preview) + - VirtualizerScrollView (Preview) + - VirtualizerScrollViewDynamic (Preview) + - Calendar (Compat) + - DatePicker (Compat) + - TimePicker (Compat) + - Icons + - Migration Shims V0 + - Migration Shims V8 + - Motion + - Theme + - Tokens + - Utilities + - Other... + validations: + required: true + + - type: input + id: pkg-version + attributes: + label: Package version + description: | + Which version of react-components are you using? + placeholder: e.g. 9.42.0 + validations: + required: true + + - type: input + id: react-version + attributes: + label: React version + description: | + Which version of React are you using? + placeholder: e.g. 17.0.2 + validations: + required: true + + - type: textarea + id: env-info + attributes: + label: Environment + description: | + Output of `npx envinfo@latest --system --browsers --npmPackages '{@fluentui/*,react,react-dom,@types/react{,-dom}}'` + NOTE ๐ก: This will be automatically formatted as a code block, so no need for backticks. + render: shell + validations: + required: true + + - type: textarea + id: current-behavior + attributes: + label: Current Behavior + description: | + What is the current behavior that you are experiencing? + validations: + required: true + + - type: textarea + id: expected-behavior + attributes: + label: Expected Behavior + description: | + What is the behavior that you expect to happen? + validations: + required: true + + - type: input + id: reproduction-link + attributes: + label: Reproduction + description: | + A link to a Stackblitz reproduction which demonstrates the bug - https://stackblitz.com/ + > ๐ก You can export to Stackblitz any example from docs (https://react.fluentui.dev/) with "Open In StackBlitz" button and update it to reproduce an issue. + + **NOTE:** + + A [minimal reproduction](https://stackoverflow.com/help/minimal-reproducible-example) is required. + If a report is vague (e.g. just a generic error message) and has no reproduction, it will receive a "need reproduction" label. + + โผ๏ธ If no reproduction is provided after 3 days, it will be auto-closed. โผ๏ธ + validations: + required: true + + - type: textarea + id: reproduction-steps + attributes: + label: Steps to reproduce + description: Explain how to cause the issue in the provided reproduction. + placeholder: | + 1. Go to '...' + 2. Click on '...' + 3. Scroll down to '...' + 4. See error + validations: + required: true + + - type: dropdown + id: a11y-bug + attributes: + label: Are you reporting an Accessibility issue? + description: | + **PLEASE NOTE:** + + 1. Do not link to, screenshot, or reference a Microsoft product in this description. + 2. Please check ARIA component examples to ensure it is not a screen reader or browser issue. If the issue concerns screen reader behavior that reproduces on HTML elements or ARIA Practices examples (https://w3c.github.io/aria-practices/), it should be filed with the respective browser or screen reading software and not the Fluent UI repo. + 3. There is documentation or best practice info to support your expected behavior (review https://w3c.github.io/aria/ for accessibility guidance.) + + **Additional note for Microsoft employees:** + Please file accessibility issues in our internal tracker (http://aka.ms/fluentui-a11y). This helps with tracking accessibility progress within the company. + options: + - 'yes' + - 'no' + + - type: dropdown + id: request-priority + attributes: + label: Suggested severity + options: + - Urgent - No workaround and Products/sites are affected + - High - No workaround + - Medium - Has workaround + - Low - Has or doesn't need a workaround + validations: + required: true + + - type: input + id: products-affected + attributes: + label: Products/sites affected + placeholder: (provide if applicable) + + - type: dropdown + id: open-to-contribute + attributes: + label: Are you willing to submit a PR to fix? + options: + - 'yes' + - 'no' + validations: + required: true + + - type: checkboxes + id: checkboxes + attributes: + label: Validations + description: Before submitting the issue, please make sure you do the following + options: + - label: Check that there isn't already an issue that reports the same bug to avoid creating a duplicate. + required: true + - label: The provided reproduction is a minimal reproducible example of the bug. + required: true diff --git a/.github/ISSUE_TEMPLATE/02-react-bug-report.yml b/.github/ISSUE_TEMPLATE/02-react-bug-report.yml new file mode 100644 index 00000000000000..8d677aec315ea6 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/02-react-bug-report.yml @@ -0,0 +1,180 @@ +name: 'โ๏ธ React (v8) - ๐ Bug Report' +description: File a bug report. +title: '[Bug]: ' +labels: ['Type: Bug :bug:', 'Needs: Triage :mag:', 'Fluent UI react (v8)'] +projects: ['microsoft/395'] +assignees: ['@microsoft/cxe-red'] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report! + + - type: dropdown + id: package-id + attributes: + label: Package + description: Which package is affected + options: + - azure-themes + - common-styles + - date-time-utilities + - dom-utilities + - fluent2-theme + - font-icons-mdl2 + - font-icons-mdl2-branded + - foundation-legacy + - keyboard-key + - merge-styles + - monaco-editor + - react + - react-date-time + - react-experiments + - react-file-type-icons + - react-focus + - react-hook + - react-icon-provider + - react-monaco-editor + - react-window-provider + - style-utilities + - theme + - utilities + - Other... + validations: + required: true + + - type: input + id: pkg-version + attributes: + label: Package version + description: | + Which version of selected package are you using? + placeholder: e.g. 8.42.0 + validations: + required: true + + - type: input + id: react-version + attributes: + label: React version + description: | + Which version of React are you using? + placeholder: e.g. 17.0.2 + validations: + required: true + + - type: textarea + id: env-info + attributes: + label: Environment + description: | + Output of `npx envinfo@latest --system --browsers --npmPackages '{@fluentui/*,react,react-dom,@types/react{,-dom}}'` + NOTE ๐ก: This will be automatically formatted as a code block, so no need for backticks. + render: shell + validations: + required: true + + - type: textarea + id: current-behavior + attributes: + label: Current Behavior + description: | + What is the current behavior that you are experiencing? + validations: + required: true + + - type: textarea + id: expected-behavior + attributes: + label: Expected Behavior + description: | + What is the behavior that you expect to happen? + validations: + required: true + + - type: input + id: reproduction-link + attributes: + label: Reproduction + description: | + A link to reproduction which demonstrates the bug (use one of the following): + - Stackblitz - https://stackblitz.com/ + - Codepen - https://aka.ms/fluentpen + + **NOTE:** + + A [minimal reproduction](https://stackoverflow.com/help/minimal-reproducible-example) is required. + If a report is vague (e.g. just a generic error message) and has no reproduction, it will receive a "need reproduction" label. + + โผ๏ธ If no reproduction is provided after 3 days, it will be auto-closed. โผ๏ธ + validations: + required: true + + - type: textarea + id: reproduction-steps + attributes: + label: Steps to reproduce + description: Explain how to cause the issue in the provided reproduction. + placeholder: | + 1. Go to '...' + 2. Click on '...' + 3. Scroll down to '...' + 4. See error + validations: + required: true + + - type: dropdown + id: a11y-bug + attributes: + label: Are you reporting an Accessibility issue? + description: | + **PLEASE NOTE:** + + 1. Do not link to, screenshot, or reference a Microsoft product in this description. + 2. Please check ARIA component examples to ensure it is not a screen reader or browser issue. If the issue concerns screen reader behavior that reproduces on HTML elements or ARIA Practices examples (https://w3c.github.io/aria-practices/), it should be filed with the respective browser or screen reading software and not the Fluent UI repo. + 3. There is documentation or best practice info to support your expected behavior (review https://w3c.github.io/aria/ for accessibility guidance.) + + **Additional note for Microsoft employees:** + Please file accessibility issues in our internal tracker (http://aka.ms/fluentui-a11y). This helps with tracking accessibility progress within the company. + options: + - 'yes' + - 'no' + + - type: dropdown + id: request-priority + attributes: + label: Suggested severity + options: + - Urgent - No workaround and Products/sites are affected + - High - No workaround + - Medium - Has workaround + - Low - Has or doesn't need a workaround + validations: + required: true + + - type: input + id: products-affected + attributes: + label: Products/sites affected + placeholder: (provide if applicable) + + - type: dropdown + id: open-to-contribute + attributes: + label: Are you willing to submit a PR to fix? + options: + - 'yes' + - 'no' + validations: + required: true + + - type: checkboxes + id: checkboxes + attributes: + label: Validations + description: Before submitting the issue, please make sure you do the following + options: + - label: Check that there isn't already an issue that reports the same bug to avoid creating a duplicate. + required: true + - label: The provided reproduction is a minimal reproducible example of the bug. + required: true diff --git a/.github/ISSUE_TEMPLATE/03-react-charting-bug-report.yml b/.github/ISSUE_TEMPLATE/03-react-charting-bug-report.yml new file mode 100644 index 00000000000000..412914ebb7dcdb --- /dev/null +++ b/.github/ISSUE_TEMPLATE/03-react-charting-bug-report.yml @@ -0,0 +1,168 @@ +name: '๐โ๏ธ React Charting - ๐ Bug Report' +description: File a bug report. +title: '[Bug]: ' +labels: ['Type: Bug :bug:', 'Needs: Triage :mag:', 'Package: charting'] +projects: ['microsoft/395'] +assignees: ['@microsoft/cxe-red'] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report! + + - type: dropdown + id: package-id + attributes: + label: Charting Control + description: Which charting control is affected + options: + - AreaChart + - DonutChart + - GaugeChart + - HeatMapChart + - ๎HorizontalBarChart + - Legends + - LineChart + - PieChart + - SankeyChart + - SparklineChart + - TreeChart + - VerticalBarChart + - Other... + validations: + required: true + + - type: input + id: pkg-version + attributes: + label: Package version + description: | + Which version of selected package are you using? + placeholder: e.g. 8.42.0 + validations: + required: true + + - type: input + id: react-version + attributes: + label: React version + description: | + Which version of React are you using? + placeholder: e.g. 17.0.2 + validations: + required: true + + - type: textarea + id: env-info + attributes: + label: Environment + description: | + Output of `npx envinfo@latest --system --browsers --npmPackages '{@fluentui/react-charting,react,react-dom,@types/react{,-dom}}'` + + NOTE ๐ก: This will be automatically formatted as a code block, so no need for backticks. + render: shell + validations: + required: true + + - type: textarea + id: current-behavior + attributes: + label: Current Behavior + description: | + What is the current behavior that you are experiencing? + validations: + required: true + + - type: textarea + id: expected-behavior + attributes: + label: Expected Behavior + description: | + What is the behavior that you expect to happen? + validations: + required: true + + - type: input + id: reproduction-link + attributes: + label: Reproduction + description: | + A link to a Stackblitz reproduction which demonstrates the bug - https://stackblitz.com/ + + **NOTE:** + + A [minimal reproduction](https://stackoverflow.com/help/minimal-reproducible-example) is required. + If a report is vague (e.g. just a generic error message) and has no reproduction, it will receive a "need reproduction" label. + + โผ๏ธ If no reproduction is provided after 3 days, it will be auto-closed. โผ๏ธ + validations: + required: true + + - type: textarea + id: reproduction-steps + attributes: + label: Steps to reproduce + description: Explain how to cause the issue in the provided reproduction. + placeholder: | + 1. Go to '...' + 2. Click on '...' + 3. Scroll down to '...' + 4. See error + validations: + required: true + + - type: dropdown + id: a11y-bug + attributes: + label: Are you reporting an Accessibility issue? + description: | + **PLEASE NOTE:** + + 1. Do not link to, screenshot, or reference a Microsoft product in this description. + 2. Please check ARIA component examples to ensure it is not a screen reader or browser issue. If the issue concerns screen reader behavior that reproduces on HTML elements or ARIA Practices examples (https://w3c.github.io/aria-practices/), it should be filed with the respective browser or screen reading software and not the Fluent UI repo. + 3. There is documentation or best practice info to support your expected behavior (review https://w3c.github.io/aria/ for accessibility guidance.) + + **Additional note for Microsoft employees:** + Please file accessibility issues in our internal tracker (http://aka.ms/fluentui-a11y). This helps with tracking accessibility progress within the company. + options: + - 'yes' + - 'no' + + - type: dropdown + id: request-priority + attributes: + label: Suggested severity + options: + - Urgent - No workaround and Products/sites are affected + - High - No workaround + - Medium - Has workaround + - Low - Has or doesn't need a workaround + validations: + required: true + + - type: input + id: products-affected + attributes: + label: Products/sites affected + placeholder: (provide if applicable) + + - type: dropdown + id: open-to-contribute + attributes: + label: Are you willing to submit a PR to fix? + options: + - 'yes' + - 'no' + validations: + required: true + + - type: checkboxes + id: checkboxes + attributes: + label: Validations + description: Before submitting the issue, please make sure you do the following + options: + - label: Check that there isn't already an issue that reports the same bug to avoid creating a duplicate. + required: true + - label: The provided reproduction is a minimal reproducible example of the bug. + required: true diff --git a/.github/ISSUE_TEMPLATE/04-web-components-bug-report.yml b/.github/ISSUE_TEMPLATE/04-web-components-bug-report.yml new file mode 100644 index 00000000000000..9a6a31f002411a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/04-web-components-bug-report.yml @@ -0,0 +1,182 @@ +name: '๐ Web Components - ๐ Bug Report' +description: File a bug report. +title: '[Bug]: ' +labels: ['Type: Bug :bug:', 'Needs: Triage :mag:', 'web-components', 'Fluent UI WC (v3)'] +projects: ['microsoft/395'] +assignees: ['@microsoft/fui-wc'] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report! + + - type: dropdown + id: component-id + attributes: + label: Component + description: Which Component/Utility is affected + options: + - Accordion + - Avatar + - Checkbox + - Divider + - Drawer + - Field + - Image + - Label + - Link + - Menu + - MenuList + - MessageBar + - ProgressBar + - Radio + - RadioGroup + - Rating Display + - Slider + - Spinner + - Switch + - Tablist + - Tabs + - Text + - TextArea + - TextInput + - SetTheme (utility) + - Tokens (api) + - Other... + + validations: + required: true + + - type: input + id: pkg-version + attributes: + label: Package version + description: | + Which version of web-components are you using? + placeholder: e.g. 3.0.0-beta.63 + validations: + required: true + + - type: input + id: fast-element-version + attributes: + label: '@microsoft/fast-element version' + description: | + Which version of fast-element are you using? + placeholder: e.g. 2.0.0 + validations: + required: true + + - type: textarea + id: env-info + attributes: + label: Environment + description: | + Output of `npx envinfo@latest --system --browsers --npmPackages '{@fluentui/*,@microsoft/fast-element}'` + NOTE ๐ก: This will be automatically formatted as a code block, so no need for backticks. + render: shell + validations: + required: true + + - type: textarea + id: current-behavior + attributes: + label: Current Behavior + description: | + What is the current behavior that you are experiencing? + validations: + required: true + + - type: textarea + id: expected-behavior + attributes: + label: Expected Behavior + description: | + What is the behavior that you expect to happen? + validations: + required: true + + - type: input + id: reproduction-link + attributes: + label: Reproduction + description: | + A link to a Stackblitz reproduction which demonstrates the bug - https://stackblitz.com/ + + **NOTE:** + + A [minimal reproduction](https://stackoverflow.com/help/minimal-reproducible-example) is required. + If a report is vague (e.g. just a generic error message) and has no reproduction, it will receive a "need reproduction" label. + + โผ๏ธ If no reproduction is provided after 3 days, it will be auto-closed. โผ๏ธ + validations: + required: true + + - type: textarea + id: reproduction-steps + attributes: + label: Steps to reproduce + description: Explain how to cause the issue in the provided reproduction. + placeholder: | + 1. Go to '...' + 2. Click on '...' + 3. Scroll down to '...' + 4. See error + validations: + required: true + + - type: dropdown + id: a11y-bug + attributes: + label: Are you reporting an Accessibility issue? + description: | + **PLEASE NOTE:** + + 1. Do not link to, screenshot, or reference a Microsoft product in this description. + 2. Please check ARIA component examples to ensure it is not a screen reader or browser issue. If the issue concerns screen reader behavior that reproduces on HTML elements or ARIA Practices examples (https://w3c.github.io/aria-practices/), it should be filed with the respective browser or screen reading software and not the Fluent UI repo. + 3. There is documentation or best practice info to support your expected behavior (review https://w3c.github.io/aria/ for accessibility guidance.) + + **Additional note for Microsoft employees:** + Please file accessibility issues in our internal tracker (http://aka.ms/fluentui-a11y). This helps with tracking accessibility progress within the company. + options: + - 'yes' + - 'no' + + - type: dropdown + id: request-priority + attributes: + label: Suggested severity + options: + - Urgent - No workaround and Products/sites are affected + - High - No workaround + - Medium - Has workaround + - Low - Has or doesn't need a workaround + validations: + required: true + + - type: input + id: products-affected + attributes: + label: Products/sites affected + placeholder: (provide if applicable) + + - type: dropdown + id: open-to-contribute + attributes: + label: Are you willing to submit a PR to fix? + options: + - 'yes' + - 'no' + validations: + required: true + + - type: checkboxes + id: checkboxes + attributes: + label: Validations + description: Before submitting the issue, please make sure you do the following + options: + - label: Check that there isn't already an issue that reports the same bug to avoid creating a duplicate. + required: true + - label: The provided reproduction is a minimal reproducible example of the bug. + required: true diff --git a/.github/ISSUE_TEMPLATE/05-tooling-bug-report.yml b/.github/ISSUE_TEMPLATE/05-tooling-bug-report.yml new file mode 100644 index 00000000000000..ac179e8a8ae37d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/05-tooling-bug-report.yml @@ -0,0 +1,137 @@ +name: 'โ๏ธ Tooling - ๐ Bug Report' +description: File a bug report. +title: '[Bug]: ' +labels: ['Type: Bug :bug:', 'Needs: Triage :mag:', 'Area: Build System'] +projects: ['microsoft/395'] +assignees: ['@microsoft/fluentui-react-build'] +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report! + + - type: dropdown + id: area-id + attributes: + label: Area + description: Which Area/Package is affected + options: + - build + - bundle-size + - ci + - formatting + - linting + - nx + - releases + - storybook + - testing + - typescript + - yarn generate + - yarn start + - react-conformance (package) + - workspace-plugin (package) + - Other... + validations: + required: true + + - type: textarea + id: env-info + attributes: + label: Environment + description: | + Output of `npx envinfo@latest --system --binaries --npmPackages '{@fluentui/*,@nx/*,typescript,eslint,prettier,storybook,webpack}'`` + NOTE ๐ก: This will be automatically formatted as a code block, so no need for backticks. + render: shell + validations: + required: true + + - type: textarea + id: current-behavior + attributes: + label: Current Behavior + description: | + What is the current behavior that you are experiencing? + validations: + required: true + + - type: textarea + id: expected-behavior + attributes: + label: Expected Behavior + description: | + What is the behavior that you expect to happen? + validations: + required: true + + - type: input + id: reproduction-link + attributes: + label: Reproduction + description: | + Reproduction for tooling issue can be provided in various ways: + + - Stackblitz project repro which demonstrates the bug - https://stackblitz.com/ + - URL to failed pipeline + - Your branch that demonstrates the bug + - Your repo that demonstrates the bug + + **NOTE:** + + A [minimal reproduction](https://stackoverflow.com/help/minimal-reproducible-example) is required. + If a report is vague (e.g. just a generic error message) and has no reproduction, it will receive a "need reproduction" label. + + โผ๏ธ If no reproduction is provided after 3 days, it will be auto-closed. โผ๏ธ + validations: + required: true + + - type: textarea + id: reproduction-steps + attributes: + label: Steps to reproduce + description: Explain how to cause the issue in the provided reproduction. + placeholder: | + 1. Go to '...' + 2. Click on '...' + 3. Scroll down to '...' + 4. See error + validations: + required: true + + - type: dropdown + id: request-priority + attributes: + label: Suggested severity + options: + - Urgent - No workaround and Products/sites are affected + - High - No workaround + - Medium - Has workaround + - Low - Has or doesn't need a workaround + validations: + required: true + + - type: input + id: products-affected + attributes: + label: Products/sites affected + placeholder: (provide if applicable) + + - type: dropdown + id: open-to-contribute + attributes: + label: Are you willing to submit a PR to fix? + options: + - 'yes' + - 'no' + validations: + required: true + + - type: checkboxes + id: checkboxes + attributes: + label: Validations + description: Before submitting the issue, please make sure you do the following + options: + - label: Check that there isn't already an issue that reports the same bug to avoid creating a duplicate. + required: true + - label: The provided reproduction is a minimal reproducible example of the bug. + required: true diff --git a/.github/ISSUE_TEMPLATE/06-documentation.yml b/.github/ISSUE_TEMPLATE/06-documentation.yml new file mode 100644 index 00000000000000..357f249ee1ed04 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/06-documentation.yml @@ -0,0 +1,64 @@ +name: '๐ Documentation issue' +description: Help improve our docs. +title: '[Docs]: ' +labels: ['Area: Documentation', 'Needs: Triage :mag:'] +projects: ['microsoft/395'] +assignees: [] +body: + - type: markdown + attributes: + value: | + Thank you for helping us improve our documentation ! + + - type: dropdown + id: area + attributes: + label: Area + description: Which documentation site is this issue related to? + options: + - React Components (https://react.fluentui.dev) + - React v8 (https://developer.microsoft.com/en-us/fluentui) + - Web Components (https://web-components.fluentui.dev) + validations: + required: true + + - type: checkboxes + id: documentation-issue-type + attributes: + label: What kind of documentation issue are you reporting? + options: + - label: Reporting a typo + - label: Reporting a documentation bug + - label: Documentation improvement + - label: Documentation feedback + validations: + required: true + + - type: textarea + id: url-pages + attributes: + label: Is there a specific documentation page you are reporting? + description: | + Enter the URL or documentation section here. + validations: + required: true + + - type: textarea + id: description + attributes: + label: Description + description: | + - If you are reporting a bug, please provide a clear and concise description of the issue. + - If you are reporting a typo, please provide the correct information. + - If you are providing feedback, please provide a clear and concise description of the feedback. + validations: + required: true + + - type: checkboxes + id: checkboxes + attributes: + label: Validations + description: Before submitting the issue, please make sure you do the following + options: + - label: Check that there isn't already an issue that requests the same feature to avoid creating a duplicate. + required: true diff --git a/.github/ISSUE_TEMPLATE/07-feature-request.yml b/.github/ISSUE_TEMPLATE/07-feature-request.yml new file mode 100644 index 00000000000000..aca2ff58eedbd4 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/07-feature-request.yml @@ -0,0 +1,67 @@ +name: '๐ Feature proposal' +description: Propose a new feature. +title: '[Feature]: ' +labels: ['Type: Feature', 'Needs: Triage :mag:'] +projects: ['microsoft/395'] +assignees: [] +body: + - type: markdown + attributes: + value: | + Thanks for your interest in the project and for taking the time to fill out this feature report! + + - type: dropdown + id: area + attributes: + label: Area + description: To which area would this be added to + options: + - React Components (@fluentui/react-components) + - React Charting (@fluentui/react-charting) + - Web Components (@fluentui/web-components) + - Tooling + validations: + required: true + + - type: textarea + id: feature-description + attributes: + label: Describe the feature that you would like added + validations: + required: true + + - type: textarea + id: additional-context + attributes: + label: Additional context + description: Any other context or screenshots about the feature request here? + + - type: input + id: feature-discussed-with + attributes: + label: Have you discussed this feature with our team + description: | + Please use a particular person or team's GitHub handle. + If you haven't discussed it with anyone leave it blank. + placeholder: e.g. @microsoft/cxe-prg @githubHandle + + - type: checkboxes + id: checkboxes + attributes: + label: Validations + description: Before submitting the issue, please make sure you do the following + options: + - label: Check that there isn't already an issue that requests the same feature to avoid creating a duplicate. + required: true + + - type: dropdown + id: priority + attributes: + label: Priority + description: What is this feature's priority from your product's perspective + options: + - High + - Medium + - Low + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/convergence_epic.md b/.github/ISSUE_TEMPLATE/08-convergence_epic.md similarity index 100% rename from .github/ISSUE_TEMPLATE/convergence_epic.md rename to .github/ISSUE_TEMPLATE/08-convergence_epic.md diff --git a/.github/ISSUE_TEMPLATE/project_pitch.md b/.github/ISSUE_TEMPLATE/09-project_pitch.md similarity index 100% rename from .github/ISSUE_TEMPLATE/project_pitch.md rename to .github/ISSUE_TEMPLATE/09-project_pitch.md diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml deleted file mode 100644 index cbe435a43d7368..00000000000000 --- a/.github/ISSUE_TEMPLATE/bug-report.yml +++ /dev/null @@ -1,130 +0,0 @@ -name: ๐ Bug Report -description: File a bug report. -title: '[Bug]: ' -labels: ['Type: Bug ๐', 'Needs: Triage ๐'] -assignees: [] -body: - - type: markdown - attributes: - value: | - Thanks for taking the time to fill out this bug report! - - - type: dropdown - id: lib-version - attributes: - label: Library - description: Which library is affected - options: - - React Northstar / v0 (@fluentui/react-northstar) - - React / v8 (@fluentui/react) - - React Components / v9 (@fluentui/react-components) - - Web Components (@fluentui/web-components) - validations: - required: true - - - type: textarea - id: env-info - attributes: - label: System Info - description: Output of `npx envinfo --system --npmPackages '{@fluent/*}' --browsers` - render: shell - validations: - required: true - - - type: dropdown - id: a11y-bug - attributes: - label: Are you reporting an Accessibility issue? - description: | - **PLEASE NOTE:** - - 1. Do not link to, screenshot, or reference a Microsoft product in this description. - 2. Please check ARIA component examples to ensure it is not a screen reader or browser issue. If the issue concerns screen reader behavior that reproduces on HTML elements or ARIA Practices examples (https://w3c.github.io/aria-practices/), it should be filed with the respective browser or screen reading software and not the Fluent UI repo. - 3. There is documentation or best practice info to support your expected behavior (review https://w3c.github.io/aria/ for accessibility guidance.) - - **Additional note for Microsoft employees:** - Please file accessibility issues in our internal tracker (http://aka.ms/fluentui-a11y). This helps with tracking accessibility progress within the company. - options: - - 'yes' - - 'no' - - - type: input - id: reproduction - attributes: - label: Reproduction - description: | - Please provide a link to one of the following browser tools based on the library version: - - React Northstar / v0 - https://codesandbox.io/s/fluent-ui-template-8ismt - - React / v8 - https://aka.ms/fluentpen - - React Components / v9 - https://codesandbox.io/ - - Web Components - https://codesandbox.io/ - - Or a link to a repo that can reproduce the problem you ran into. - - **NOTE:** - - A [minimal reproduction](https://stackoverflow.com/help/minimal-reproducible-example) is required. - If a report is vague (e.g. just a generic error message) and has no reproduction, it will receive a "need reproduction" label. - - If no reproduction is provided after 3 days, it will be auto-closed. - validations: - required: true - - - type: textarea - id: description - attributes: - label: Bug Description - value: | - ## Actual Behavior - fill this out - - ## Expected Behavior - fill this out - validations: - required: true - - - type: textarea - id: logs - attributes: - label: Logs - description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. - render: shell - - - type: dropdown - id: request-priority - attributes: - label: Requested priority - options: - - Blocking - - High - - Normal - - Low - validations: - required: true - - - type: input - id: products-affected - attributes: - label: Products/sites affected - placeholder: (provide if applicable) - - - type: dropdown - id: requested-help - attributes: - label: Are you willing to submit a PR to fix? - options: - - 'yes' - - 'no' - validations: - required: true - - - type: checkboxes - id: checkboxes - attributes: - label: Validations - description: Before submitting the issue, please make sure you do the following - options: - - label: Check that there isn't already an issue that reports the same bug to avoid creating a duplicate. - required: true - - label: The provided reproduction is a minimal reproducible example of the bug. - required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index afd4eed20f19eb..365b2f03673c9d 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,4 +1,4 @@ -blank_issues_enabled: true +blank_issues_enabled: false contact_links: - name: Questions & Discussions url: https://github.com/microsoft/fluentui/discussions diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml deleted file mode 100644 index 6b5f193e6b4ab0..00000000000000 --- a/.github/ISSUE_TEMPLATE/feature-request.yml +++ /dev/null @@ -1,67 +0,0 @@ -name: "\U0001F680 New feature proposal" -description: Propose a new feature to be added to Fluent UI. -title: '[Feature]: ' -labels: ['Type: Feature', 'Needs: Triage ๐'] -assignees: [] -body: - - type: markdown - attributes: - value: | - Thanks for your interest in the project and for taking the time to fill out this feature report! - - - type: dropdown - id: lib-version - attributes: - label: Library - description: To which library would this be added to - options: - - React Northstar / v0 (@fluentui/react-northstar) - - React / v8 (@fluentui/react) - - React Components / v9 (@fluentui/react-components) - - Web Components (@fluentui/web-components) - validations: - required: true - - - type: textarea - id: feature-description - attributes: - label: Describe the feature that you would like added - validations: - required: true - - - type: input - id: feature-discussed-with - attributes: - label: Have you discussed this feature with our team - description: Please use a particular person or team's GitHub handle - validations: - required: false - - - type: textarea - id: additional-context - attributes: - label: Additional context - description: Any other context or screenshots about the feature request here? - validations: - required: false - - - type: checkboxes - id: checkboxes - attributes: - label: Validations - description: Before submitting the issue, please make sure you do the following - options: - - label: Check that there isn't already an issue that requests the same feature to avoid creating a duplicate. - required: true - - - type: dropdown - id: priority - attributes: - label: Priority - description: What is this feature's priority from your product's perspective - options: - - High - - Normal - - Low - validations: - required: false diff --git a/.github/actions/run-publish-vr-screenshot/action.yml b/.github/actions/run-publish-vr-screenshot/action.yml new file mode 100644 index 00000000000000..126e44de7c69d8 --- /dev/null +++ b/.github/actions/run-publish-vr-screenshot/action.yml @@ -0,0 +1,147 @@ +name: 'Run and Publish VR Screenshot' +description: 'Runs and publishes visual regression screenshots' +inputs: + fluentVersion: + description: 'Fluent version' + required: true + default: 'v8' + vrTestPackageName: + description: 'VR test package name' + required: true + default: 'vr-tests' + vrTestPackagePath: + description: 'VR test package path' + required: true + default: 'apps/vr-tests' + locationPrefix: + description: 'Location prefix' + required: true + default: 'fluentuiv8' + locationPostfix: + description: 'Location postfix' + required: true + default: 'vrscreenshotv8' + clientName: + description: 'Client name' + required: true + default: 'fluentuiv8' + +runs: + using: 'composite' + steps: + - uses: nrwl/nx-set-shas@v4 + with: + main-branch-name: 'master' + + - uses: actions/setup-node@v4 + with: + cache: 'yarn' + node-version: '20' + + - run: yarn install --frozen-lockfile + shell: bash + + - run: yarn playwright install --with-deps + shell: bash + + - name: Check if vrTests should be skipped + shell: bash + run: | + isPR=${{ github.event_name == 'pull_request' }} + echo "isPR=$isPR" >> $GITHUB_ENV + if [[ $isPR == true ]]; then + packageAffected=$(yarn --silent check:affected --project ${{ inputs.vrTestPackageName }}) + if [[ $packageAffected == false ]]; then + echo "In PR pipeline but NOT affecting test package. Skipping test run" + echo "vrTestSkip=yes" >> $GITHUB_ENV + else + echo "In PR pipeline and affecting test package. NOT Skipping test run" + echo "vrTestSkip=no" >> $GITHUB_ENV + fi + else + echo "Not in PR pipeline. NOT Skipping test run" + echo "vrTestSkip=no" >> $GITHUB_ENV + fi + + - name: Run VR tests + if: ${{ env.vrTestSkip == 'no' }} + shell: bash + run: yarn nx run ${{ inputs.vrTestPackageName }}:test-vr --nxBail + + - name: Collate Artifacts + if: ${{ env.vrTestSkip == 'no' }} + shell: bash + run: | + mkdir -p screenshots + cp -rf ${{ inputs.vrTestPackagePath }}/dist/screenshots/*.png screenshots/ + + - name: Upload VR screenshots + if: ${{ env.vrTestSkip == 'no' }} + uses: actions/upload-artifact@v4 + with: + name: vrscreenshot${{ inputs.fluentVersion }} + retention-days: 1 + path: screenshots + + # ========================================================== + # STEPS BELOW WILL FAIL TO RUN ON GITHUB ACTIONS - see @TODOs + # ========================================================== + # + # @TODO: will need Federated Identity to be added to tool similarly like we have for monosize azure plugin https://github.com/microsoft/monosize/blob/main/packages/monosize-storage-azure/src/createTableClient.mts#L27 + # - name: VR App - Create Policy + # if: ${{ env.isPR == 'true' && env.vrTestSkip == 'no' }} + # shell: bash + # run: | + # set -exuo pipefail + # npx vr-approval-cli@0.4.11 create-policy --nonBlockingPipelines '{"${{ env.pipelineId }}":{"pipelineStatus": "PENDING","pipelineName": "${{ env.pipelineName }}"}}' --clientType 'FLUENTUI' + # env: + # VR_APP_API_URL: ${{ secrets.VR_APP_API_URL }} + # TENANT_ID: ${{ secrets.TenantId }} + # PRINCIPAL_CLIENT_ID: ${{ secrets.PrincipalClientId }} + # SERVICE_CONNECTION_ID: ${{ secrets.ServiceConnectionId }} + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # @TODO: will need azure/login@v2 to be added to the workflow {@link file://./../../workflows/pr-website-deploy-comment.yml#49} + # - name: Run screenshotdiff + # if: ${{ env.isPR == 'true' && env.vrTestSkip == 'no' }} + # uses: azure/cli@v2 + # env: + # ciDefinitionId is set to 205 because that is the ID of the baseline pipeline (https://uifabric.visualstudio.com/fabricpublic/_build?definitionId=205) used by the master branch + # TODO: not sure how this will be used on GHA cc @evancharlton @TristanWatanabe + # CI_DEFINITION_ID: 205 + # API_TOKEN: ${{ secrets.fabric-public-pipeline-access-PAT }} + # GITHUB_API_TOKEN: ${{ secrets.githubRepoStatusPAT }} + # VR_APP_API_URL: ${{ secrets.VR_APP_API_URL }} + # STORAGE_ACCOUNT_ID: ${{ secrets.StorageAccountId }} + # TENANT_ID: ${{ secrets.TenantId }} + # PRINCIPAL_CLIENT_ID: ${{ secrets.PrincipalClientId }} + # SERVICE_CONNECTION_ID: ${{ secrets.ServiceConnectionId }} + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # with: + # azcliversion: latest + # inlineScript: | + # npx vr-approval-cli@0.4.11 run-diff --screenshotsDirectory ./screenshots --buildType pr --clientType "FLUENTUI" --ciDefinitionId ${{ env.CI_DEFINITION_ID }} --groupName ${{ env.pipelineName }} --locationPrefix ${{ inputs.locationPrefix }} --locationPostfix ${{ inputs.locationPostfix }} --pipelineId ${{ env.pipelineId }} --clientName ${{ inputs.clientName }} --threshold '0.04' --cumThreshold '1' + + # ============ + # NON PR STEPS + # ============ + + # @NOTE: this step runs via ADO from master branch only for now {@link file://./../../../azure-pipelines.vrt-baseline.yml } + + # @TODO: will need azure/login@v2 to be added to the workflow {@link file://./../../workflows/pr-website-deploy-comment.yml#49} + # - name: Run screenshotdiff - update baseline (non PR) + # if: ${{ github.event_name != 'pull_request' }} + # uses: azure/cli@v2 + # env: + # API_TOKEN: ${{ secrets.fabric-public-pipeline-access-PAT }} + # GITHUB_API_TOKEN: ${{ secrets.githubRepoStatusPAT }} + # VR_APP_API_URL: ${{ secrets.VR_APP_API_URL }} + # STORAGE_ACCOUNT_ID: ${{ secrets.StorageAccountId }} + # TENANT_ID: ${{ secrets.TenantId }} + # PRINCIPAL_CLIENT_ID: ${{ secrets.PrincipalClientId }} + # SERVICE_CONNECTION_ID: ${{ secrets.ServiceConnectionId }} + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # with: + # azcliversion: latest + # inlineScript: | + # npx vr-approval-cli@0.4.11 run-diff --buildType release --screenshotsDirectory ./screenshots --clientType "FLUENTUI" --locationPrefix ${{ inputs.locationPrefix }} --locationPostfix ${{ inputs.locationPostfix }} --pipelineId ${{ env.pipelineId }} diff --git a/.github/labeler.yml b/.github/labeler.yml index ba33a600374d51..551e60902d888e 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1 +1,29 @@ -'Type: RFC': 'rfcs/**/*.md' +'Type: RFC': + - changed-files: + - any-glob-to-any-file: 'docs/react-v9/contributing/rfcs/**' + +'CI': + - changed-files: + - any-glob-to-any-file: + - '.github/**' + - '.devops/**' + - 'azure-pipelines*.yml' + +'NX: core': + - changed-files: + - any-glob-to-any-file: + - 'tools/workspace-plugin/**' + - 'nx.json' + - '**/project.json' + +'NX: workspace generators': + - changed-files: + - any-glob-to-any-file: 'tools/workspace-plugin/src/generators/*' + +'NX: workspace executors': + - changed-files: + - any-glob-to-any-file: 'tools/workspace-plugin/src/executors/*' + +'NX: workspace eslint-rules': + - changed-files: + - any-glob-to-any-file: 'tools/eslint-rules/*' diff --git a/.github/scripts/bundle-size-comment.js b/.github/scripts/bundle-size-comment.js new file mode 100644 index 00000000000000..cbb8951116dc53 --- /dev/null +++ b/.github/scripts/bundle-size-comment.js @@ -0,0 +1,55 @@ +// @ts-check + +/** + * + * @param {import('../../scripts/triage-bot/src/types.ts').GithubScriptsParams} options + * @returns + */ +async function main(options) { + const { context, github, core } = options; + + const report = process.env.report; + + if (report) { + const comment = ` + ## Bundle Size Report + Status: success + + ${report} + `; + + // Check if a comment already exists (using the unique ID) to update instead of posting a new one + const { data: comments } = await github.rest.issues.listComments({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: Number(context.payload.pull_request?.number), + }); + + const existingComment = comments.find(comment => comment.body?.includes('## Bundle Size Report')); + + if (existingComment) { + // Update the existing comment + await github.rest.issues.updateComment({ + owner: context.repo.owner, + repo: context.repo.repo, + comment_id: existingComment.id, + body: comment, + }); + return; + } + + // Create a new comment + await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: Number(context.payload.pull_request?.number), + body: comment, + }); + + return; + } + + console.log('No report content found to post to PR.'); +} + +module.exports = main; diff --git a/.github/scripts/deploy-pr-site-status.js b/.github/scripts/deploy-pr-site-status.js new file mode 100644 index 00000000000000..307bc8bbbfbb8a --- /dev/null +++ b/.github/scripts/deploy-pr-site-status.js @@ -0,0 +1,30 @@ +// @ts-check + +/** + * + * @param {import('../../scripts/triage-bot/src/types.ts').GithubScriptsParams & {config:{websiteUrl:string;prId:string}} } options + * @returns + */ +async function main(options) { + const { context, core, github, config } = options; + + const { owner, repo } = context.repo; + + const pull_request = await github.rest.pulls.get({ + owner, + repo, + pull_number: Number(config.prId), + }); + + await github.rest.repos.createCommitStatus({ + owner, + repo, + sha: pull_request.data.head.sha, + state: 'success', + context: 'Pull request demo site', + description: 'Click "Details" to go to the deployed demo site for this pull request', + target_url: config.websiteUrl, + }); +} + +module.exports = main; diff --git a/.github/scripts/prepare-vr-screenshots-for-upload.js b/.github/scripts/prepare-vr-screenshots-for-upload.js new file mode 100644 index 00000000000000..7c0367587796e4 --- /dev/null +++ b/.github/scripts/prepare-vr-screenshots-for-upload.js @@ -0,0 +1,46 @@ +// @ts-check + +const { join } = require('node:path'); +const { existsSync, cpSync, mkdirSync, writeFileSync } = require('node:fs'); +const { createProjectGraphAsync } = require('@nx/devkit'); + +module.exports = main; + +/** + * + * @param {import('../../scripts/triage-bot/src/types.ts').GithubScriptsParams & {config:{projects:string[]}} } options + * @returns + */ +async function main(options) { + const rootDir = 'screenshots'; + const graph = await createProjectGraphAsync(); + + /** + * @type {{[project_name:string]:{path:string}}} + */ + const report = {}; + + options.config.projects.forEach(project => { + const projectConfig = graph.nodes[project]; + const screenshotsPath = join(projectConfig.data.root, 'dist/screenshots'); + + if (!existsSync(screenshotsPath)) { + return; + } + + const destinationFolder = join(rootDir, project); + + mkdirSync(destinationFolder, { recursive: true }); + + cpSync(screenshotsPath, destinationFolder, { + recursive: true, + }); + + console.info(`โ ${screenshotsPath} contents copied to ${destinationFolder}`); + report[project] = { path: project }; + }); + + writeFileSync(join(rootDir, 'screenshots-report.json'), JSON.stringify(report, null, 2)); + + return rootDir; +} diff --git a/.github/scripts/validate-pr-number.js b/.github/scripts/validate-pr-number.js new file mode 100644 index 00000000000000..d65dfd7e525270 --- /dev/null +++ b/.github/scripts/validate-pr-number.js @@ -0,0 +1,36 @@ +// @ts-check + +const { readFileSync } = require('node:fs'); + +module.exports = main; + +/** + * + * @param {{filePath:string}} options + * @returns {number} + */ +function main(options) { + return validatePrNumber(options.filePath); +} + +/** + * + * @param {string} filePath + * @returns {number} + */ +function validatePrNumber(filePath) { + try { + const content = readFileSync(filePath, 'utf-8').trim(); + const prNumber = Number(content); + + if (isNaN(prNumber) || !Number.isInteger(prNumber)) { + throw new Error('The ID in pr.txt is not a valid PR number.'); + } + + console.info('โ PR ID valid'); + return prNumber; + } catch (err) { + console.error(`Error: ${err.message}`); + process.exit(1); + } +} diff --git a/.github/workflows/azure-static-web-apps-deploy.yml b/.github/workflows/azure-static-web-apps-deploy.yml index 1e049feb7b0b2c..bd29d2351ec5a1 100644 --- a/.github/workflows/azure-static-web-apps-deploy.yml +++ b/.github/workflows/azure-static-web-apps-deploy.yml @@ -13,6 +13,7 @@ permissions: jobs: build_and_deploy: + if: ${{ github.repository_owner == 'microsoft' }} runs-on: ubuntu-latest name: Build and Deploy Job steps: diff --git a/.github/workflows/bundle-size-base.yml b/.github/workflows/bundle-size-base.yml new file mode 100644 index 00000000000000..1c2aa9fb32bfd4 --- /dev/null +++ b/.github/workflows/bundle-size-base.yml @@ -0,0 +1,56 @@ +name: Bundle size Base +on: + push: + branches: + - master + +concurrency: + # see https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#example-only-cancel-in-progress-jobs-or-runs-for-the-current-workflow + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +env: + NX_PARALLEL: 4 # ubuntu-latest = 4-core CPU / 16 GB of RAM | macos-14-xlarge (arm) = 6-core CPU / 14 GB of RAM + NX_PREFER_TS_NODE: true + NX_VERBOSE_LOGGING: true + + BROWSERSLIST_IGNORE_OLD_DATA: true + +jobs: + bundle-size-base: + if: ${{ github.repository_owner == 'microsoft' }} + # TODO: use macos-14-xlarge (arm) for faster builds once https://github.com/Azure/cli/issues/172 will be fixed + runs-on: ubuntu-latest + permissions: + id-token: 'write' + + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + cache: 'yarn' + node-version: '20' + + - run: yarn install --frozen-lockfile + + - name: Build all packages & create reports (non-PR) + run: yarn nx run-many -t bundle-size --nxBail + + - name: Login via Azure CLI + uses: azure/login@v2 + with: + client-id: ${{ secrets.AZURE_CLIENT_ID }} + tenant-id: ${{ secrets.AZURE_TENANT_ID }} + subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} + + - name: Upload report + uses: azure/cli@v2 + with: + azcliversion: latest + inlineScript: | + yarn monosize upload-report --branch=${{ github.ref }} --commit-sha ${{ github.sha }} + env: + AZCOPY_AUTO_LOGIN_TYPE: 'AZCLI' + SYSTEM_ACCESSTOKEN: ${{ secrets.GITHUB_TOKEN }} + BUNDLESIZE_ACCOUNT_NAME: ${{ secrets.BUNDLESIZE_ACCOUNT_NAME }} diff --git a/.github/workflows/bundle-size-comment.yml b/.github/workflows/bundle-size-comment.yml new file mode 100644 index 00000000000000..14715007aec7e8 --- /dev/null +++ b/.github/workflows/bundle-size-comment.yml @@ -0,0 +1,33 @@ +name: Bundle size | Comment on PR +on: + workflow_run: + workflows: ['Bundle size'] + types: + - completed + +jobs: + comment: + runs-on: ubuntu-latest + if: ${{ github.repository_owner == 'microsoft' }} && ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' }} + permissions: + pull-requests: write + steps: + - name: Download artifact + uses: actions/download-artifact@v4 + with: + name: monosize-report + path: ./results + run-id: ${{ github.event.workflow_run.id }} + github-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Load PR number + id: pr_number + run: echo "id=$(cat pr.txt)" >> $GITHUB_OUTPUT + working-directory: ./results + + - name: 'Comment on PR' + uses: marocchino/sticky-pull-request-comment@v2 + with: + header: bundle-size-report + number: ${{ steps.pr_number.outputs.id }} + path: ./results/monosize-report.md diff --git a/.github/workflows/bundle-size.yml b/.github/workflows/bundle-size.yml new file mode 100644 index 00000000000000..adeabf8c750305 --- /dev/null +++ b/.github/workflows/bundle-size.yml @@ -0,0 +1,60 @@ +name: Bundle size +on: + pull_request: + +concurrency: + # see https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#example-only-cancel-in-progress-jobs-or-runs-for-the-current-workflow + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +env: + NX_PARALLEL: 6 # ubuntu-latest = 4-core CPU / 16 GB of RAM | macos-14-xlarge (arm) = 6-core CPU / 14 GB of RAM + NX_PREFER_TS_NODE: true + NX_VERBOSE_LOGGING: true + + BROWSERSLIST_IGNORE_OLD_DATA: true + +jobs: + bundle-size: + if: ${{ github.repository_owner == 'microsoft' }} + runs-on: macos-14-xlarge + permissions: + contents: 'read' + actions: 'read' + + steps: + - 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@v4 + with: + main-branch-name: 'master' + + - uses: actions/setup-node@v4 + with: + cache: 'yarn' + node-version: '20' + + - run: echo number of CPUs "$(getconf _NPROCESSORS_ONLN)" + + - run: yarn install --frozen-lockfile + + - name: Build packages & create reports + run: yarn nx affected -t bundle-size --nxBail + + - name: Compare bundle size with base + run: npx monosize compare-reports --branch=${{ github.event.pull_request.base.ref }} --output=markdown --quiet > ./monosize-report.md + + - name: Save PR number + run: echo ${{ github.event.number }} > pr.txt + + - uses: actions/upload-artifact@v4 + with: + name: monosize-report + retention-days: 1 + if-no-files-found: error + path: | + monosize-report.md + pr.txt diff --git a/.github/workflows/check-packages.yml b/.github/workflows/check-packages.yml index cc5403deac4315..338a77e578bd90 100644 --- a/.github/workflows/check-packages.yml +++ b/.github/workflows/check-packages.yml @@ -5,12 +5,13 @@ on: jobs: dependency-deduplication: runs-on: ubuntu-latest + if: ${{ github.repository_owner == 'microsoft' }} 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: 20.x cache: 'yarn' @@ -37,16 +38,17 @@ jobs: dependency-mismatches: runs-on: ubuntu-latest + if: ${{ github.repository_owner == 'microsoft' }} 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: 20.x - - uses: actions/github-script@v6 + - uses: actions/github-script@v7 with: script: | const syncpackVersion = require('./package.json').devDependencies.syncpack; @@ -63,16 +65,17 @@ jobs: change-files: runs-on: ubuntu-latest + if: ${{ github.repository_owner == 'microsoft' }} 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: 20.x - - uses: actions/github-script@v6 + - uses: actions/github-script@v7 with: script: | const beachballVersion = require('./package.json').devDependencies.beachball; diff --git a/.github/workflows/check-tooling.yml b/.github/workflows/check-tooling.yml index df869756918401..9004893bb3bc49 100644 --- a/.github/workflows/check-tooling.yml +++ b/.github/workflows/check-tooling.yml @@ -14,6 +14,7 @@ env: jobs: check-tools: + if: ${{ github.repository_owner == 'microsoft' }} strategy: matrix: os: [ubuntu-latest, windows-latest] @@ -29,11 +30,16 @@ jobs: - run: yarn install --frozen-lockfile - - run: yarn nx run scripts-executors:test -t start + - run: yarn nx run scripts-executors:test -t 'smoke test' + + - run: yarn nx run workspace-plugin:test -t 'prepare-initial-release generator' - run: yarn nx list @fluentui/workspace-plugin - - run: yarn nx g @fluentui/workspace-plugin:react-library --name hello-world --owner '@mrWick' --kind standard --no-interactive + # pre-build react-jsx-runtime - as generate-api executor doesn't provide copy assets capability + - run: yarn nx run react-jsx-runtime:build + + - run: yarn nx g @fluentui/workspace-plugin:react-library --name hello-world --owner '@microsoft/fluentui-react-build' --kind standard --no-interactive - run: yarn nx g @fluentui/workspace-plugin:react-component --project hello-world-preview --name Aiur --no-interactive - run: yarn nx g @fluentui/workspace-plugin:cypress-component-configuration --project hello-world-preview --no-interactive - run: yarn nx g @fluentui/workspace-plugin:bundle-size-configuration --project hello-world-preview --no-interactive diff --git a/.github/workflows/create-milestone.yml b/.github/workflows/create-milestone.yml index 36fac805beb64a..14acf3cf83f372 100644 --- a/.github/workflows/create-milestone.yml +++ b/.github/workflows/create-milestone.yml @@ -10,6 +10,7 @@ permissions: jobs: create-milestone: + if: ${{ github.repository_owner == 'microsoft' }} name: Create this month's milestone runs-on: ubuntu-latest steps: diff --git a/.github/workflows/docsite-publish-ghpages.yml b/.github/workflows/docsite-publish-ghpages.yml index c91c3913a9aaff..66754ab9603647 100644 --- a/.github/workflows/docsite-publish-ghpages.yml +++ b/.github/workflows/docsite-publish-ghpages.yml @@ -10,13 +10,13 @@ on: jobs: check: runs-on: ubuntu-latest - if: ${{ contains(github.event.head_commit.message, 'applying package updates') || github.event_name == 'workflow_dispatch' }} + if: ${{ github.repository_owner == 'microsoft' }} && ${{ contains(github.event.head_commit.message, 'applying package updates') || github.event_name == 'workflow_dispatch' }} outputs: status: ${{ steps.verify-react-components-changed.outputs.any_changed == 'true' || github.event_name == 'workflow_dispatch' }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 name: Checkout [master] - name: Verify react-compoenents has changed @@ -31,11 +31,11 @@ jobs: if: needs.check.outputs.status == 'true' 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: 20.x cache: 'yarn' diff --git a/.github/workflows/issues.yml b/.github/workflows/issues.yml index 8abcb77c26b3f4..017ab804d281a0 100644 --- a/.github/workflows/issues.yml +++ b/.github/workflows/issues.yml @@ -12,8 +12,8 @@ jobs: issues: write steps: - - uses: actions/checkout@v3 - - uses: actions/github-script@v6 + - uses: actions/checkout@v4 + - uses: actions/github-script@v7 with: script: | const config = require('./.github/triage-bot.config.json'); diff --git a/.github/workflows/pr-housekeeping.yml b/.github/workflows/pr-housekeeping.yml index 7af9503414458f..2b6d63086c61da 100644 --- a/.github/workflows/pr-housekeeping.yml +++ b/.github/workflows/pr-housekeeping.yml @@ -9,12 +9,17 @@ permissions: jobs: label: + if: ${{ github.repository_owner == 'microsoft' }} runs-on: ubuntu-latest steps: - - uses: actions/labeler@v3 + - uses: actions/labeler@v5 with: repo-token: '${{ secrets.GITHUB_TOKEN }}' + sync-labels: true + configuration-path: .github/labeler.yml + assign-to-current-milestone: + if: ${{ github.repository_owner == 'microsoft' }} runs-on: ubuntu-latest steps: - name: Assign to latest milestone diff --git a/.github/workflows/pr-vrt-comment.yml b/.github/workflows/pr-vrt-comment.yml new file mode 100644 index 00000000000000..cea6491dd5114c --- /dev/null +++ b/.github/workflows/pr-vrt-comment.yml @@ -0,0 +1,151 @@ +name: VRT CI | Comment on PR +on: + workflow_run: + workflows: ['VRT CI'] + types: + - completed + branches: + - master + # remove following once CRT testing is done + - vrt-gha-testing + +concurrency: + # see https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#example-only-cancel-in-progress-jobs-or-runs-for-the-current-workflow + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +env: + NX_PARALLEL: 4 # ubuntu-latest = 4-core CPU / 16 GB of RAM | macos-14-xlarge (arm) = 6-core CPU / 14 GB of RAM + NX_PREFER_TS_NODE: true + NX_VERBOSE_LOGGING: true + +jobs: + run_vr_diff: + runs-on: ubuntu-latest + if: ${{ github.repository_owner == 'microsoft' }} && ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' }} + outputs: + pr_number: ${{ steps.pr_number.outputs.result }} + permissions: + # necessary to write comments to the PR from the vr-approval-cli + pull-requests: write + steps: + - uses: actions/checkout@v4 + with: + sparse-checkout: | + .github + + # downloaded artifacts will contain screenshots from affected project including 'screenshots-report.json' which contains proper image mappings for affected project + # - see @{link file://./../scripts/prepare-vr-screenshots-for-upload.js#43} + # - see @{link file://./pr-vrt.yml#56} + - uses: actions/download-artifact@v4 + with: + name: vrscreenshot + path: ./screenshots + run-id: ${{ github.event.workflow_run.id }} + github-token: ${{ secrets.GITHUB_TOKEN }} + + - uses: actions/download-artifact@v4 + with: + name: pr-number + path: ./results + run-id: ${{ github.event.workflow_run.id }} + github-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Load PR number + uses: actions/github-script@v7 + id: pr_number + with: + script: | + const run = require('./.github/scripts/validate-pr-number'); + const result = run({filePath:'results/pr.txt'}); + return result; + result-encoding: string + + - name: VR App - Create Policy + run: | + echo "MAKE THIS WORK" + + - name: Run screenshotdiff + run: | + echo "MAKE THIS WORK" + npx vr-approval-cli@0.4.11 run-diff --screenshotsDirectory ./screenshots --buildType pr --clientType "FLUENTUI" --threshold '0.04' --cumThreshold '1' + +# ๐ก NOTE: +# - following is manually provided setup used in previous ADO pipeline {@link file://./../../azure-pipelines.vrt-baseline.yml } +# - keeping for future reference + +# web_components: +# runs-on: ubuntu-latest +# env: +# pipelineId: '315' +# pipelineName: 'fluent-ui_VRT_Pipeline_web-components' +# steps: +# - uses: actions/checkout@v4 +# with: +# fetch-depth: 0 +# - name: Run and publish VR screenshot +# uses: ./.github/actions/run-publish-vr-screenshot +# with: +# fluentVersion: webcomponents +# vrTestPackageName: 'vr-tests-web-components' +# vrTestPackagePath: 'apps/vr-tests-web-components' +# locationPrefix: 'FluentUI-web-components' +# locationPostfix: 'vrscreenshotwebcomponents' +# clientName: 'fluentui-web-components-v3' + +# react_components: +# runs-on: ubuntu-latest +# env: +# pipelineId: '311' +# pipelineName: 'fluent-ui_VRT_Pipeline_v9' +# steps: +# - uses: actions/checkout@v4 +# with: +# fetch-depth: 0 +# - name: Run and publish VR screenshot +# uses: ./.github/actions/run-publish-vr-screenshot +# with: +# fluentVersion: v9 +# vrTestPackageName: 'vr-tests-react-components' +# vrTestPackagePath: 'apps/vr-tests-react-components' +# locationPrefix: 'fluentuiv9' +# locationPostfix: 'vrscreenshotv9' +# clientName: 'fluentuiv9' + +# react: +# runs-on: ubuntu-latest +# env: +# pipelineId: '312' +# pipelineName: 'fluent-ui_VRT_Pipeline_v8' +# steps: +# - uses: actions/checkout@v4 +# with: +# fetch-depth: 0 +# - name: Run and publish VR screenshot +# uses: ./.github/actions/run-publish-vr-screenshot +# with: +# fluentVersion: v8 +# vrTestPackageName: 'vr-tests' +# vrTestPackagePath: 'apps/vr-tests' +# locationPrefix: 'fluentuiv8' +# locationPostfix: 'vrscreenshotv8' +# clientName: 'fluentuiv8' + +# react_northstar: +# runs-on: ubuntu-latest +# env: +# pipelineId: '313' +# pipelineName: 'fluent-ui_VRT_Pipeline_v0' +# steps: +# - uses: actions/checkout@v4 +# with: +# fetch-depth: 0 +# - name: Run and publish VR screenshot +# uses: ./.github/actions/run-publish-vr-screenshot +# with: +# fluentVersion: v0 +# vrTestPackageName: 'docs' +# vrTestPackagePath: 'packages/fluentui/docs' +# locationPrefix: 'FluentUI-v0' +# locationPostfix: 'vrscreenshotv0' +# clientName: 'FluentUIV0' diff --git a/.github/workflows/pr-vrt.yml b/.github/workflows/pr-vrt.yml new file mode 100644 index 00000000000000..90901135c32cb7 --- /dev/null +++ b/.github/workflows/pr-vrt.yml @@ -0,0 +1,75 @@ +name: VRT CI +on: + pull_request: + # TODO: once testing is done enable pull_request on all branches again + branches: + - vrt-gha-testing + +concurrency: + # see https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#example-only-cancel-in-progress-jobs-or-runs-for-the-current-workflow + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +env: + NX_PARALLEL: 6 # ubuntu-latest = 4-core CPU / 16 GB of RAM | macos-14-xlarge (arm) = 6-core CPU / 14 GB of RAM + NX_PREFER_TS_NODE: true + NX_VERBOSE_LOGGING: true + +permissions: + contents: 'read' + actions: 'read' + +jobs: + generate_vrt_screenshots: + if: ${{ github.repository_owner == 'microsoft' }} + runs-on: macos-14-xlarge + steps: + - 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@v4 + with: + main-branch-name: 'master' + + - uses: actions/setup-node@v4 + with: + cache: 'yarn' + node-version: '20' + + - run: yarn install --frozen-lockfile + - run: yarn playwright install --with-deps + + - name: Run VR tests (generate screenshots) + run: yarn nx affected -t test-vr --nxBail + + - name: Prepare VR screenshots for upload + uses: actions/github-script@v7 + id: screenshots_root + with: + script: | + const run = require('./.github/scripts/prepare-vr-screenshots-for-upload'); + const config = { + projects: ['vr-tests-web-components', 'vr-tests-react-components', 'vr-tests', 'docs'] + }; + const result = await run({github,context,core,config}); + return result; + result-encoding: string + + - name: Upload VR screenshots + uses: actions/upload-artifact@v4 + with: + name: vrscreenshot + retention-days: 1 + path: ${{steps.screenshots_root.outputs.result}} + + - name: Save PR number + run: echo ${{ github.event.number }} > pr.txt + - uses: actions/upload-artifact@v4 + with: + name: pr-number + retention-days: 1 + if-no-files-found: error + path: | + pr.txt diff --git a/.github/workflows/pr-website-deploy-comment.yml b/.github/workflows/pr-website-deploy-comment.yml new file mode 100644 index 00000000000000..a5ae23eb4be542 --- /dev/null +++ b/.github/workflows/pr-website-deploy-comment.yml @@ -0,0 +1,107 @@ +name: PR Website Deploy | Comment on PR +on: + workflow_run: + workflows: ['PR Website Deploy'] + types: + - completed + +concurrency: + # see https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#example-only-cancel-in-progress-jobs-or-runs-for-the-current-workflow + group: ${{github.event.workflow_run.id }}-${{ github.ref }} + cancel-in-progress: true + +env: + DEPLOY_HOST_URL: https://fluentuipr.z22.web.core.windows.net/ + AZURE_STORAGE: fluentuipr + +jobs: + deploy: + runs-on: ubuntu-latest + if: ${{ github.repository_owner == 'microsoft' }} && ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' }} + outputs: + pr_number: ${{ steps.pr_number.outputs.result }} + website_url: ${{ steps.website_url.outputs.id }} + permissions: + id-token: write + + steps: + - uses: actions/checkout@v4 + with: + sparse-checkout: | + .github + + - uses: actions/download-artifact@v4 + with: + name: pr-website-artifacts + path: ./website + run-id: ${{ github.event.workflow_run.id }} + github-token: ${{ secrets.GITHUB_TOKEN }} + + - uses: actions/download-artifact@v4 + with: + name: pr-number + path: ./results + run-id: ${{ github.event.workflow_run.id }} + github-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Load PR number + uses: actions/github-script@v7 + id: pr_number + with: + script: | + const run = require('./.github/scripts/validate-pr-number'); + const result = run({filePath:'results/pr.txt'}); + return result; + result-encoding: string + + - name: Load WEBSITE URL + id: website_url + run: echo "id=${{env.DEPLOY_HOST_URL}}pull/${{steps.pr_number.outputs.result}}/" >> $GITHUB_OUTPUT + + - name: Login via Azure CLI + uses: azure/login@v2 + with: + client-id: ${{ secrets.AZURE_CLIENT_ID }} + tenant-id: ${{ secrets.AZURE_TENANT_ID }} + subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }} + + - name: Upload PR WebSite + uses: azure/cli@v2 + env: + AZCOPY_AUTO_LOGIN_TYPE: 'AZCLI' + with: + azcliversion: latest + inlineScript: | + az storage blob upload-batch \ + --destination '$web' \ + --source ./website \ + --account-name ${{ env.AZURE_STORAGE }} \ + --destination-path pull/${{steps.pr_number.outputs.result}} \ + --auth-mode login \ + --overwrite + + comment: + runs-on: ubuntu-latest + needs: deploy + if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' }} + permissions: + pull-requests: write + statuses: write + steps: + - uses: actions/checkout@v4 + + - name: 'Comment on PR' + uses: marocchino/sticky-pull-request-comment@v2 + with: + header: deploy-pr-site + number: ${{ needs.deploy.outputs.pr_number }} + message: | + Pull request demo site: [URL](${{needs.deploy.outputs.website_url}}) + + - name: Update PR deploy site GitHub status + uses: actions/github-script@v7 + with: + script: | + const run = require('./.github/scripts/deploy-pr-site-status'); + const config = { websiteUrl: '${{ needs.deploy.outputs.website_url }}', prId: '${{ needs.deploy.outputs.pr_number }}'}; + await run({github,context,core,config}); diff --git a/.github/workflows/pr-website-deploy.yml b/.github/workflows/pr-website-deploy.yml new file mode 100644 index 00000000000000..c834640b268682 --- /dev/null +++ b/.github/workflows/pr-website-deploy.yml @@ -0,0 +1,68 @@ +name: PR Website Deploy +on: + pull_request: + +concurrency: + # see https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#example-only-cancel-in-progress-jobs-or-runs-for-the-current-workflow + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +env: + NX_PARALLEL: 6 # ubuntu-latest = 4-core CPU / 16 GB of RAM | macos-14-xlarge (arm) = 6-core CPU / 14 GB of RAM + NX_PREFER_TS_NODE: true + NX_VERBOSE_LOGGING: true + + BROWSERSLIST_IGNORE_OLD_DATA: true + +jobs: + bundle: + if: ${{ github.repository_owner == 'microsoft' }} + runs-on: macos-14-xlarge + permissions: + contents: 'read' + actions: 'read' + + steps: + - 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@v4 + with: + main-branch-name: 'master' + + - uses: actions/setup-node@v4 + with: + cache: 'yarn' + node-version: '20' + + - run: echo number of CPUs "$(getconf _NPROCESSORS_ONLN)" + + - run: yarn install --frozen-lockfile + + - name: Bundle + run: yarn nx affected -t bundle --nxBail + + - name: Build Storybooks + run: yarn nx affected -t build-storybook --nxBail + + - name: Generate PR Deploy Site + run: yarn nx run pr-deploy-site:generate:site + - uses: actions/upload-artifact@v4 + with: + name: pr-website-artifacts + retention-days: 1 + if-no-files-found: error + path: | + apps/pr-deploy-site/dist/ + + - name: Save PR number + run: echo ${{ github.event.number }} > pr.txt + - uses: actions/upload-artifact@v4 + with: + name: pr-number + retention-days: 1 + if-no-files-found: error + path: | + pr.txt diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 00000000000000..5712801a144c5d --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,120 @@ +name: CI +on: + push: + branches: + - master + pull_request: + +concurrency: + # see https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#example-only-cancel-in-progress-jobs-or-runs-for-the-current-workflow + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +env: + NX_PARALLEL: 6 # ubuntu-latest = 4-core CPU / 16 GB of RAM | macos-14-xlarge (arm) = 6-core CPU / 14 GB of RAM + NX_PREFER_TS_NODE: true + NX_VERBOSE_LOGGING: true + + BROWSERSLIST_IGNORE_OLD_DATA: true + + DEPLOY_HOST: fluentuipr.z22.web.core.windows.net + DEPLOY_URL: https://fluentuipr.z22.web.core.windows.net/${{ github.event.pull_request.number || github.ref_name }} + DEPLOY_BASE_PATH: ${{ github.event.pull_request.number != '' && format('pull/{0}', github.event.pull_request.number) || format('heads/{0}', github.ref_name) }} + +jobs: + main: + if: ${{ github.repository_owner == 'microsoft' }} + runs-on: macos-14-xlarge + permissions: + contents: 'read' + actions: 'read' + + steps: + - 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@v4 + with: + main-branch-name: 'master' + + - uses: actions/setup-node@v4 + with: + cache: 'yarn' + node-version: '20' + + - run: echo number of CPUs "$(getconf _NPROCESSORS_ONLN)" + + - run: yarn install --frozen-lockfile + + - name: Workspace lint + run: | + yarn nx run workspace-plugin:check-graph + yarn nx g @fluentui/workspace-plugin:tsconfig-base-all --verify + yarn nx g @fluentui/workspace-plugin:normalize-package-dependencies --verify + + - name: Type-check just.config.ts files + run: | + # following packages need to be build in advance: + # @fluentui/api-docs is used within apps/public-docsite-resources/just.config.ts, + # @fluentui/digest is used within packages/fluentui/perf-test-northstar/just.config.ts, thus it needs to be build in advance + # + # NOTE: we are running this via nx in order to get cache hits later on + yarn nx run-many -t build -p api-docs digest + yarn tsc -p ./tsconfig.just-scripts-configs.json + + - name: 'check packages: installed dependencies versions' + run: | + yarn check:installed-dependencies-versions + + - name: check formatting + run: | + yarn nx format:check --base origin/master + + - name: build, test, lint, test-ssr (affected) + run: | + FLUENT_JEST_WORKER=2 yarn nx affected -t build test lint type-check test-ssr test-integration verify-packaging --nxBail + + - name: 'Check for unstaged changes' + run: | + git status --porcelain + git diff-index --quiet HEAD -- || exit 1 + + e2e: + if: ${{ github.repository_owner == 'microsoft' }} + # TODO: switch to macos once problematic tests are fixed + # https://github.com/microsoft/fluentui/issues/33173 + # https://github.com/microsoft/fluentui/issues/33172 + runs-on: ubuntu-latest + permissions: + contents: 'read' + actions: 'read' + + steps: + - 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@v4 + with: + main-branch-name: 'master' + + - uses: actions/setup-node@v4 + with: + cache: 'yarn' + node-version: '20' + + - run: echo number of CPUs "$(getconf _NPROCESSORS_ONLN)" + + - run: yarn install --frozen-lockfile + + - name: Install Playwright dependencies + run: yarn playwright install --with-deps + + - name: Verify Cypress install + run: yarn cypress verify + + - name: Cypress/Playwright E2E tests + run: yarn nx affected -t e2e --nxBail --parallel 1 diff --git a/.gitignore b/.gitignore index f2491567f66dd0..2775862c30b47e 100644 --- a/.gitignore +++ b/.gitignore @@ -71,6 +71,10 @@ dist dist-storybook screenshots !tools/**/lib +tools/**/__fixtures__/**/lib +tools/**/__fixtures__/**/lib-commonjs +# Playwright +test-results/ *.tar.gz diff --git a/.nxignore b/.nxignore index b0c3abba5efdb2..f49cf30121a7d2 100644 --- a/.nxignore +++ b/.nxignore @@ -9,4 +9,20 @@ packages/fluentui/CONTRIBUTING.md packages/fluentui/README.md packages/fluentui/.browserslistrc + +; build output **/dist/** + +; known directories to not incorporate into the workspace graph creation +**/fixtures/** +**/__fixtures__/** +**/bundle-size/** +**/fake_node_modules/** + +; scaffolding templates +**/generators/**/files/** +plop-templates +plop-templates-* + +; TODO: temporary ignore - remove once https://github.com/microsoft/fluentui/pull/32371 is merged +scripts/*/just.config.ts diff --git a/.storybook/docs-root.css b/.storybook/docs-root.css index 517a16cd9da03f..81aa81ca4f9357 100644 --- a/.storybook/docs-root.css +++ b/.storybook/docs-root.css @@ -15,12 +15,12 @@ margin-top: 49px; } -#storybook-docs details { +#storybook-docs details:not(.sbdocs-preview details) { position: relative; z-index: 99; } -#storybook-docs .sbdocs:not(.sbdocs-preview) p { +#storybook-docs .sbdocs p:not(.sbdocs-preview p) { font-family: 'Segoe UI', 'Segoe UI Web (West European)', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif; font-size: 18px; @@ -45,13 +45,13 @@ border-radius: 24px; } -#storybook-docs .sbdocs:not(.sbdocs-preview) hr { +#storybook-docs .sbdocs hr:not(.sbdocs-preview hr) { margin: 48px 0; height: 0; border-top: 1px solid #ebebeb; } -#storybook-docs .sbdocs h2 { +#storybook-docs .sbdocs h2:not(.sbdocs-preview h2) { font-family: 'Segoe UI', 'Segoe UI Web (West European)', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif; font-size: 24px; @@ -64,7 +64,7 @@ padding: 48px 0 0 0; } -#storybook-docs .sbdocs h2 code { +#storybook-docs .sbdocs h2 code:not(.sbdocs-preview h2 code) { border-radius: 4px; font-size: 20px; } @@ -92,7 +92,7 @@ margin: -40px 0 0; } -#storybook-docs .sbdocs:not(.sbdocs-preview) li { +#storybook-docs .sbdocs li:not(.sbdocs-preview li) { font-family: 'Segoe UI', 'Segoe UI Web (West European)', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif; font-size: 16px; @@ -104,11 +104,11 @@ margin-top: 8px; } -#storybook-docs .sbdocs:not(.sbdocs-preview) ul { +#storybook-docs .sbdocs ul:not(.sbdocs-preview ul) { margin: 12px 0; } -#storybook-docs .sbdocs-ul .sbdocs:not(.sbdocs-preview) li { +#storybook-docs .sbdocs-ul li:not(.sbdocs-preview .sbdocs-ul li) { list-style: none; position: relative; } @@ -276,7 +276,7 @@ line-height: 21px; } -#storybook-docs code, +#storybook-docs code:not(.sbdocs-preview code), #storybook-docs .docblock-argstable tbody tr td:nth-child(3) > div > span, #storybook-docs .docblock-argstable-body > tr > td:nth-child(2) > div:nth-child(2) span, #storybook-docs .docblock-argstable-body > tr > td:nth-child(2) > div:nth-child(1) > div > span, @@ -313,7 +313,7 @@ white-space: normal; } -#storybook-docs code { +#storybook-docs code:not(.sbdocs-preview code) { padding: 0.1em 0.2em; display: inline-block; background-color: rgba(17, 16, 15, 0.1); @@ -426,7 +426,7 @@ h1.fluent { letter-spacing: -0.16px; } -h1 .fluent-version { +h1.fluent .fluent-version { display: block; font-size: 24px; /* --font-size-base-600 */ line-height: 32px; diff --git a/.storybook/preview.js b/.storybook/preview.js index 723321706ac3da..537bdd7f719136 100644 --- a/.storybook/preview.js +++ b/.storybook/preview.js @@ -17,7 +17,7 @@ export const parameters = { docs: { source: { excludeDecorators: true, - type: 'source', + type: 'code', }, }, exportToSandbox: { diff --git a/README.md b/README.md index ce78d0bfa950d5..c2bffa8e5ced88 100644 --- a/README.md +++ b/README.md @@ -17,8 +17,8 @@ The following table will help you navigate the 3 projects and understand their d | **Used By** | Microsoft 365 | Office | Edge | | **Read Me** | [README.md](/packages/react-components/react-components/README.md) | [README.md](/packages/react/README.md)| [README.md](/packages/web-components/README.md) | | **Changelog** | [CHANGELOG.md](/packages/react-components/react-components/CHANGELOG.md) | [CHANGELOG.md](/packages/react/CHANGELOG.md) | [CHANGELOG.md](/packages/web-components/CHANGELOG.md) | -| **Repo** | [packages/react-components](/packages/react-components/react-components/CHANGELOG.md) | [./packages/react](/packages/react) | [./packages/web-components](/packages/web-components) | -| **Quick Start** | [Quick Start](https://react.fluentui.dev/?path=/docs/concepts-developer-quick-start--page) | [Quick Start](https://developer.microsoft.com/en-us/fluentui#/get-started/web) | [See README.md](https://github.com/microsoft/fluentui/tree/master/packages/web-components/README.md) | +| **Repo** | [packages/react-components](/packages/react-components/react-components) | [./packages/react](/packages/react) | [./packages/web-components](/packages/web-components) | +| **Quick Start** | [Quick Start](https://react.fluentui.dev/?path=/docs/concepts-developer-quick-start--docs) | [Quick Start](https://developer.microsoft.com/en-us/fluentui#/get-started/web) | [See README.md](https://github.com/microsoft/fluentui/tree/master/packages/web-components/README.md) | | **Docs** | [https://react.fluentui.dev/](https://react.fluentui.dev/) | [aka.ms/fluentui-react](https://aka.ms/fluentui-react) | [aka.ms/fluentui-web-components](https://aka.ms/fluentui-web-components) | | **NPM** | `@fluentui/react-components` | `@fluentui/react`| `@fluentui/web-components` | | **Version** | [![npm version](https://img.shields.io/npm/v/@fluentui/react-components?style=flat-square)](https://www.npmjs.com/package/@fluentui/react-components) | [![npm version](https://img.shields.io/npm/v/@fluentui/react?style=flat-square)](https://www.npmjs.com/package/@fluentui/react) | [![npm version](https://img.shields.io/npm/v/@fluentui/web-components/beta?style=flat-square)](https://www.npmjs.com/package/@fluentui/web-components/v/3.0.0-beta.15) | diff --git a/apps/chart-docsite/.babelrc b/apps/chart-docsite/.babelrc new file mode 100644 index 00000000000000..b3db474cdefbd7 --- /dev/null +++ b/apps/chart-docsite/.babelrc @@ -0,0 +1,3 @@ +{ + "extends": "../../babel.config.json" +} diff --git a/apps/chart-docsite/.eslintrc.json b/apps/chart-docsite/.eslintrc.json new file mode 100644 index 00000000000000..a75719fd243047 --- /dev/null +++ b/apps/chart-docsite/.eslintrc.json @@ -0,0 +1,10 @@ +{ + "extends": ["plugin:@fluentui/eslint-plugin/react"], + "root": true, + "rules": { + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/jsx-no-bind": "off", + "@typescript-eslint/no-deprecated": "off", + "import/no-extraneous-dependencies": ["error", { "packageDir": [".", "../.."] }] + } +} diff --git a/apps/chart-docsite/.storybook/fix-title.js b/apps/chart-docsite/.storybook/fix-title.js new file mode 100644 index 00000000000000..3f72f01ea672c5 --- /dev/null +++ b/apps/chart-docsite/.storybook/fix-title.js @@ -0,0 +1,36 @@ +const fs = require('fs'); +const path = require('path'); + +/** + * + * @param {string} filePath + * @param {string} title + */ +function fixTitle(filePath, title) { + const htmlDocumentPath = path.resolve(__dirname, filePath); + const htmlDocument = fs.readFileSync(htmlDocumentPath, 'utf-8'); + const updatedHtmlDocument = htmlDocument.replace(/