You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor: extract method for updating overflow - #3826
The original issue contains an edge case where container.offsetWidth is 39 and container.scrollWidth is 40: this only happens with certain customizations, see vaadin/flow-components#2810 (comment). I'm not sure if we should test that.
However, it still makes sense to make this logic more clear by ensuring _hasOverflow is only set to true when the count of the items in the overflow sub-menu is greater than 0. This PR makes it explicit by adding another private method.
Hi @web-padawan , this commit cannot be picked to 23.0 by this bot, can you take a look and pick it manually?
Error Message: Error: Command failed: git cherry-pick f36d549
error: could not apply f36d549... refactor: extract method for updating overflow (#3826)
hint: After resolving the conflicts, mark them with
hint: "git add/rm ", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
Hi @web-padawan , this commit cannot be picked to 22.0 by this bot, can you take a look and pick it manually?
Error Message: Error: Command failed: git cherry-pick f36d549
error: could not apply f36d549... refactor: extract method for updating overflow (#3826)
hint: After resolving the conflicts, mark them with
hint: "git add/rm ", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The original issue contains an edge case where
container.offsetWidthis39andcontainer.scrollWidthis40: this only happens with certain customizations, see vaadin/flow-components#2810 (comment). I'm not sure if we should test that.However, it still makes sense to make this logic more clear by ensuring
_hasOverflowis only set totruewhen the count of the items in the overflow sub-menu is greater than0. This PR makes it explicit by adding another private method.Fixes vaadin/flow-components#2810
Type of change