Skip to content

Commit b371b89

Browse files
committed
Merge branch 'master' into chore/migrate-to-yarn-modern-core
Sync with upstream master: tar CVE bump (flattened resolution -> 7.5.8), web-components rc.23, react-toast 9.8.0, react-overflow/priority-overflow fixes.
2 parents fcfbda8 + 23c05d1 commit b371b89

50 files changed

Lines changed: 1165 additions & 198 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "fix: recompute overflow eagerly when the overflow menu attaches or detaches",
4+
"packageName": "@fluentui/priority-overflow",
5+
"email": "bsunderhus@microsoft.com",
6+
"dependentChangeType": "patch"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "minor",
3+
"comment": "feat: produce a correct overflow snapshot before the first paint",
4+
"packageName": "@fluentui/react-overflow",
5+
"email": "bsunderhus@microsoft.com",
6+
"dependentChangeType": "patch"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "minor",
3+
"comment": "feat: add base hooks/types for headless composition",
4+
"packageName": "@fluentui/react-tag-picker",
5+
"email": "viktorgenaev@microsoft.com",
6+
"dependentChangeType": "patch"
7+
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@
366366
"prismjs": "1.30.0",
367367
"qs": "6.14.2",
368368
"swc-loader": "^0.2.7",
369-
"tar": "7.5.7",
369+
"tar": "7.5.8",
370370
"tar-fs": "2.1.4",
371371
"prettier": "2.8.8",
372372
"puppeteer": "24.42.0",

packages/charts/chart-web-components/CHANGELOG.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,21 @@
11
{
22
"name": "@fluentui/chart-web-components",
33
"entries": [
4+
{
5+
"date": "Wed, 03 Jun 2026 04:07:54 GMT",
6+
"tag": "@fluentui/chart-web-components_v0.0.81",
7+
"version": "0.0.81",
8+
"comments": {
9+
"patch": [
10+
{
11+
"author": "beachball",
12+
"package": "@fluentui/chart-web-components",
13+
"comment": "Bump @fluentui/web-components to v3.0.0-rc.23",
14+
"commit": "f14249d2f042c3c30ce16a60b14d2d912aa2ad80"
15+
}
16+
]
17+
}
18+
},
419
{
520
"date": "Thu, 28 May 2026 04:09:43 GMT",
621
"tag": "@fluentui/chart-web-components_v0.0.80",

packages/charts/chart-web-components/CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
# Change Log - @fluentui/chart-web-components
22

3-
This log was last generated on Thu, 28 May 2026 04:09:43 GMT and should not be manually modified.
3+
This log was last generated on Wed, 03 Jun 2026 04:07:54 GMT and should not be manually modified.
44

55
<!-- Start content -->
66

7+
## [0.0.81](https://github.com/microsoft/fluentui/tree/@fluentui/chart-web-components_v0.0.81)
8+
9+
Wed, 03 Jun 2026 04:07:54 GMT
10+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/chart-web-components_v0.0.80..@fluentui/chart-web-components_v0.0.81)
11+
12+
### Patches
13+
14+
- Bump @fluentui/web-components to v3.0.0-rc.23 ([PR #36232](https://github.com/microsoft/fluentui/pull/36232) by beachball)
15+
716
## [0.0.80](https://github.com/microsoft/fluentui/tree/@fluentui/chart-web-components_v0.0.80)
817

918
Thu, 28 May 2026 04:09:43 GMT

packages/charts/chart-web-components/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@fluentui/chart-web-components",
33
"description": "A library of Fluent Chart Web Components",
4-
"version": "0.0.80",
4+
"version": "0.0.81",
55
"author": {
66
"name": "Microsoft"
77
},
@@ -68,7 +68,7 @@
6868
},
6969
"dependencies": {
7070
"@fluentui/tokens": "^1.0.0-alpha.23",
71-
"@fluentui/web-components": "^3.0.0-rc.22",
71+
"@fluentui/web-components": "^3.0.0-rc.23",
7272
"@microsoft/fast-web-utilities": "^6.0.0",
7373
"@types/d3-selection": "^3.0.0",
7474
"@types/d3-shape": "^3.0.0",

packages/react-components/priority-overflow/etc/priority-overflow.api.md

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,14 @@
55
```ts
66

77
// @internal
8-
export function createOverflowManager(initialOptions?: Partial<ObserveOptions>): OverflowManager;
8+
export function createOverflowManager(initialOptions?: Partial<OverflowOptions>): OverflowManager;
99

1010
// @internal
1111
export const EMPTY_SNAPSHOT: OverflowSnapshot;
1212

13-
// @public
14-
export interface ObserveOptions {
15-
hasHiddenItems?: boolean;
16-
minimumVisible?: number;
17-
onUpdateItemVisibility: OnUpdateItemVisibility;
18-
onUpdateOverflow: OnUpdateOverflow;
19-
overflowAxis?: OverflowAxis;
20-
overflowDirection?: OverflowDirection;
21-
padding?: number;
13+
// @public (undocumented)
14+
export interface ObserveOptions extends Partial<OverflowOptions> {
15+
forceUpdate?: boolean;
2216
}
2317

2418
// @public
@@ -76,11 +70,22 @@ export interface OverflowManager {
7670
removeDivider: (groupId: string) => void;
7771
removeItem: (itemId: string) => void;
7872
removeOverflowMenu: () => void;
79-
setOptions: (options: Partial<ObserveOptions>) => void;
73+
setOptions: (options: Partial<OverflowOptions>) => void;
8074
subscribe: (listener: () => void) => () => void;
8175
update: () => void;
8276
}
8377

78+
// @public
79+
export interface OverflowOptions {
80+
hasHiddenItems?: boolean;
81+
minimumVisible?: number;
82+
onUpdateItemVisibility: OnUpdateItemVisibility;
83+
onUpdateOverflow: OnUpdateOverflow;
84+
overflowAxis?: OverflowAxis;
85+
overflowDirection?: OverflowDirection;
86+
padding?: number;
87+
}
88+
8489
// @public
8590
export interface OverflowSnapshot {
8691
groupVisibility: Record<string, OverflowGroupState>;

packages/react-components/priority-overflow/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ export { createOverflowManager } from './overflowManager';
22
export { EMPTY_SNAPSHOT } from './consts';
33
export type {
44
ObserveOptions,
5+
OverflowOptions,
56
OnUpdateItemVisibility,
67
OnUpdateItemVisibilityPayload,
78
OnUpdateOverflow,

packages/react-components/priority-overflow/src/overflowManager.test.ts

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,25 @@ describe('overflowManager', () => {
136136
});
137137
});
138138

139+
it('should re-dispatch when the overflow menu is attached while observing', () => {
140+
const onUpdateOverflow = jest.fn();
141+
const manager = createOverflowManager(createObserveOptions({ onUpdateOverflow }));
142+
const container = createContainer(100);
143+
const itemA = createElementWithSize('button', 60);
144+
const itemB = createElementWithSize('button', 60);
145+
146+
manager.addItem({ element: itemA, id: 'a', priority: 1 });
147+
manager.addItem({ element: itemB, id: 'b', priority: 0 });
148+
manager.observe(container);
149+
manager.forceUpdate();
150+
onUpdateOverflow.mockClear();
151+
152+
const menu = createElementWithSize('button', 30);
153+
manager.addOverflowMenu(menu);
154+
155+
expect(onUpdateOverflow).toHaveBeenCalled();
156+
});
157+
139158
it('should remove items through removeItem', () => {
140159
const manager = createOverflowManager(createObserveOptions());
141160
const container = createContainer(100);
@@ -156,4 +175,52 @@ describe('overflowManager', () => {
156175
invisibleItemCount: 0,
157176
});
158177
});
178+
179+
it('resolves overflow synchronously when observed with forceUpdate and the container is measured', () => {
180+
const manager = createOverflowManager(createObserveOptions());
181+
const container = createContainer(100);
182+
const itemA = createElementWithSize('button', 60);
183+
const itemB = createElementWithSize('button', 60);
184+
const menu = createElementWithSize('button', 30);
185+
186+
manager.addItem({ element: itemA, id: 'a', priority: 1 });
187+
manager.addItem({ element: itemB, id: 'b', priority: 0 });
188+
manager.addOverflowMenu(menu);
189+
190+
// No manual forceUpdate(); observing with forceUpdate resolves overflow on its own.
191+
manager.observe(container, { forceUpdate: true });
192+
193+
expect(getVisibleIds(manager)).toEqual(['a']);
194+
expect(getInvisibleIds(manager)).toEqual(['b']);
195+
});
196+
197+
it('does not resolve overflow on observe when forceUpdate is not requested', () => {
198+
const manager = createOverflowManager(createObserveOptions());
199+
const container = createContainer(100);
200+
const itemA = createElementWithSize('button', 60);
201+
const itemB = createElementWithSize('button', 60);
202+
203+
manager.addItem({ element: itemA, id: 'a', priority: 1 });
204+
manager.addItem({ element: itemB, id: 'b', priority: 0 });
205+
206+
manager.observe(container);
207+
208+
// Nothing has been computed yet (the ResizeObserver is mocked to a noop).
209+
expect(manager.getSnapshot().itemVisibility).toEqual({});
210+
});
211+
212+
it('does not resolve overflow on observe with forceUpdate when the container is not measured', () => {
213+
const manager = createOverflowManager(createObserveOptions());
214+
const container = createContainer(0);
215+
const itemA = createElementWithSize('button', 60);
216+
const itemB = createElementWithSize('button', 60);
217+
218+
manager.addItem({ element: itemA, id: 'a', priority: 1 });
219+
manager.addItem({ element: itemB, id: 'b', priority: 0 });
220+
221+
// Degenerate 0 size — the guard skips the force so nothing collapses.
222+
manager.observe(container, { forceUpdate: true });
223+
224+
expect(manager.getSnapshot().itemVisibility).toEqual({});
225+
});
159226
});

0 commit comments

Comments
 (0)