From ff5c8c0c6a446ad05a331af016a0a409445b7ad6 Mon Sep 17 00:00:00 2001 From: "Nandi, Dhamodaram" Date: Mon, 15 Feb 2021 05:21:45 -0500 Subject: [PATCH 1/7] Fix for CXTDT-155147 --- .../ListRightVariableRightCaretAlltextAndLinks.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MVMCoreUI/Atomic/Molecules/DesignedComponents/List/RightVariable/ListRightVariableRightCaretAlltextAndLinks.swift b/MVMCoreUI/Atomic/Molecules/DesignedComponents/List/RightVariable/ListRightVariableRightCaretAlltextAndLinks.swift index 3b6a5b76..d7954f96 100644 --- a/MVMCoreUI/Atomic/Molecules/DesignedComponents/List/RightVariable/ListRightVariableRightCaretAlltextAndLinks.swift +++ b/MVMCoreUI/Atomic/Molecules/DesignedComponents/List/RightVariable/ListRightVariableRightCaretAlltextAndLinks.swift @@ -22,7 +22,7 @@ public override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { // Fill for left vertical alignment because bottom constraint was breaking with leading. CXTDT-145456 - stack = Stack.createStack(with: [(view: eyebrowHeadlineBodyLink, model: StackItemModel(horizontalAlignment: .leading, verticalAlignment: .fill)), (view: rightLabel, model: StackItemModel(horizontalAlignment:.fill, verticalAlignment: .leading))], axis: .horizontal) + stack = Stack.createStack(with: [(view: eyebrowHeadlineBodyLink, model: StackItemModel(horizontalAlignment: .leading, verticalAlignment: .top)), (view: rightLabel, model: StackItemModel(horizontalAlignment: .trailing, verticalAlignment: .top))], axis: .horizontal) super.init(style: style, reuseIdentifier: reuseIdentifier) } @@ -37,6 +37,7 @@ open override func setupView() { super.setupView() rightLabel.setContentCompressionResistancePriority(UILayoutPriority(rawValue: 900), for: .horizontal) + rightLabel.setContentHuggingPriority(UILayoutPriority(rawValue: 900), for: .horizontal) addMolecule(stack) stack.restack() } From 069db3c913188f44092933e7883894038bea2cf7 Mon Sep 17 00:00:00 2001 From: "Nandi, Dhamodaram" Date: Mon, 15 Feb 2021 05:31:14 -0500 Subject: [PATCH 2/7] discarded vertical alignment changes --- .../ListRightVariableRightCaretAlltextAndLinks.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MVMCoreUI/Atomic/Molecules/DesignedComponents/List/RightVariable/ListRightVariableRightCaretAlltextAndLinks.swift b/MVMCoreUI/Atomic/Molecules/DesignedComponents/List/RightVariable/ListRightVariableRightCaretAlltextAndLinks.swift index d7954f96..943a11da 100644 --- a/MVMCoreUI/Atomic/Molecules/DesignedComponents/List/RightVariable/ListRightVariableRightCaretAlltextAndLinks.swift +++ b/MVMCoreUI/Atomic/Molecules/DesignedComponents/List/RightVariable/ListRightVariableRightCaretAlltextAndLinks.swift @@ -22,7 +22,7 @@ public override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { // Fill for left vertical alignment because bottom constraint was breaking with leading. CXTDT-145456 - stack = Stack.createStack(with: [(view: eyebrowHeadlineBodyLink, model: StackItemModel(horizontalAlignment: .leading, verticalAlignment: .top)), (view: rightLabel, model: StackItemModel(horizontalAlignment: .trailing, verticalAlignment: .top))], axis: .horizontal) + stack = Stack.createStack(with: [(view: eyebrowHeadlineBodyLink, model: StackItemModel(horizontalAlignment: .leading, verticalAlignment: .fill)), (view: rightLabel, model: StackItemModel(horizontalAlignment: .trailing, verticalAlignment: .top))], axis: .horizontal) super.init(style: style, reuseIdentifier: reuseIdentifier) } From e91faf857fc98521cfb110d3a1cbb0c1c2e8d798 Mon Sep 17 00:00:00 2001 From: "Nandi, Dhamodaram" Date: Mon, 15 Feb 2021 09:43:43 -0500 Subject: [PATCH 3/7] updated --- .../ListRightVariableRightCaretAlltextAndLinks.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MVMCoreUI/Atomic/Molecules/DesignedComponents/List/RightVariable/ListRightVariableRightCaretAlltextAndLinks.swift b/MVMCoreUI/Atomic/Molecules/DesignedComponents/List/RightVariable/ListRightVariableRightCaretAlltextAndLinks.swift index 943a11da..12f11b9e 100644 --- a/MVMCoreUI/Atomic/Molecules/DesignedComponents/List/RightVariable/ListRightVariableRightCaretAlltextAndLinks.swift +++ b/MVMCoreUI/Atomic/Molecules/DesignedComponents/List/RightVariable/ListRightVariableRightCaretAlltextAndLinks.swift @@ -22,7 +22,7 @@ public override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { // Fill for left vertical alignment because bottom constraint was breaking with leading. CXTDT-145456 - stack = Stack.createStack(with: [(view: eyebrowHeadlineBodyLink, model: StackItemModel(horizontalAlignment: .leading, verticalAlignment: .fill)), (view: rightLabel, model: StackItemModel(horizontalAlignment: .trailing, verticalAlignment: .top))], axis: .horizontal) + stack = Stack.createStack(with: [(view: eyebrowHeadlineBodyLink, model: StackItemModel(horizontalAlignment: .leading, verticalAlignment: .fill)), (view: rightLabel, model: StackItemModel(horizontalAlignment: .trailing, verticalAlignment: .leading))], axis: .horizontal) super.init(style: style, reuseIdentifier: reuseIdentifier) } From a1b7e81dfc7805bfb5a68e1996799c8a11860606 Mon Sep 17 00:00:00 2001 From: Lekshmi S Date: Tue, 16 Feb 2021 07:24:36 +0530 Subject: [PATCH 4/7] Added number of lines for rightlabel. --- .../ListRightVariableRightCaretAlltextAndLinks.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/MVMCoreUI/Atomic/Molecules/DesignedComponents/List/RightVariable/ListRightVariableRightCaretAlltextAndLinks.swift b/MVMCoreUI/Atomic/Molecules/DesignedComponents/List/RightVariable/ListRightVariableRightCaretAlltextAndLinks.swift index 12f11b9e..3a342b6a 100644 --- a/MVMCoreUI/Atomic/Molecules/DesignedComponents/List/RightVariable/ListRightVariableRightCaretAlltextAndLinks.swift +++ b/MVMCoreUI/Atomic/Molecules/DesignedComponents/List/RightVariable/ListRightVariableRightCaretAlltextAndLinks.swift @@ -38,6 +38,7 @@ super.setupView() rightLabel.setContentCompressionResistancePriority(UILayoutPriority(rawValue: 900), for: .horizontal) rightLabel.setContentHuggingPriority(UILayoutPriority(rawValue: 900), for: .horizontal) + rightLabel.numberOfLines = 1 addMolecule(stack) stack.restack() } From d0326a9b3031744dd355442d7f23f9e9230a89bd Mon Sep 17 00:00:00 2001 From: "Khan, Arshad" Date: Wed, 17 Feb 2021 17:57:19 +0530 Subject: [PATCH 5/7] infinite loop crash fix in setting up bottom progress bar --- .../SplitViewController/MVMCoreUISplitViewController.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MVMCoreUI/Containers/SplitViewController/MVMCoreUISplitViewController.m b/MVMCoreUI/Containers/SplitViewController/MVMCoreUISplitViewController.m index 7377701b..86cc08eb 100644 --- a/MVMCoreUI/Containers/SplitViewController/MVMCoreUISplitViewController.m +++ b/MVMCoreUI/Containers/SplitViewController/MVMCoreUISplitViewController.m @@ -824,14 +824,14 @@ CGFloat const PanelAnimationDuration = 0.2; [MVMCoreDispatchUtility performBlockOnMainThread:^{ if (self.bottomProgressBarHeightConstraint.constant != PaddingOne) { self.bottomProgressBarHeightConstraint.constant = PaddingOne; - [self.bottomProgressBar.superview layoutIfNeeded]; + [self.bottomProgressBar updateConstraintsIfNeeded]; } if (progress > 0.05) { self.bottomProgressBar.progress = progress; } else { self.bottomProgressBarHeightConstraint.constant = 0; - [self.bottomProgressBar.superview layoutIfNeeded]; + [self.bottomProgressBar updateConstraintsIfNeeded]; } }]; } From 76031200fa024ab3440967a35a39b455d869bf7a Mon Sep 17 00:00:00 2001 From: "Khan, Arshad" Date: Thu, 18 Feb 2021 23:45:26 +0530 Subject: [PATCH 6/7] reverting code which was added for infinite loop crash only in ipads and force crash --- .../SplitViewController/MVMCoreUISplitViewController.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MVMCoreUI/Containers/SplitViewController/MVMCoreUISplitViewController.m b/MVMCoreUI/Containers/SplitViewController/MVMCoreUISplitViewController.m index 86cc08eb..7377701b 100644 --- a/MVMCoreUI/Containers/SplitViewController/MVMCoreUISplitViewController.m +++ b/MVMCoreUI/Containers/SplitViewController/MVMCoreUISplitViewController.m @@ -824,14 +824,14 @@ CGFloat const PanelAnimationDuration = 0.2; [MVMCoreDispatchUtility performBlockOnMainThread:^{ if (self.bottomProgressBarHeightConstraint.constant != PaddingOne) { self.bottomProgressBarHeightConstraint.constant = PaddingOne; - [self.bottomProgressBar updateConstraintsIfNeeded]; + [self.bottomProgressBar.superview layoutIfNeeded]; } if (progress > 0.05) { self.bottomProgressBar.progress = progress; } else { self.bottomProgressBarHeightConstraint.constant = 0; - [self.bottomProgressBar updateConstraintsIfNeeded]; + [self.bottomProgressBar.superview layoutIfNeeded]; } }]; } From f20895627f6c8649a309b8df1595fc1c65149d7a Mon Sep 17 00:00:00 2001 From: Kevin G Christiano Date: Tue, 23 Feb 2021 15:34:28 -0500 Subject: [PATCH 7/7] undo --- MVMCoreUI/Atomic/Atoms/Views/Label/Label.swift | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/MVMCoreUI/Atomic/Atoms/Views/Label/Label.swift b/MVMCoreUI/Atomic/Atoms/Views/Label/Label.swift index 8838966c..7e902d435 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/Label/Label.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/Label/Label.swift @@ -594,6 +594,7 @@ public typealias ActionBlock = () -> () attributedText = attributedString } + @objc public func updateView(_ size: CGFloat) { scaleSize = size as NSNumber @@ -623,9 +624,6 @@ public typealias ActionBlock = () -> () } else if !MVMCoreGetterUtility.fequal(a: Float(standardFontSize), b: 0.0), let sizeObject = sizeObject ?? MFStyler.sizeObjectGeneric(forCurrentDevice: standardFontSize) { font = font.updateSize(sizeObject.getValueBased(onSize: size)) } - - // Provide the label additional size information to help calculate its intrinsic content. - preferredMaxLayoutWidth = Styler.maxAvailableLayoutWidth(size: size) } @objc public func setFont(_ font: UIFont, scale: Bool) {