-
Notifications
You must be signed in to change notification settings - Fork 659
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
[resize-observer] Make all returned properties have the word box in them #3549
Comments
This is created to track the change for updating the names to be consistent |
I prefer to report size to box. Box is often synonymous to rectangle, and rectangles have location + size by convention. We are only reporting width/height, therefore size is preferable for reporting. Why are we using box instead of size in ResizeObserver::observe? There was only a weak preference for 'box' over 'size', this was an open issue in the spec for a while. Box stands for CSS box model. Size was already part of ResizeObserver name, so it felt redundant. |
I agree with @atotic taking into account the current information we're returning, that said we mentioned many times regarding rect based information that it's "easy to add" it in. Do we want to leave it open to potentially support offsets or scope to what is today, because if we add in the offsets having size will be confusing as well. |
Based on the new shape, As this is still an open issue, could this still change? |
@TremayneChrist based on the opinions of people, if we say Box that implies that you should be able to produce the rect when taking into account the context of other APIs such as What are your thoughts, which name would you want? |
@gregwhitworth now that the API adds support for future fragments and no longer returns a basic size object, there's potential to bring in consistency with the naming and reduce the confusion. For me, it feels more natural to watch |
It's tough to balance clarity, convenience and consistency in the platform APIs. As @atotic said though, |
@bkardell It could thearetically but then we would need to observe those as well. Personally, I think the name being "Resize" implies that you're watching and receiving sizes. I personally tend to agree with @TremayneChrist as well as I asked for
Thoughts? |
@gregwhitworth I think I like that... Each of those objects would have a |
To be very clear it would be:
|
If we can observe
border-box
,content-box
,scroll-box
anddevice-pixel-border-box
, shouldn't all property names also include box in the name?Originally posted by @TremayneChrist in #3329 (comment)
The text was updated successfully, but these errors were encountered: