Skip to content

Commit

Permalink
Merge branch 'master' into feat/drawer-motion
Browse files Browse the repository at this point in the history
* master: (32 commits)
  refactor(react-drawer): change DrawerHeaderTitle slot creation while keeping the same API (microsoft#29042)
  test(react-drawer): add render tests for drawer subcomponents (microsoft#29043)
  Grouped vertical bar chart - Component tests (microsoft#29031)
  docs: add Fluent UI Insights EP06 to README (microsoft#29051)
  chore: use swc-plugin-de-indent-template-literal for consoles (microsoft#29040)
  chore: adds swc-plugin-de-indent-template-literal (microsoft#29037)
  feat(react-jsx-runtime): v9 packages to use importSource (microsoft#28959)
  chore: update swc build dependencies (microsoft#28989)
  fix(react-tags-preview): add hover/pressed style for windows high contrast (microsoft#29035)
  chore(react-tags-preview): use InteractionTag for TagGroup's stories (microsoft#29024)
  chore(react-tags-preview): use makeResetStyles for base styles (microsoft#29022)
  chore: fix codesandbox export for preview component by making @fluentui/react-components required dependency (microsoft#29016)
  applying package updates
  feat(react-motion): create useReducedMotion and apply to useMotion to skip animations (microsoft#29014)
  ReAdd: Keytips: Align keytipData with visible instance for dupes (microsoft#28992)
  feat(react-drawer): add motion to Drawer (microsoft#28999)
  fix(react-utilities): avoid calling requestAnimationFrame when in SSR (microsoft#29015)
  fix(ssr-tests-v9): use correct path for ssr-tests-v9 stories (microsoft#29025)
  chore: updates devcontainer to use v16-bookworm image (microsoft#28997)
  feat(docsite): add Application Insights telemetry (microsoft#28709)
  ...
  • Loading branch information
marcosmoura committed Sep 3, 2023
2 parents fa92c7f + 6363e77 commit 58b1e52
Show file tree
Hide file tree
Showing 572 changed files with 11,405 additions and 1,926 deletions.
17 changes: 1 addition & 16 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,4 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.222.0/containers/javascript-node/.devcontainer/base.Dockerfile

# [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 16, 14, 12, 16-bullseye, 14-bullseye, 12-bullseye, 16-buster, 14-buster, 12-buster
ARG VARIANT="16-bullseye"
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}

# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>

# [Optional] Uncomment if you want to install an additional version of node using nvm
# ARG EXTRA_NODE_VERSION=10
# RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}"

# [Optional] Uncomment if you want to install more global node modules
# RUN su node -c "npm install -g <your-package-list-here>"
FROM mcr.microsoft.com/devcontainers/typescript-node:1-16-bookworm

# Cypress linux pre-requisites https://docs.cypress.io/guides/getting-started/installing-cypress#Linux-Prerequisites
RUN apt-get update && apt-get -y install libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libgconf-2-4 libnss3 libxss1 libasound2 libxtst6 xauth xvfb
12 changes: 2 additions & 10 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.222.0/containers/javascript-node
{
"name": "Node.js",
"build": {
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick a Node version: 16, 14, 12.
// Append -bullseye or -buster to pin to an OS version.
// Use -bullseye variants on local arm64/Apple Silicon.
"args": { "VARIANT": "16" }
"dockerfile": "Dockerfile"
},
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node",
"features": {
"github-cli": "latest"
"ghcr.io/devcontainers/features/github-cli:1": {}
},
"containerEnv": {
// Required Environment Variable to properly run Cypress
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/docsite-publish-ghpages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ jobs:

- name: Build storybook
run: yarn workspace @fluentui/public-docsite-v9 build-storybook
env:
STORYBOOK_APPINSIGHTS_INSTRUMENTATION_KEY: ${{ secrets.STORYBOOK_APPINSIGHTS_INSTRUMENTATION_KEY }}

- name: Upload Pages Artifact
uses: actions/upload-pages-artifact@v1
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,6 @@ rush.json

# tsdoc
tsdoc-metadata.json

# swc cache
.swc
3 changes: 2 additions & 1 deletion .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,13 @@ export const parameters = {
'react-dom': '^17',
// necessary when using typescript in CodeSandbox
'react-scripts': 'latest',
// necessary for FluentProvider:
'@fluentui/react-components': '^9.0.0',
// Pin @swc/helpers - in 0.4.36 it uses dependency alias which is not supported by CodeSandbox.
// Remove this pinned version when @swc/helpers will be upgraded https://github.com/microsoft/fluentui/issues/28919
'@swc/helpers': '0.4.35',
},
optionalDependencies: {
'@fluentui/react-components': '^9.0.0', // necessary for FluentProvider
'@fluentui/react-icons': 'latest',
},
indexTsx: dedent`
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ The following table will help you navigate the 3 projects and understand their d
| :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| <a href="https://learn.microsoft.com/en-us/shows/fluent-ui-insights/fluent-ui-insights-positioning?utm_source=github" target="_blank"><img src="ghdocs/medias/fluentui-ep01-preview.gif" alt="Watch EP01: Positioning" width="240" /></a> | <a href="https://learn.microsoft.com/en-us/shows/fluent-ui-insights/fluent-ui-insights-styling?utm_source=github" target="_blank"><img src="ghdocs/medias/fluentui-ep02-preview.gif" alt="Watch EP02: Styling" width="240" /></a> | <a href="https://learn.microsoft.com/en-us/shows/fluent-ui-insights/fluent-ui-insights-griffel?utm_source=github" target="_blank"><img src="ghdocs/medias/fluentui-ep03-preview.gif" alt="Watch EP03: Griffel" width="240" /></a> |

| EP04: Foundational APIs | EP05: Theming |
| :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| <a href="https://learn.microsoft.com/en-us/shows/fluent-ui-insights/fluent-ui-insights-apis-in-v9-slots-jsx-children-triggers?utm_source=github" target="_blank"><img src="ghdocs/medias/fluentui-ep04-preview.gif" alt="Watch EP04: Foundational APIs" width="240" /></a> | <a href="https://learn.microsoft.com/en-us/shows/fluent-ui-insights/fluent-ui-insights-theming-in-v9?utm_source=github" target="_blank"><img src="ghdocs/medias/fluentui-ep05-preview.gif" alt="Watch EP05: Theming" width="240" /></a> |
| EP04: Foundational APIs | EP05: Theming | EP06: Accessible by default |
| :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
| <a href="https://learn.microsoft.com/en-us/shows/fluent-ui-insights/fluent-ui-insights-apis-in-v9-slots-jsx-children-triggers?utm_source=github" target="_blank"><img src="ghdocs/medias/fluentui-ep04-preview.gif" alt="Watch EP04: Foundational APIs" width="240" /></a> | <a href="https://learn.microsoft.com/en-us/shows/fluent-ui-insights/fluent-ui-insights-theming-in-v9?utm_source=github" target="_blank"><img src="ghdocs/medias/fluentui-ep05-preview.gif" alt="Watch EP05: Theming" width="240" /></a> | <a href="https://learn.microsoft.com/en-us/shows/fluent-ui-insights/fluent-ui-insights-accessible-by-default?utm_source=github" target="_blank"><img src="ghdocs/medias/fluentui-ep06-preview.gif" alt="Watch EP06: Accessible by default" width="240" /></a> |

## Licenses

Expand Down
34 changes: 34 additions & 0 deletions apps/public-docsite-v9/.storybook/manager.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,41 @@
import { addons } from '@storybook/addons';
import fluentStorybookTheme from './theme';
import { ApplicationInsights } from '@microsoft/applicationinsights-web';
import { STORY_CHANGED, STORY_ERRORED, STORY_MISSING } from '@storybook/core-events';

addons.setConfig({
theme: fluentStorybookTheme,
showPanel: false,
});

addons.register('application-insights', api => {
if (process.env.NODE_ENV === 'production') {
const { STORYBOOK_APPINSIGHTS_INSTRUMENTATION_KEY } = process.env;

if (STORYBOOK_APPINSIGHTS_INSTRUMENTATION_KEY) {
const appInsights = new ApplicationInsights({
config: {
connectionString: STORYBOOK_APPINSIGHTS_INSTRUMENTATION_KEY,
disableCookiesUsage: true,
},
});

appInsights.loadAppInsights();

const trackError = (/** @type {string | undefined} */ eventData) => {
appInsights.trackException({ exception: new Error(eventData) });
};

appInsights.trackPageView();

api.on(STORY_CHANGED, eventData => {
appInsights.trackPageView({ name: eventData });
});

api.on(STORY_ERRORED, trackError);
api.on(STORY_MISSING, trackError);
} else {
console.warn(`[application-insights] instrumentation key not found in window or env variable`);
}
}
});
1 change: 1 addition & 0 deletions apps/public-docsite-v9/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"@fluentui/react-search-preview": "*",
"@fluentui/react-motion-preview": "*",
"@griffel/react": "^1.5.14",
"@microsoft/applicationinsights-web": "^3",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-window": "^1.8.6",
Expand Down
5 changes: 3 additions & 2 deletions apps/ssr-tests-v9/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@
"storybook": "start-storybook",
"test": "jest --passWithNoTests",
"type-check": "tsc -b tsconfig.json",
"test-ssr": "test-ssr \"./stories/**/*.stories.tsx\""
"test-ssr": "test-ssr \"./src/stories/**/*.stories.tsx\""
},
"dependencies": {
"@fluentui/react-components": "*"
"@fluentui/react-components": "*",
"@fluentui/react-utilities": "*"
},
"devDependencies": {
"@fluentui/eslint-plugin": "*",
Expand Down
5 changes: 5 additions & 0 deletions apps/ssr-tests-v9/src/stories/Utilitites/index.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export { Default } from './useAnimationFrame.stories';

export default {
title: 'Utilities/useAnimationFrame',
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import * as React from 'react';
import { useAnimationFrame } from '@fluentui/react-utilities';

export const Default = () => {
const [setAnimationFrame, clearAnimationFrame] = useAnimationFrame();
const [visible, setVisible] = React.useState(false);

React.useEffect(() => {
setAnimationFrame(() => setVisible(true));

return () => clearAnimationFrame();
}, [setAnimationFrame]);

return visible ? <div>Test the renderization</div> : null;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "bumps @swc/helpers version to 0.5.1",
"packageName": "@fluentui/babel-preset-global-context",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "bumps @swc/helpers version to 0.5.1",
"packageName": "@fluentui/global-context",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "bumps react peer dependencies to v16.14.0",
"packageName": "@fluentui/global-context",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "bumps @swc/helpers version to 0.5.1",
"packageName": "@fluentui/keyboard-keys",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "bumps @swc/helpers version to 0.5.1",
"packageName": "@fluentui/priority-overflow",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "chore: migrate package to use JSX importSource",
"packageName": "@fluentui/react-accordion",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "bumps @swc/helpers version to 0.5.1",
"packageName": "@fluentui/react-accordion",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "bumps @swc/helpers version to 0.5.1",
"packageName": "@fluentui/react-alert",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "chore: migrate package to use JSX importSource",
"packageName": "@fluentui/react-alert",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "bumps @swc/helpers version to 0.5.1",
"packageName": "@fluentui/react-aria",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "bumps react peer dependencies to v16.14.0",
"packageName": "@fluentui/react-aria",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "bumps @swc/helpers version to 0.5.1",
"packageName": "@fluentui/react-avatar",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "chore: migrate package to use JSX importSource",
"packageName": "@fluentui/react-avatar",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "chore: migrate package to use JSX importSource",
"packageName": "@fluentui/react-badge",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "bumps @swc/helpers version to 0.5.1",
"packageName": "@fluentui/react-badge",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "bumps @swc/helpers version to 0.5.1",
"packageName": "@fluentui/react-breadcrumb-preview",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "chore: migrate package to use JSX importSource",
"packageName": "@fluentui/react-breadcrumb-preview",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "chore: migrate package to use JSX importSource",
"packageName": "@fluentui/react-button",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "bumps @swc/helpers version to 0.5.1",
"packageName": "@fluentui/react-button",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "chore: migrate package to use JSX importSource",
"packageName": "@fluentui/react-card",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "bumps @swc/helpers version to 0.5.1",
"packageName": "@fluentui/react-card",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "chore: migrate package to use JSX importSource",
"packageName": "@fluentui/react-checkbox",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "bumps @swc/helpers version to 0.5.1",
"packageName": "@fluentui/react-checkbox",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "bumps @swc/helpers version to 0.5.1",
"packageName": "@fluentui/react-combobox",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "chore: migrate package to use JSX importSource",
"packageName": "@fluentui/react-combobox",
"email": "bernardo.sunderhus@gmail.com",
"dependentChangeType": "patch"
}
Loading

0 comments on commit 58b1e52

Please sign in to comment.