Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕵🏾‍♀️ visual changes to review in the Visual Change Report

vr-tests-react-components/CalendarCompat 4 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/CalendarCompat.multiDayView - High Contrast.default.chromium.png 1229 Changed
vr-tests-react-components/CalendarCompat.multiDayView.default.chromium_1.png 404 Changed
vr-tests-react-components/CalendarCompat.multiDayView - Dark Mode.default.chromium.png 1108 Changed
vr-tests-react-components/CalendarCompat.multiDayView - RTL.default.chromium.png 495 Changed
vr-tests-react-components/Positioning 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Positioning.Positioning end.chromium.png 510 Changed
vr-tests-react-components/Positioning.Positioning end.updated 2 times.chromium.png 74 Changed
vr-tests-react-components/TagPicker 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/TagPicker.disabled - High Contrast.disabled input hover.chromium.png 1319 Changed

There were 2 duplicate changes discarded. Check the build logs for more information.

"type": "patch",
"comment": "refactor: reduce bundle size by removing the getIntrinsicElementProps helper",
"packageName": "@fluentui/react-divider",
"email": "dmytrokirpa@microsoft.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ exports[`Divider renders a divider with a different color 1`] = `
<div
aria-orientation="horizontal"
class="fui-Divider"
color="#FF00FF"
role="separator"
/>
`;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as React from 'react';
import { getIntrinsicElementProps, useId, slot } from '@fluentui/react-utilities';
import { useId, slot } from '@fluentui/react-utilities';
import type { DividerProps, DividerState } from './Divider.types';

/**
Expand All @@ -8,7 +8,7 @@ import type { DividerProps, DividerState } from './Divider.types';
* @param ref - User-provided ref to be passed to the Divider component.
*/
export const useDivider_unstable = (props: DividerProps, ref: React.Ref<HTMLElement>): DividerState => {
const { alignContent = 'center', appearance = 'default', inset = false, vertical = false, wrapper } = props;
const { alignContent = 'center', appearance = 'default', inset = false, vertical = false, wrapper, ...rest } = props;
const dividerId = useId('divider-');

return {
Expand All @@ -25,16 +25,16 @@ export const useDivider_unstable = (props: DividerProps, ref: React.Ref<HTMLElem
},

root: slot.always(
getIntrinsicElementProps('div', {
{
role: 'separator',
'aria-orientation': vertical ? 'vertical' : 'horizontal',
'aria-labelledby': props.children ? dividerId : undefined,
...props,
...rest,
// FIXME:
// `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`
// but since it would be a breaking change to fix it, we are casting ref to it's proper type
ref: ref as React.Ref<HTMLDivElement>,
} as const),
} as React.HTMLAttributes<HTMLDivElement>,
{ elementType: 'div' },
),
wrapper: slot.always(wrapper, {
Expand Down