@fluentui/priority-overflow
Advanced tools
Comparing version 0.0.0-nightly-20230109-0423.1 to 0.0.0-nightly-20230110-0424.1
@@ -5,5 +5,5 @@ { | ||
{ | ||
"date": "Mon, 09 Jan 2023 04:29:56 GMT", | ||
"tag": "@fluentui/priority-overflow_v0.0.0-nightly-20230109-0423.1", | ||
"version": "0.0.0-nightly-20230109-0423.1", | ||
"date": "Tue, 10 Jan 2023 04:30:46 GMT", | ||
"tag": "@fluentui/priority-overflow_v0.0.0-nightly-20230110-0424.1", | ||
"version": "0.0.0-nightly-20230110-0424.1", | ||
"comments": { | ||
@@ -21,2 +21,17 @@ "prerelease": [ | ||
{ | ||
"date": "Mon, 09 Jan 2023 14:34:54 GMT", | ||
"tag": "@fluentui/priority-overflow_v9.0.0-rc.2", | ||
"version": "9.0.0-rc.2", | ||
"comments": { | ||
"prerelease": [ | ||
{ | ||
"author": "lingfangao@hotmail.com", | ||
"package": "@fluentui/priority-overflow", | ||
"commit": "2611ae5441e4bc702c4ce6404c7186f6c2de7cc3", | ||
"comment": "fix: Minimum visible overflow items should be respected" | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"date": "Wed, 04 Jan 2023 01:40:47 GMT", | ||
@@ -23,0 +38,0 @@ "tag": "@fluentui/priority-overflow_v9.0.0-rc.1", |
# Change Log - @fluentui/priority-overflow | ||
This log was last generated on Mon, 09 Jan 2023 04:29:56 GMT and should not be manually modified. | ||
This log was last generated on Tue, 10 Jan 2023 04:30:46 GMT and should not be manually modified. | ||
<!-- Start content --> | ||
## [0.0.0-nightly-20230109-0423.1](https://github.com/microsoft/fluentui/tree/@fluentui/priority-overflow_v0.0.0-nightly-20230109-0423.1) | ||
## [0.0.0-nightly-20230110-0424.1](https://github.com/microsoft/fluentui/tree/@fluentui/priority-overflow_v0.0.0-nightly-20230110-0424.1) | ||
Mon, 09 Jan 2023 04:29:56 GMT | ||
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/priority-overflow_v9.0.0-rc.1..@fluentui/priority-overflow_v0.0.0-nightly-20230109-0423.1) | ||
Tue, 10 Jan 2023 04:30:46 GMT | ||
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/priority-overflow_v9.0.0-rc.2..@fluentui/priority-overflow_v0.0.0-nightly-20230110-0424.1) | ||
@@ -16,2 +16,11 @@ ### Changes | ||
## [9.0.0-rc.2](https://github.com/microsoft/fluentui/tree/@fluentui/priority-overflow_v9.0.0-rc.2) | ||
Mon, 09 Jan 2023 14:34:54 GMT | ||
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/priority-overflow_v9.0.0-rc.1..@fluentui/priority-overflow_v9.0.0-rc.2) | ||
### Changes | ||
- fix: Minimum visible overflow items should be respected ([PR #26194](https://github.com/microsoft/fluentui/pull/26194) by lingfangao@hotmail.com) | ||
## [9.0.0-rc.1](https://github.com/microsoft/fluentui/tree/@fluentui/priority-overflow_v9.0.0-rc.1) | ||
@@ -18,0 +27,0 @@ |
@@ -125,9 +125,9 @@ "use strict"; | ||
}, 0); | ||
// Add items until available width is filled | ||
// Add items until available width is filled - can result in overflow | ||
while (currentWidth < availableSize && invisibleItemQueue.size() > 0) { | ||
currentWidth += makeItemVisible(); | ||
} | ||
// Remove items until there's no more overlap | ||
// Remove items until there's no more overflow | ||
while (currentWidth > availableSize && visibleItemQueue.size() > 0) { | ||
if (visibleItemQueue.size() === options.minimumVisible) { | ||
if (visibleItemQueue.size() <= options.minimumVisible) { | ||
break; | ||
@@ -137,3 +137,4 @@ } | ||
} | ||
if (invisibleItemQueue.size() > 0 && currentWidth + overflowMenuOffset > availableSize) { | ||
// make sure the overflow menu can fit | ||
if (visibleItemQueue.size() > options.minimumVisible && invisibleItemQueue.size() > 0 && currentWidth + overflowMenuOffset > availableSize) { | ||
makeItemInvisible(); | ||
@@ -140,0 +141,0 @@ } |
@@ -119,9 +119,9 @@ import { debounce } from './debounce'; | ||
}, 0); | ||
// Add items until available width is filled | ||
// Add items until available width is filled - can result in overflow | ||
while (currentWidth < availableSize && invisibleItemQueue.size() > 0) { | ||
currentWidth += makeItemVisible(); | ||
} | ||
// Remove items until there's no more overlap | ||
// Remove items until there's no more overflow | ||
while (currentWidth > availableSize && visibleItemQueue.size() > 0) { | ||
if (visibleItemQueue.size() === options.minimumVisible) { | ||
if (visibleItemQueue.size() <= options.minimumVisible) { | ||
break; | ||
@@ -131,3 +131,4 @@ } | ||
} | ||
if (invisibleItemQueue.size() > 0 && currentWidth + overflowMenuOffset > availableSize) { | ||
// make sure the overflow menu can fit | ||
if (visibleItemQueue.size() > options.minimumVisible && invisibleItemQueue.size() > 0 && currentWidth + overflowMenuOffset > availableSize) { | ||
makeItemInvisible(); | ||
@@ -134,0 +135,0 @@ } |
{ | ||
"name": "@fluentui/priority-overflow", | ||
"version": "0.0.0-nightly-20230109-0423.1", | ||
"version": "0.0.0-nightly-20230110-0424.1", | ||
"description": "Vanilla JS utilities to implement overflow menus", | ||
@@ -5,0 +5,0 @@ "main": "lib-commonjs/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
84654
979