New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add getters for used Unit to HasSize #9824
Conversation
Hi and thanks for the contribution. My opinion about some of the questions:
|
@taefi Thanks for your opinion!
The idea was based on the default implementation of V8 where PIXELS was the default instead of null. Personally I'm not a huge fan of Optional (until java 9) but I used it because it's often used in flow for optional values.
The whole addition was based on the comment of Ben in #8533 (comment) - meaning having a "official" API inside the interface is easier to find for the developer and probably working ;) Additionally, the HasSize interface is probably going to be cleaned up in the future once #5854 is done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry that it has taken a while. Only two clarifications for the javadocs would be required
flow-server/src/main/java/com/vaadin/flow/component/HasSize.java
Outdated
Show resolved
Hide resolved
flow-server/src/main/java/com/vaadin/flow/component/HasSize.java
Outdated
Show resolved
Hide resolved
Sigh, test failure should not be related in any way, restarted the build. |
It is now as the manual cherry-pick PRs will be merged before this, then the bot will backport this too. But @knoobie can you please rebase this on top of the |
@pleku thanks! Rebased and waiting for the build process to do it's job :) Edit: Looks like the build process doesn't wanna do it's job today "Caused by: java.lang.AssertionError: startup time expected <= 15000 but was 60409" |
Unit |
@fluorumlabs Thanks! Found a reason to trigger a build restart :) |
Related to #8533 (comment) Co-authored-by: Knoobie <Knoobie@gmx.de>
Related to #8533 (comment) Co-authored-by: Knoobie <Knoobie@gmx.de>
Improves the addition to
HasSize
forUnit
.getWidthUnit
andgetHeightUnit
for better discoverabilityUnit
getSize
as well?vw
,vh
,vmin
andvmax