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
fix(demo): remove no-op max-width on upload crop dialog - #46
The upload demo called dialog.setMaxWidth(dialog.getHeight()), but the dialog's height is never set, so getHeight() returns null and the call has no effect. The overlay already defaults to max-width: 100%, so the line is removed.
Corrected crop dialog sizing so its maximum width is no longer tied to its current height. This allows the dialog’s width to be determined independently of its height.
This removes a no-op line from the upload crop demo. It should not change how the demo behaves, and nothing in the change affects the library itself. The merge risk is minimal.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title names the change: removing a no-op max-width call from the upload crop dialog in the demo. The raw summary confirms the only change is removing dialog.setMaxWidth(dialog.getHeight()) in Uplo…
Linked Issues check
Issue #44 is the only active directly linked issue. Its expected behavior allows either setting a real max-width or removing the line. The PR removes dialog.setMaxWidth(dialog.getHeight()) from `Upl…
Out of Scope Changes check
The only change in the whole-PR diff (mergeBase 73551f5 to head 8c18576) is the removal of one line in src/test/java/com/flowingcode/vaadin/addons/imagecrop/UploadImageCropDemo.java. This line is th…
Full details: Title check
Explanation
The title names the change: removing a no-op max-width call from the upload crop dialog in the demo. The raw summary confirms the only change is removing dialog.setMaxWidth(dialog.getHeight()) in UploadImageCropDemo.openCropDialog. The objectives say getHeight() returns null because the height is unset, so the call has no effect, and the overlay keeps its default max-width of 100%. The title matches the main change and is specific enough for a reviewer scanning history.
Full details: Linked Issues check
Explanation
Issue #44 is the only active directly linked issue. Its expected behavior allows either setting a real max-width or removing the line. The PR removes dialog.setMaxWidth(dialog.getHeight()) from UploadImageCropDemo.openCropDialog, as shown in the whole-PR summary (+0/-1). The call no longer runs with a null argument, so the ineffective behavior is removed. The issue requires no automated test, and the PR adds none. The issue's claim that the overlay keeps its default max-width: 100% was not verified by building or running tests in this review. That claim does not change the outcome, because the issue accepts removal as a valid fix.
Full details: Out of Scope Changes check
Explanation
The only change in the whole-PR diff (mergeBase 73551f5 to head 8c18576) is the removal of one line in src/test/java/com/flowingcode/vaadin/addons/imagecrop/UploadImageCropDemo.java. This line is the exact line named in #44. No unrelated files or declarations changed. The raw summary reports no changes to exported or public declarations.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
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.
The upload demo called
dialog.setMaxWidth(dialog.getHeight()), but the dialog's height is never set, sogetHeight()returnsnulland the call has no effect. The overlay already defaults tomax-width: 100%, so the line is removed.Close #44
Summary by CodeRabbit