mozilla-mobile / firefox-ios

Firefox for iOS
Mozilla Public License 2.0
12.08k stars 2.88k forks source link

Bug - Fix constraints for microsurvey #20783

Open data-sync-user opened 1 week ago

data-sync-user commented 1 week ago

Look into this warning

Unable to simultaneously satisfy constraints.

Probably at least one of the constraints in the following list is one you don't want. 

Try this: 

(1) look at each constraint and try to figure out which you don't expect; 

(2) find the code that added the unwanted constraint or constraints and fix it. 

(

"<NSLayoutConstraint:0x600002153a70 V:|(0)[UIStackView:0x10c786420]   (active, names: '|':_UITableViewHeaderFooterContentView:0x10c78a480 )>",

"<NSLayoutConstraint:0x600002153430 UIStackView:0x10c786420.bottom == _UITableViewHeaderFooterContentView:0x10c78a480.bottom - 20   (active)>",

"<NSLayoutConstraint:0x600002155c20 homeLarge.height == 24   (active, names: homeLarge:0x10c7865d0 )>",

"<NSLayoutConstraint:0x600002178a00 'UISVcanvasconnection' UIStackView:0x10c786420.top == _UILayoutSpacer:0x600003d3cb40'UISValignmentspanner'.top   (active)>",

"<NSLayoutConstraint:0x6000021a3e30 'UISVcanvasconnection' UIStackView:0x10c786420.centerY == homeLarge.centerY   (active, names: homeLarge:0x10c7865d0 )>",

"<NSLayoutConstraint:0x60000217b200 'UISVspanningboundary' _UILayoutSpacer:0x600003d3cb40'UISValignmentspanner'.top <= homeLarge.top   (active, names: homeLarge:0x10c7865d0 )>",

"<NSLayoutConstraint:0x6000021ae800 'UIViewEncapsulatedLayout-Height' _UITableViewHeaderFooterContentView:0x10c78a480.height == 28   (active)>"

)

Will attempt to recover by breaking constraint 

<NSLayoutConstraint:0x600002155c20 homeLarge.height == 24   (active, names: homeLarge:0x10c7865d0 )>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.

The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.

┆Issue is synchronized with this Jira Task

data-sync-user commented 4 days ago

➤ Cyndi Chin commented:

Fixed constraints in v129.