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

RESOLVED FIXED in Firefox 65

Status

enhancement
RESOLVED FIXED
6 months ago
6 months ago

People

(Reporter: pbro, Assigned: pbro)

Tracking

unspecified
Firefox 65
Dependency tree / graph

Firefox Tracking Flags

(firefox65 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 months ago
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
(Assignee)

Comment 1

6 months ago
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.

Comment 3

6 months ago
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
(Assignee)

Comment 5

6 months ago
Sorry about that. I fixed these eslint problems locally, and pushed again.
Flags: needinfo?(pbrosset)

Comment 6

6 months ago
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

Comment 7

6 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/c7d1909cd2ae
Status: ASSIGNED → RESOLVED
Last Resolved: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 65
You need to log in before you can comment on or make changes to this bug.