Skip to content

Commit

Permalink
Merge branch 'master' into feat/drawer-motion
Browse files Browse the repository at this point in the history
* master: (27 commits)
  feat: Add documentKeyboardEvent to OnVisibleChangeData when Tooltip is hidden via Escape (microsoft#28951)
  RFC: Component CSS Transitions/Animations on mount/unmount (microsoft#27328)
  8.0 Azure Theme: Details list row focus contrast a11y bug fix  (microsoft#28966)
  chore: update CODEOWNERS to some components to tag the current owner (microsoft#28949)
  fix(react-popover): Only apply modal attributes if the PopoverSurface traps focus (microsoft#28613)
  feat(react-table, react-components): export DataGridContextProvider (microsoft#28955)
  chore: decrease bundle size & adds fixtures (microsoft#28962)
  feat(react-utilities): create useAnimationFrame hook (microsoft#28948)
  fix(react-utilities): `useOnClickOutside` should consider text selection from inside to outside as inside click (microsoft#28765)
  docs(react-accordion): Added subcomponents to index story (microsoft#28956)
  applying package updates
  bugfix: ensure interop between assertSlots and old API (microsoft#28957)
  chore: rename imports from react-tree to react-components (microsoft#28946)
  applying package updates
  fix: Autofill queries the inputElement ownerDocument instead of document (microsoft#27312)
  Accordion : updated styles for accordion header cursor (microsoft#28850)
  Additional VR tests Charting Library (microsoft#28777)
  feat(react-motion): create react-motion-preview package scaffolding (microsoft#28947)
  chore: updates generator to use new slot API (microsoft#28916)
  chore: bumps version of esbuild-loader to v3.2.0 (microsoft#28878)
  ...
  • Loading branch information
marcosmoura committed Aug 23, 2023
2 parents 32d4144 + 45b2bea commit e869087
Show file tree
Hide file tree
Showing 336 changed files with 8,236 additions and 1,081 deletions.
7 changes: 4 additions & 3 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ packages/react-components/react-accordion @microsoft/cxe-coastal
packages/react-components/react-avatar @microsoft/cxe-red @behowell @khmakoto @sopranopillow
packages/react-components/react-badge @microsoft/cxe-red @behowell
packages/react-components/react-button @microsoft/cxe-red @khmakoto
packages/react-components/react-card @microsoft/cxe-prg
packages/react-components/react-card @microsoft/cxe-prg @marcosmoura
packages/react-components/react-checkbox @microsoft/cxe-red @khmakoto
packages/react-components/react-combobox @microsoft/cxe-coastal @smhigley
packages/react-components/react-components @microsoft/fluentui-react
Expand All @@ -208,7 +208,7 @@ packages/react-components/react-spinbutton @microsoft/cxe-red @spmonahan
packages/react-components/react-spinner @microsoft/cxe-red @tomi-msft
packages/react-components/react-switch @microsoft/cxe-red @behowell @khmakoto
packages/react-components/react-tabs @microsoft/cxe-coastal @geoffcoxmsft
packages/react-components/react-text @microsoft/cxe-prg
packages/react-components/react-text @microsoft/cxe-prg @marcosmoura
packages/react-components/react-textarea @microsoft/cxe-red @sopranopillow
packages/react-components/react-tooltip @microsoft/cxe-red @behowell @khmakoto
packages/react-components/react-toolbar @microsoft/teams-prg @chpalac @ling1726
Expand All @@ -232,7 +232,7 @@ packages/react-components/react-migration-v0-v9 @microsoft/teams-prg
packages/react-components/react-datepicker-compat @microsoft/cxe-red @sopranopillow @khmakoto
packages/react-components/react-migration-v8-v9 @microsoft/cxe-red @microsoft/cxe-coastal @geoffcoxmsft
packages/react-components/react-breadcrumb-preview @microsoft/cxe-prg
packages/react-components/react-drawer @microsoft/cxe-prg @marcosmoura
packages/react-components/react-drawer @microsoft/cxe-prg @marcosmoura
packages/react-components/react-storybook-addon-codesandbox @microsoft/fluentui-react-build
packages/react-components/babel-preset-storybook-full-source @microsoft/fluentui-react-build
packages/react-components/react-jsx-runtime @microsoft/teams-prg
Expand All @@ -241,6 +241,7 @@ packages/react-components/react-search-preview @microsoft/cxe-coastal
packages/react-components/react-colorpicker-compat @microsoft/cxe-red @sopranopillow
packages/react-components/react-motion-preview @microsoft/cxe-prg @marcosmoura
packages/react-components/react-nav-preview @microsoft/cxe-red @mltejera
packages/react-components/react-motion-preview @microsoft/cxe-prg @marcosmoura
# <%= NX-CODEOWNER-PLACEHOLDER %>

## Components
Expand Down
3 changes: 3 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ export const parameters = {
'react-dom': '^17',
// necessary when using typescript in CodeSandbox
'react-scripts': 'latest',
// 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Meta } from '@storybook/addon-docs';

# TextField to Input Migration

Fluent UI v8 provides the `TextField` control for entering and editing text. In Fluent UI v9 `TextField` is replaced with `Input`.
Fluent UI v8 provides the `TextField` control for entering and editing text. In Fluent UI v9 `TextField` is replaced with `Input` for single line input. For multiline input, use `Textarea`.

While basic usage is largely the same, `Input` omits some features found in `TextField`, preferring to compose several components together for greater flexibility.

Expand Down
25 changes: 25 additions & 0 deletions apps/vr-tests-react-components/src/stories/Menu/Menu.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,31 @@ storiesOf('Menu Converged - secondary content', module)
{ includeRtl: true },
);

storiesOf('Menu Converged - long content', module)
.addDecorator(story => <StoryWright>{story()}</StoryWright>)
.addStory(
'default',
() => (
<Menu open>
<MenuTrigger>
<button>Toggle menu</button>
</MenuTrigger>

<MenuPopover>
<MenuList>
<MenuItem icon={<CutRegular />}>Cut</MenuItem>
<MenuDivider />
<MenuItem icon={<ClipboardPasteRegular />} secondaryContent="Ctrl+P">
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua. Nisl pretium fusce id velit ut tortor.
</MenuItem>
</MenuList>
</MenuPopover>
</Menu>
),
{ includeRtl: true },
);

storiesOf('Menu Converged - groups', module)
.addDecorator(story => <StoryWright>{story()}</StoryWright>)
.addStory(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ const steps = new Steps()
.snapshot('hover content', { cropTo: '.testWrapper' })
.mouseDown(`#${contentId}`)
.snapshot('pressed content', { cropTo: '.testWrapper' })
.mouseUp(`#${contentId}`)
.hover(`#${dismissButtonId}`)
.snapshot('hover dismiss', { cropTo: '.testWrapper' })
.mouseDown(`#${dismissButtonId}`)
.snapshot('pressed dismiss', { cropTo: '.testWrapper' })
.mouseUp(`#${dismissButtonId}`)
.end();

export default {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@ storiesOf('react-charting/AreaChart', module)
width={700}
data={chartData}
legendsOverflowText={'Overflow Items'}
// yAxisTickFormat={d3.format('$,')}
enablePerfOptimization={true}
legendProps={{
allowFocusOnLegends: true,
Expand Down
87 changes: 87 additions & 0 deletions apps/vr-tests/src/stories/react-charting/DonutChart.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
import * as React from 'react';
import { storiesOf } from '@storybook/react';
import { TestWrapperDecorator } from '../../utilities/TestWrapperDecorator';
import { Steps, StoryWright } from 'storywright';
import { IChartProps, IChartDataPoint, DonutChart } from '@fluentui/react-charting';

storiesOf('react-charting/DonutChart', module)
.addDecorator((story, context) => TestWrapperDecorator(story, context))
.addDecorator((story, context) => {
const steps = new Steps().snapshot('default', { cropTo: '.testWrapper' }).end();
return <StoryWright steps={steps}>{story()}</StoryWright>;
})
.addStory(
'Basic',
() => {
const points: IChartDataPoint[] = [
{ legend: 'first', data: 20000, color: '#DADADA', xAxisCalloutData: '2020/04/30' },
{ legend: 'second', data: 39000, color: '#0078D4', xAxisCalloutData: '2020/04/20' },
];

const data: IChartProps = {
chartTitle: 'Donut chart basic example',
chartData: points,
};
return (
<div style={{ padding: 10 }}>
<DonutChart
culture={window.navigator.language}
data={data}
innerRadius={55}
href={'https://developer.microsoft.com/en-us/'}
legendsOverflowText={'overflow Items'}
hideLegend={false}
height={220}
width={176}
valueInsideDonut={39000}
/>
</div>
);
},
{ includeDarkMode: true, includeRtl: true },
)
.addStory(
'Dynamic',
() => {
const data: IChartProps = {
chartTitle: 'Donut chart dynamic example',
chartData: [
{
legend: 'first',
data: Math.floor(120),
color: '#00bcf2',
},
{
legend: 'second',
data: Math.floor(130),
color: '#b4a0ff',
},
{
legend: 'third',
data: Math.floor(10),
color: '#fff100',
},
{
legend: 'fourth',
data: Math.floor(270),
color: '#605e5c',
},
],
};

return (
<div style={{ padding: 10 }}>
<DonutChart
data={data}
innerRadius={35}
legendProps={{
allowFocusOnLegends: true,
}}
hideLabels={false}
showLabelsInPercent={false}
/>
</div>
);
},
{ includeDarkMode: true, includeRtl: true },
);
59 changes: 59 additions & 0 deletions apps/vr-tests/src/stories/react-charting/GaugeChart.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import * as React from 'react';
import { storiesOf } from '@storybook/react';
import { TestWrapperDecorator } from '../../utilities/TestWrapperDecorator';
import { Steps, StoryWright } from 'storywright';
import { DataVizPalette, GaugeChart, GaugeValueFormat } from '@fluentui/react-charting';

storiesOf('react-charting/GaugeChart', module)
.addDecorator((story, context) => TestWrapperDecorator(story, context))
.addDecorator((story, context) => {
const steps = new Steps().snapshot('default', { cropTo: '.testWrapper' }).end();
return <StoryWright steps={steps}>{story()}</StoryWright>;
})
.addStory(
'Basic',
() => {
return (
<div style={{ padding: '10px' }}>
<GaugeChart
width={252}
height={128}
segments={[
{ size: 33, color: DataVizPalette.success, legend: 'Low Risk' },
{ size: 34, color: DataVizPalette.warning, legend: 'Medium Risk' },
{ size: 33, color: DataVizPalette.error, legend: 'High Risk' },
]}
chartValue={50}
hideMinMax={false}
/>
</div>
);
},
{ includeDarkMode: true, includeRtl: true },
)
.addStory(
'Variant',
() => {
return (
<>
<GaugeChart
width={252}
height={173}
segments={[
{ size: 50, legend: 'Used' },
{
size: 100 - 50,
color: DataVizPalette.disabled,
legend: 'Available',
},
]}
chartValue={50}
chartTitle="Storage capacity"
sublabel="used"
chartValueFormat={GaugeValueFormat.Fraction}
/>
</>
);
},
{ includeDarkMode: true, includeRtl: true },
);
Loading

0 comments on commit e869087

Please sign in to comment.