Closed Bug 1502002 Opened 2 years ago Closed 2 years ago

Simplify the flex item outline and sizing properties components now that 1498273 landed

Categories

(DevTools :: Inspector, enhancement)

enhancement
Not set
normal

Tracking

(firefox65 fixed)

RESOLVED FIXED
Firefox 65
Tracking Status
firefox65 --- fixed

People

(Reporter: pbro, Assigned: pbro)

References

Details

Attachments

(1 file)

Bug 1498273 improves the getAsFlexContainer platform API so that, now, all flex items also come with a clampState that tells us whether the item was clamped to min, clamped to max or unclamped.

We can make use of this extra information to simplify quite a lot the logic in 2 of our components:
FlexItemSizingOutline
FlexItemSizingProperties
A note about backward compatibility is required for this:

The actor changes for the flex item sizing information landed in Firefox 64.
Now, for this bug, we'll need to change them a little bit (basically add the clampState to each FlexItemActor).
So, potentially this is a non-backward compatible change.
We usually deal with those by feature-detecting in the UI of DevTools and falling back to some other code path when necessary.

Now, for this particular change, I don't think this is needed. The reason is that the flex item tool is not riding the trains to release with 64. It's only enabled in nightly and devedition 64 as an early preview to get feedback.
So I don't think we need to support cases where a DevTools UI 65 would connect to a DevTools server 64 and expect the flex item info to work, given that we will only be announcing the tool with 65.

At best, we should make sure it doesn't just explodes.
Pushed by pbrosset@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/aea0e7fadf7d
Start using the getAsFlexContainer API's clampState value to simplify devtools; r=gl
Sorry about that. I fixed these eslint problems locally, and pushed again.
Flags: needinfo?(pbrosset)
Pushed by pbrosset@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c7d1909cd2ae
Start using the getAsFlexContainer API's clampState value to simplify devtools; r=gl
https://hg.mozilla.org/mozilla-central/rev/c7d1909cd2ae
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 65
You need to log in before you can comment on or make changes to this bug.