Snap cropping when close to nothing (BL-13952)#6724
Snap cropping when close to nothing (BL-13952)#6724andrew-polk merged 1 commit intoBloomBooks:Version6.1from
Conversation
andrew-polk
left a comment
There was a problem hiding this comment.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @JohnThomson)
src/BloomBrowserUI/bookEdit/js/bubbleManager.ts line 1601 at r1 (raw file):
break; case "e": // LHS is where the right of the image is. RHS is where the right of the overlay is.
Sorry; I don't understand these comments.
I don't see LHS or RHS except in these comments, but it seems like the comment is supposed to be telling me what they mean.
I wonder if it is worth extracting this logic to a function called shouldCropSnapBeDisabled and giving it a comment explaining, generally, why we want it disabled vs enabled.
But on second thought, maybe that implies too much (namely that you've encapsulated all such logic in one place) since you have lots more logic below about when it should be disabled/enabled.
JohnThomson
left a comment
There was a problem hiding this comment.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @andrew-polk)
src/BloomBrowserUI/bookEdit/js/bubbleManager.ts line 1601 at r1 (raw file):
Previously, andrew-polk wrote…
Sorry; I don't understand these comments.
I don't see LHS or RHS except in these comments, but it seems like the comment is supposed to be telling me what they mean.I wonder if it is worth extracting this logic to a function called
shouldCropSnapBeDisabledand giving it a comment explaining, generally, why we want it disabled vs enabled.
But on second thought, maybe that implies too much (namely that you've encapsulated all such logic in one place) since you have lots more logic below about when it should be disabled/enabled.
I think when I wrote that I was comparing a left-hand-side expression with a right-hand-side. Then Math.abs got involved, and then prettier, and now it's not two sides but five or six lines. I reworded and added some more comments.
I don't think the nature of what John asked for lends itself to handling crop snapping all in one place.
0776e8d to
5d871d1
Compare
andrew-polk
left a comment
There was a problem hiding this comment.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @JohnThomson)
This change is