From 129a0e92411eef785faafa6639d907722d867094 Mon Sep 17 00:00:00 2001
From: "Arora, Prateek" <prateek.arora@one.verizon.com>
Date: Tue, 7 Jan 2020 12:34:29 +0530
Subject: [PATCH 01/17] New molecule -> headLineBodyCaretLinkImage

---
 MVMCoreUI.xcodeproj/project.pbxproj           |  4 +
 .../HeadLineBodyCaretLinkImage.swift          | 95 +++++++++++++++++++
 .../MVMCoreUIMoleculeMappingObject.m          |  3 +-
 3 files changed, 101 insertions(+), 1 deletion(-)
 create mode 100644 MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift

diff --git a/MVMCoreUI.xcodeproj/project.pbxproj b/MVMCoreUI.xcodeproj/project.pbxproj
index e8c26f4c..775b8b0d 100644
--- a/MVMCoreUI.xcodeproj/project.pbxproj
+++ b/MVMCoreUI.xcodeproj/project.pbxproj
@@ -32,6 +32,7 @@
 		943784F6236B77BB006A1E82 /* GraphViewAnimationHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 943784F4236B77BB006A1E82 /* GraphViewAnimationHandler.swift */; };
 		9455B19C234F8A0400A574DB /* MVMAnimationFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9455B19B234F8A0400A574DB /* MVMAnimationFramework.framework */; };
 		948DB67E2326DCD90011F916 /* MultiProgress.swift in Sources */ = {isa = PBXBuildFile; fileRef = 948DB67D2326DCD90011F916 /* MultiProgress.swift */; };
+		C7192E7D23C301750050C2A0 /* HeadLineBodyCaretLinkImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7192E7C23C301750050C2A0 /* HeadLineBodyCaretLinkImage.swift */; };
 		D20A9A5E2243D3E300ADE781 /* TwoButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D20A9A5D2243D3E300ADE781 /* TwoButtonView.swift */; };
 		D213347723843825008E41B3 /* Line.swift in Sources */ = {isa = PBXBuildFile; fileRef = D213347623843825008E41B3 /* Line.swift */; };
 		D224798A2314445E003FCCF9 /* LabelSwitch.swift in Sources */ = {isa = PBXBuildFile; fileRef = D22479892314445E003FCCF9 /* LabelSwitch.swift */; };
@@ -233,6 +234,7 @@
 		943784F4236B77BB006A1E82 /* GraphViewAnimationHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GraphViewAnimationHandler.swift; sourceTree = "<group>"; };
 		9455B19B234F8A0400A574DB /* MVMAnimationFramework.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MVMAnimationFramework.framework; path = ../SharedFrameworks/MVMAnimationFramework.framework; sourceTree = "<group>"; };
 		948DB67D2326DCD90011F916 /* MultiProgress.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MultiProgress.swift; sourceTree = "<group>"; };
+		C7192E7C23C301750050C2A0 /* HeadLineBodyCaretLinkImage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HeadLineBodyCaretLinkImage.swift; sourceTree = "<group>"; };
 		D20A9A5D2243D3E300ADE781 /* TwoButtonView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TwoButtonView.swift; sourceTree = "<group>"; };
 		D213347623843825008E41B3 /* Line.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Line.swift; sourceTree = "<group>"; };
 		D22479892314445E003FCCF9 /* LabelSwitch.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LabelSwitch.swift; sourceTree = "<group>"; };
@@ -486,6 +488,7 @@
 				D2A638FC22CA98280052ED1F /* HeadlineBody.swift */,
 				D22479952316AF6D003FCCF9 /* HeadlineBodyTextButton.swift */,
 				D27CD40F2339057800C1DC07 /* EyebrowHeadlineBodyLink.swift */,
+				C7192E7C23C301750050C2A0 /* HeadLineBodyCaretLinkImage.swift */,
 			);
 			path = VerticalCombinationViews;
 			sourceTree = "<group>";
@@ -1175,6 +1178,7 @@
 				0198F7A82256A80B0066C936 /* MFRadioButton.m in Sources */,
 				D268C712238D6699007F2C1C /* DropDown.swift in Sources */,
 				0A41BA6E2344FCD400D4C0BC /* CATransaction+Extension.swift in Sources */,
+				C7192E7D23C301750050C2A0 /* HeadLineBodyCaretLinkImage.swift in Sources */,
 				D29DF13221E6851E003B2FB9 /* MVMCoreUITopAlertBaseView.m in Sources */,
 				D29DF29C21E7ADB9003B2FB9 /* MFProgrammaticTableViewController.m in Sources */,
 				0105618E224BBE7700E1557D /* FormValidator+TextFields.swift in Sources */,
diff --git a/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift b/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
new file mode 100644
index 00000000..107ca07f
--- /dev/null
+++ b/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
@@ -0,0 +1,95 @@
+//
+//  HeadLineBodyCaretLinkImage.swift
+//  MVMCoreUI
+//
+//  Created by Arora, Prateek on 06/01/20.
+//  Copyright © 2020 Verizon Wireless. All rights reserved.
+//
+
+import Foundation
+@objcMembers public class HeadLineBodyCaretLinkImage: ViewConstrainingView {
+
+    let headlineBody = HeadlineBody(frame: .zero)
+    let caretButton = CaretButton(frame: .zero)
+    //let caretButton = MFTextButton(nil, constrainHeight: true, forWidth: MVMCoreUIUtility.getWidth())
+
+    let backgroundImageView = MFLoadImageView()
+    var spaceBetweenConstant: CGFloat = 104.0
+    var spaceBetweenViews: NSLayoutConstraint?
+    var leftConstant: CGFloat = 32.0
+    // MARK: - MVMCoreViewProtocol
+    open override func updateView(_ size: CGFloat) {
+        super.updateView(size)
+        headlineBody.updateView(size)
+        caretButton.updateView(size)
+        backgroundImageView.updateView(size)
+        setSpacing()
+    }
+    
+    open override func setupView() {
+        super.setupView()
+        guard subviews.count == 0 else {
+            return
+        }
+        let view = MVMCoreUICommonViewsUtility.commonView()
+        addSubview(view)
+        pinView(toSuperView: view)
+        
+        view.addSubview(headlineBody)
+        view.addSubview(caretButton)
+        
+        headlineBody.translatesAutoresizingMaskIntoConstraints = false
+        headlineBody.topAnchor.constraint(equalTo: view.topAnchor, constant: 24.0).isActive = true
+        headlineBody.leftAnchor.constraint(equalTo: view.leftAnchor, constant: leftConstant).isActive = true
+        var constraint = view.rightAnchor.constraint(equalTo: headlineBody.rightAnchor)
+        constraint.priority = .defaultHigh
+        constraint.isActive = true
+        
+        spaceBetweenViews = caretButton.topAnchor.constraint(equalTo: headlineBody.bottomAnchor, constant: spaceBetweenConstant)
+        spaceBetweenViews?.isActive = true
+        
+        caretButton.translatesAutoresizingMaskIntoConstraints = false
+        caretButton.leftAnchor.constraint(equalTo: view.leftAnchor, constant: leftConstant).isActive = true
+        view.bottomAnchor.constraint(equalTo: caretButton.bottomAnchor).isActive = true
+        view.rightAnchor.constraint(greaterThanOrEqualTo: caretButton.rightAnchor).isActive = true
+        constraint = view.rightAnchor.constraint(equalTo: caretButton.rightAnchor)
+        constraint.priority = .defaultHigh
+        constraint.isActive = true
+        
+        //Background image view
+        backgroundImageView.translatesAutoresizingMaskIntoConstraints = false
+        backgroundImageView.imageView.contentMode = .scaleAspectFill
+        view.addSubview(backgroundImageView)
+        NSLayoutConstraint.constraintPinSubview(toSuperview: backgroundImageView)
+        view.sendSubviewToBack(backgroundImageView)
+    }
+    
+    // MARK: - Constraining
+    public func setSpacing() {
+        if headlineBody.hasText() && (caretButton.titleLabel?.text?.count ?? 0) > 0 {
+            spaceBetweenViews?.constant = spaceBetweenConstant
+        } else {
+            spaceBetweenViews?.constant = 0
+        }
+    }
+    
+    // MARK: - MVMCoreUIMoleculeViewProtocol
+     open override func setWithJSON(_ json: [AnyHashable: Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) {
+        super.setWithJSON(json, delegateObject: delegateObject, additionalData: additionalData)
+        if let imageJSON = json?.optionalDictionaryForKey("image") {
+            backgroundImageView.setWithJSON(imageJSON, delegateObject: delegateObject, additionalData: additionalData)
+        }
+            headlineBody.setWithJSON(json?.optionalDictionaryForKey("headlineBody"), delegateObject: delegateObject, additionalData: additionalData)
+            caretButton.setWithJSON(json?.optionalDictionaryForKey("caretLink"), delegateObject: delegateObject, additionalData: additionalData)
+        
+    }
+    
+    open override func reset() {
+        super.reset()
+        headlineBody.reset()
+    }
+    
+    public override class func estimatedHeight(forRow json: [AnyHashable : Any]?, delegateObject: MVMCoreUIDelegateObject?) -> CGFloat {
+        return 320
+    }
+}
diff --git a/MVMCoreUI/OtherHandlers/MVMCoreUIMoleculeMappingObject.m b/MVMCoreUI/OtherHandlers/MVMCoreUIMoleculeMappingObject.m
index 9db7822d..ecad0fc7 100644
--- a/MVMCoreUI/OtherHandlers/MVMCoreUIMoleculeMappingObject.m
+++ b/MVMCoreUI/OtherHandlers/MVMCoreUIMoleculeMappingObject.m
@@ -66,7 +66,8 @@
                      @"tabsListItem": TabsTableViewCell.class,
                      @"dropDownListItem": DropDownFilterTableViewCell.class,
                      @"headlineBodyButton": HeadlineBodyButton.class,
-                     @"eyebrowHeadlineBodyLink": EyebrowHeadlineBodyLink.class
+                     @"eyebrowHeadlineBodyLink": EyebrowHeadlineBodyLink.class,
+                     @"headLineBodyCaretLinkImage" : HeadLineBodyCaretLinkImage.class
                      } mutableCopy];
     });
     return mapping;

From d891d7ba1a88bfeb5b3ab88140bfbae7c1e255b5 Mon Sep 17 00:00:00 2001
From: "Arora, Prateek" <prateek.arora@one.verizon.com>
Date: Tue, 7 Jan 2020 19:29:26 +0530
Subject: [PATCH 02/17] Code cleaning

---
 .../HeadLineBodyCaretLinkImage.swift                   | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift b/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
index 107ca07f..5347b730 100644
--- a/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
+++ b/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
@@ -17,6 +17,8 @@ import Foundation
     var spaceBetweenConstant: CGFloat = 104.0
     var spaceBetweenViews: NSLayoutConstraint?
     var leftConstant: CGFloat = 32.0
+    var leftConstraint: NSLayoutConstraint?
+
     // MARK: - MVMCoreViewProtocol
     open override func updateView(_ size: CGFloat) {
         super.updateView(size)
@@ -38,6 +40,7 @@ import Foundation
         view.addSubview(headlineBody)
         view.addSubview(caretButton)
         
+        //Headline view
         headlineBody.translatesAutoresizingMaskIntoConstraints = false
         headlineBody.topAnchor.constraint(equalTo: view.topAnchor, constant: 24.0).isActive = true
         headlineBody.leftAnchor.constraint(equalTo: view.leftAnchor, constant: leftConstant).isActive = true
@@ -48,6 +51,7 @@ import Foundation
         spaceBetweenViews = caretButton.topAnchor.constraint(equalTo: headlineBody.bottomAnchor, constant: spaceBetweenConstant)
         spaceBetweenViews?.isActive = true
         
+        //Caret view
         caretButton.translatesAutoresizingMaskIntoConstraints = false
         caretButton.leftAnchor.constraint(equalTo: view.leftAnchor, constant: leftConstant).isActive = true
         view.bottomAnchor.constraint(equalTo: caretButton.bottomAnchor).isActive = true
@@ -76,17 +80,15 @@ import Foundation
     // MARK: - MVMCoreUIMoleculeViewProtocol
      open override func setWithJSON(_ json: [AnyHashable: Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) {
         super.setWithJSON(json, delegateObject: delegateObject, additionalData: additionalData)
-        if let imageJSON = json?.optionalDictionaryForKey("image") {
-            backgroundImageView.setWithJSON(imageJSON, delegateObject: delegateObject, additionalData: additionalData)
-        }
+            backgroundImageView.setWithJSON(json?.optionalDictionaryForKey("image"), delegateObject: delegateObject, additionalData: additionalData)
             headlineBody.setWithJSON(json?.optionalDictionaryForKey("headlineBody"), delegateObject: delegateObject, additionalData: additionalData)
             caretButton.setWithJSON(json?.optionalDictionaryForKey("caretLink"), delegateObject: delegateObject, additionalData: additionalData)
-        
     }
     
     open override func reset() {
         super.reset()
         headlineBody.reset()
+        backgroundImageView.reset()
     }
     
     public override class func estimatedHeight(forRow json: [AnyHashable : Any]?, delegateObject: MVMCoreUIDelegateObject?) -> CGFloat {

From f32cc7d05c8e618703209fede23cecf308b5204f Mon Sep 17 00:00:00 2001
From: "Arora, Prateek" <prateek.arora@one.verizon.com>
Date: Wed, 8 Jan 2020 12:21:28 +0530
Subject: [PATCH 03/17] Code cleaning

---
 .../HeadLineBodyCaretLinkImage.swift                 | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift b/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
index 5347b730..53bff16d 100644
--- a/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
+++ b/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
@@ -11,14 +11,11 @@ import Foundation
 
     let headlineBody = HeadlineBody(frame: .zero)
     let caretButton = CaretButton(frame: .zero)
-    //let caretButton = MFTextButton(nil, constrainHeight: true, forWidth: MVMCoreUIUtility.getWidth())
-
     let backgroundImageView = MFLoadImageView()
     var spaceBetweenConstant: CGFloat = 104.0
     var spaceBetweenViews: NSLayoutConstraint?
     var leftConstant: CGFloat = 32.0
-    var leftConstraint: NSLayoutConstraint?
-
+    
     // MARK: - MVMCoreViewProtocol
     open override func updateView(_ size: CGFloat) {
         super.updateView(size)
@@ -36,7 +33,6 @@ import Foundation
         let view = MVMCoreUICommonViewsUtility.commonView()
         addSubview(view)
         pinView(toSuperView: view)
-        
         view.addSubview(headlineBody)
         view.addSubview(caretButton)
         
@@ -80,9 +76,9 @@ import Foundation
     // MARK: - MVMCoreUIMoleculeViewProtocol
      open override func setWithJSON(_ json: [AnyHashable: Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) {
         super.setWithJSON(json, delegateObject: delegateObject, additionalData: additionalData)
-            backgroundImageView.setWithJSON(json?.optionalDictionaryForKey("image"), delegateObject: delegateObject, additionalData: additionalData)
-            headlineBody.setWithJSON(json?.optionalDictionaryForKey("headlineBody"), delegateObject: delegateObject, additionalData: additionalData)
-            caretButton.setWithJSON(json?.optionalDictionaryForKey("caretLink"), delegateObject: delegateObject, additionalData: additionalData)
+        backgroundImageView.setWithJSON(json?.optionalDictionaryForKey("image"), delegateObject: delegateObject, additionalData: additionalData)
+        headlineBody.setWithJSON(json?.optionalDictionaryForKey("headlineBody"), delegateObject: delegateObject, additionalData: additionalData)
+        caretButton.setWithJSON(json?.optionalDictionaryForKey("caretLink"), delegateObject: delegateObject, additionalData: additionalData)
     }
     
     open override func reset() {

From c908606b79db06142375a0117644e7327a456e18 Mon Sep 17 00:00:00 2001
From: "Arora, Prateek" <prateek.arora@one.verizon.com>
Date: Wed, 8 Jan 2020 13:08:09 +0530
Subject: [PATCH 04/17] Review Comment Changes

---
 .../VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift b/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
index 53bff16d..d1710070 100644
--- a/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
+++ b/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
@@ -44,7 +44,7 @@ import Foundation
         constraint.priority = .defaultHigh
         constraint.isActive = true
         
-        spaceBetweenViews = caretButton.topAnchor.constraint(equalTo: headlineBody.bottomAnchor, constant: spaceBetweenConstant)
+        spaceBetweenViews = caretButton.topAnchor.constraint(greaterThanOrEqualTo: headlineBody.bottomAnchor, constant: spaceBetweenConstant)
         spaceBetweenViews?.isActive = true
         
         //Caret view

From 4c60ea2f1f39ba5df18b23b8bfd6c7375b1f952d Mon Sep 17 00:00:00 2001
From: "Arora, Prateek" <prateek.arora@one.verizon.com>
Date: Wed, 8 Jan 2020 14:53:59 +0530
Subject: [PATCH 05/17] Review comment changes

---
 .../HeadLineBodyCaretLinkImage.swift               | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift b/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
index d1710070..54f9b357 100644
--- a/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
+++ b/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
@@ -17,14 +17,6 @@ import Foundation
     var leftConstant: CGFloat = 32.0
     
     // MARK: - MVMCoreViewProtocol
-    open override func updateView(_ size: CGFloat) {
-        super.updateView(size)
-        headlineBody.updateView(size)
-        caretButton.updateView(size)
-        backgroundImageView.updateView(size)
-        setSpacing()
-    }
-    
     open override func setupView() {
         super.setupView()
         guard subviews.count == 0 else {
@@ -33,15 +25,15 @@ import Foundation
         let view = MVMCoreUICommonViewsUtility.commonView()
         addSubview(view)
         pinView(toSuperView: view)
+        setSpacing()
         view.addSubview(headlineBody)
         view.addSubview(caretButton)
         
         //Headline view
-        headlineBody.translatesAutoresizingMaskIntoConstraints = false
         headlineBody.topAnchor.constraint(equalTo: view.topAnchor, constant: 24.0).isActive = true
         headlineBody.leftAnchor.constraint(equalTo: view.leftAnchor, constant: leftConstant).isActive = true
         var constraint = view.rightAnchor.constraint(equalTo: headlineBody.rightAnchor)
-        constraint.priority = .defaultHigh
+        constraint.priority = .defaultLow
         constraint.isActive = true
         
         spaceBetweenViews = caretButton.topAnchor.constraint(greaterThanOrEqualTo: headlineBody.bottomAnchor, constant: spaceBetweenConstant)
@@ -53,7 +45,7 @@ import Foundation
         view.bottomAnchor.constraint(equalTo: caretButton.bottomAnchor).isActive = true
         view.rightAnchor.constraint(greaterThanOrEqualTo: caretButton.rightAnchor).isActive = true
         constraint = view.rightAnchor.constraint(equalTo: caretButton.rightAnchor)
-        constraint.priority = .defaultHigh
+        constraint.priority = .defaultLow
         constraint.isActive = true
         
         //Background image view

From 0226eb2cace3e5dac857045f92ed83870b742e76 Mon Sep 17 00:00:00 2001
From: "Arora, Prateek" <prateek.arora@one.verizon.com>
Date: Wed, 8 Jan 2020 18:46:02 +0530
Subject: [PATCH 06/17] Review comments : added default padding

---
 .../VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift b/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
index 54f9b357..469a4615 100644
--- a/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
+++ b/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
@@ -30,7 +30,7 @@ import Foundation
         view.addSubview(caretButton)
         
         //Headline view
-        headlineBody.topAnchor.constraint(equalTo: view.topAnchor, constant: 24.0).isActive = true
+        headlineBody.topAnchor.constraint(equalTo: view.topAnchor, constant: PaddingDefault).isActive = true
         headlineBody.leftAnchor.constraint(equalTo: view.leftAnchor, constant: leftConstant).isActive = true
         var constraint = view.rightAnchor.constraint(equalTo: headlineBody.rightAnchor)
         constraint.priority = .defaultLow

From 203484b2883110bde3931dec39ee3ef6ffa23dd8 Mon Sep 17 00:00:00 2001
From: "Arora, Prateek" <prateek.arora@one.verizon.com>
Date: Wed, 8 Jan 2020 18:49:36 +0530
Subject: [PATCH 07/17] Code clean

---
 .../HeadLineBodyCaretLinkImage.swift                       | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift b/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
index 469a4615..e10a6196 100644
--- a/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
+++ b/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
@@ -17,6 +17,13 @@ import Foundation
     var leftConstant: CGFloat = 32.0
     
     // MARK: - MVMCoreViewProtocol
+    open override func updateView(_ size: CGFloat) {
+         super.updateView(size)
+         headlineBody.updateView(size)
+         caretButton.updateView(size)
+         backgroundImageView.updateView(size)
+     }
+
     open override func setupView() {
         super.setupView()
         guard subviews.count == 0 else {

From 67304b7657d36f2fe6d526cc610e39f30c6f2531 Mon Sep 17 00:00:00 2001
From: "Arora, Prateek" <prateek.arora@one.verizon.com>
Date: Thu, 9 Jan 2020 13:26:09 +0530
Subject: [PATCH 08/17] Changes  as suggested by Ryan

---
 .../HeadLineBodyCaretLinkImage.swift                | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift b/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
index e10a6196..4c8d2313 100644
--- a/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
+++ b/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
@@ -15,13 +15,17 @@ import Foundation
     var spaceBetweenConstant: CGFloat = 104.0
     var spaceBetweenViews: NSLayoutConstraint?
     var leftConstant: CGFloat = 32.0
-    
+    var leftConstraintHeadline : NSLayoutConstraint?
+    var leftConstraintCaretView : NSLayoutConstraint?
+    let padding = MFStyler.defaultHorizontalPaddingForApplicationWidth()
     // MARK: - MVMCoreViewProtocol
     open override func updateView(_ size: CGFloat) {
          super.updateView(size)
          headlineBody.updateView(size)
          caretButton.updateView(size)
          backgroundImageView.updateView(size)
+         leftConstraintHeadline?.constant = MFStyler.defaultHorizontalPadding(forSize: size)
+         leftConstraintCaretView?.constant = MFStyler.defaultHorizontalPadding(forSize: size)
      }
 
     open override func setupView() {
@@ -37,8 +41,9 @@ import Foundation
         view.addSubview(caretButton)
         
         //Headline view
+        leftConstraintHeadline = headlineBody.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: padding)
+        leftConstraintHeadline?.isActive = true
         headlineBody.topAnchor.constraint(equalTo: view.topAnchor, constant: PaddingDefault).isActive = true
-        headlineBody.leftAnchor.constraint(equalTo: view.leftAnchor, constant: leftConstant).isActive = true
         var constraint = view.rightAnchor.constraint(equalTo: headlineBody.rightAnchor)
         constraint.priority = .defaultLow
         constraint.isActive = true
@@ -48,7 +53,9 @@ import Foundation
         
         //Caret view
         caretButton.translatesAutoresizingMaskIntoConstraints = false
-        caretButton.leftAnchor.constraint(equalTo: view.leftAnchor, constant: leftConstant).isActive = true
+        leftConstraintCaretView = caretButton.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: padding)
+        leftConstraintCaretView?.isActive = true
+        caretButton.bottomAnchor.constraint(greaterThanOrEqualTo: view.bottomAnchor, constant: PaddingDefault).isActive = true
         view.bottomAnchor.constraint(equalTo: caretButton.bottomAnchor).isActive = true
         view.rightAnchor.constraint(greaterThanOrEqualTo: caretButton.rightAnchor).isActive = true
         constraint = view.rightAnchor.constraint(equalTo: caretButton.rightAnchor)

From 03aeb1fc63958bd3891afebdb0fa84b494ad31a8 Mon Sep 17 00:00:00 2001
From: "Arora, Prateek" <prateek.arora@one.verizon.com>
Date: Thu, 9 Jan 2020 16:35:56 +0530
Subject: [PATCH 09/17] headline body width 85% having max as 350px

---
 .../VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift b/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
index 4c8d2313..08ea4b5b 100644
--- a/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
+++ b/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
@@ -18,6 +18,7 @@ import Foundation
     var leftConstraintHeadline : NSLayoutConstraint?
     var leftConstraintCaretView : NSLayoutConstraint?
     let padding = MFStyler.defaultHorizontalPaddingForApplicationWidth()
+    let maxWidth : CGFloat = 350.0
     // MARK: - MVMCoreViewProtocol
     open override func updateView(_ size: CGFloat) {
          super.updateView(size)
@@ -44,6 +45,9 @@ import Foundation
         leftConstraintHeadline = headlineBody.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: padding)
         leftConstraintHeadline?.isActive = true
         headlineBody.topAnchor.constraint(equalTo: view.topAnchor, constant: PaddingDefault).isActive = true
+        let headLineBodyWidth = min((MVMCoreUISplitViewController.getDetailViewWidth() * 0.85), maxWidth)
+        headlineBody.widthAnchor.constraint(lessThanOrEqualToConstant: headLineBodyWidth).isActive  = true
+    
         var constraint = view.rightAnchor.constraint(equalTo: headlineBody.rightAnchor)
         constraint.priority = .defaultLow
         constraint.isActive = true

From 7b49224abdf948a7517e12e6922a161e05e2adb5 Mon Sep 17 00:00:00 2001
From: "Arora, Prateek" <prateek.arora@one.verizon.com>
Date: Thu, 9 Jan 2020 18:19:52 +0530
Subject: [PATCH 10/17] Caret link bottom spacing

---
 .../VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift  | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift b/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
index 08ea4b5b..854c6a31 100644
--- a/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
+++ b/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
@@ -14,7 +14,6 @@ import Foundation
     let backgroundImageView = MFLoadImageView()
     var spaceBetweenConstant: CGFloat = 104.0
     var spaceBetweenViews: NSLayoutConstraint?
-    var leftConstant: CGFloat = 32.0
     var leftConstraintHeadline : NSLayoutConstraint?
     var leftConstraintCaretView : NSLayoutConstraint?
     let padding = MFStyler.defaultHorizontalPaddingForApplicationWidth()
@@ -52,7 +51,7 @@ import Foundation
         constraint.priority = .defaultLow
         constraint.isActive = true
         
-        spaceBetweenViews = caretButton.topAnchor.constraint(greaterThanOrEqualTo: headlineBody.bottomAnchor, constant: spaceBetweenConstant)
+        spaceBetweenViews = caretButton.topAnchor.constraint(equalTo: headlineBody.bottomAnchor, constant: spaceBetweenConstant)
         spaceBetweenViews?.isActive = true
         
         //Caret view

From b8a162da54f71396f199a289f64accdde7cd4ddb Mon Sep 17 00:00:00 2001
From: "Arora, Prateek" <prateek.arora@one.verizon.com>
Date: Thu, 9 Jan 2020 20:10:17 +0530
Subject: [PATCH 11/17] Code cleaning removing duplicate constraint

---
 .../HeadLineBodyCaretLinkImage.swift                 | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift b/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
index 854c6a31..3ff09aa9 100644
--- a/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
+++ b/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
@@ -36,7 +36,7 @@ import Foundation
         let view = MVMCoreUICommonViewsUtility.commonView()
         addSubview(view)
         pinView(toSuperView: view)
-        setSpacing()
+        //setSpacing()
         view.addSubview(headlineBody)
         view.addSubview(caretButton)
         
@@ -46,12 +46,8 @@ import Foundation
         headlineBody.topAnchor.constraint(equalTo: view.topAnchor, constant: PaddingDefault).isActive = true
         let headLineBodyWidth = min((MVMCoreUISplitViewController.getDetailViewWidth() * 0.85), maxWidth)
         headlineBody.widthAnchor.constraint(lessThanOrEqualToConstant: headLineBodyWidth).isActive  = true
-    
-        var constraint = view.rightAnchor.constraint(equalTo: headlineBody.rightAnchor)
-        constraint.priority = .defaultLow
-        constraint.isActive = true
         
-        spaceBetweenViews = caretButton.topAnchor.constraint(equalTo: headlineBody.bottomAnchor, constant: spaceBetweenConstant)
+        spaceBetweenViews = caretButton.topAnchor.constraint(greaterThanOrEqualTo: headlineBody.bottomAnchor, constant: spaceBetweenConstant)
         spaceBetweenViews?.isActive = true
         
         //Caret view
@@ -60,8 +56,8 @@ import Foundation
         leftConstraintCaretView?.isActive = true
         caretButton.bottomAnchor.constraint(greaterThanOrEqualTo: view.bottomAnchor, constant: PaddingDefault).isActive = true
         view.bottomAnchor.constraint(equalTo: caretButton.bottomAnchor).isActive = true
-        view.rightAnchor.constraint(greaterThanOrEqualTo: caretButton.rightAnchor).isActive = true
-        constraint = view.rightAnchor.constraint(equalTo: caretButton.rightAnchor)
+        
+        let constraint = view.rightAnchor.constraint(equalTo: headlineBody.rightAnchor)
         constraint.priority = .defaultLow
         constraint.isActive = true
         

From 20f62ce4c5f393a114e838ba33c408d264cf607e Mon Sep 17 00:00:00 2001
From: "Arora, Prateek" <prateek.arora@one.verizon.com>
Date: Thu, 9 Jan 2020 20:10:39 +0530
Subject: [PATCH 12/17] Code clean

---
 .../VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift    | 1 -
 1 file changed, 1 deletion(-)

diff --git a/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift b/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
index 3ff09aa9..f1695d02 100644
--- a/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
+++ b/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
@@ -36,7 +36,6 @@ import Foundation
         let view = MVMCoreUICommonViewsUtility.commonView()
         addSubview(view)
         pinView(toSuperView: view)
-        //setSpacing()
         view.addSubview(headlineBody)
         view.addSubview(caretButton)
         

From b037d23adbaea3f428348bba75de88125e4c75a3 Mon Sep 17 00:00:00 2001
From: "Arora, Prateek" <prateek.arora@one.verizon.com>
Date: Thu, 9 Jan 2020 22:25:53 +0530
Subject: [PATCH 13/17] Code changes

---
 .../HeadLineBodyCaretLinkImage.swift          | 20 +++++++------------
 1 file changed, 7 insertions(+), 13 deletions(-)

diff --git a/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift b/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
index f1695d02..1b1c57e9 100644
--- a/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
+++ b/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
@@ -43,9 +43,12 @@ import Foundation
         leftConstraintHeadline = headlineBody.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: padding)
         leftConstraintHeadline?.isActive = true
         headlineBody.topAnchor.constraint(equalTo: view.topAnchor, constant: PaddingDefault).isActive = true
-        let headLineBodyWidth = min((MVMCoreUISplitViewController.getDetailViewWidth() * 0.85), maxWidth)
-        headlineBody.widthAnchor.constraint(lessThanOrEqualToConstant: headLineBodyWidth).isActive  = true
-        
+
+        let headLineBodyWidth = headlineBody.widthAnchor.constraint(equalTo: view.widthAnchor, multiplier: 0.85)
+        headLineBodyWidth.priority = .defaultHigh
+        headLineBodyWidth.isActive = true
+        headlineBody.widthAnchor.constraint(lessThanOrEqualToConstant: maxWidth).isActive = true
+
         spaceBetweenViews = caretButton.topAnchor.constraint(greaterThanOrEqualTo: headlineBody.bottomAnchor, constant: spaceBetweenConstant)
         spaceBetweenViews?.isActive = true
         
@@ -67,16 +70,7 @@ import Foundation
         NSLayoutConstraint.constraintPinSubview(toSuperview: backgroundImageView)
         view.sendSubviewToBack(backgroundImageView)
     }
-    
-    // MARK: - Constraining
-    public func setSpacing() {
-        if headlineBody.hasText() && (caretButton.titleLabel?.text?.count ?? 0) > 0 {
-            spaceBetweenViews?.constant = spaceBetweenConstant
-        } else {
-            spaceBetweenViews?.constant = 0
-        }
-    }
-    
+        
     // MARK: - MVMCoreUIMoleculeViewProtocol
      open override func setWithJSON(_ json: [AnyHashable: Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) {
         super.setWithJSON(json, delegateObject: delegateObject, additionalData: additionalData)

From 61d36b25a79cf2f1c095d9dba0e409ff376f716d Mon Sep 17 00:00:00 2001
From: "Arora, Prateek" <prateek.arora@one.verizon.com>
Date: Fri, 10 Jan 2020 11:04:07 +0530
Subject: [PATCH 14/17] Code changes

---
 .../VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift  | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift b/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
index 1b1c57e9..33492541 100644
--- a/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
+++ b/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
@@ -56,10 +56,9 @@ import Foundation
         caretButton.translatesAutoresizingMaskIntoConstraints = false
         leftConstraintCaretView = caretButton.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: padding)
         leftConstraintCaretView?.isActive = true
-        caretButton.bottomAnchor.constraint(greaterThanOrEqualTo: view.bottomAnchor, constant: PaddingDefault).isActive = true
         view.bottomAnchor.constraint(equalTo: caretButton.bottomAnchor).isActive = true
         
-        let constraint = view.rightAnchor.constraint(equalTo: headlineBody.rightAnchor)
+        let constraint = view.rightAnchor.constraint(greaterThanOrEqualTo: headlineBody.rightAnchor)
         constraint.priority = .defaultLow
         constraint.isActive = true
         

From 7a48633cce0e2f1f3879cb0477607d8738cc11b8 Mon Sep 17 00:00:00 2001
From: "Khan, Arshad" <arshad.khan@one.verizon.com>
Date: Fri, 10 Jan 2020 10:59:13 -0500
Subject: [PATCH 15/17] Implemented Ryan's feedback, as Prateek is out of
 office for next week.

---
 .../HeadLineBodyCaretLinkImage.swift                      | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift b/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
index 33492541..80eaf69e 100644
--- a/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
+++ b/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
@@ -13,7 +13,6 @@ import Foundation
     let caretButton = CaretButton(frame: .zero)
     let backgroundImageView = MFLoadImageView()
     var spaceBetweenConstant: CGFloat = 104.0
-    var spaceBetweenViews: NSLayoutConstraint?
     var leftConstraintHeadline : NSLayoutConstraint?
     var leftConstraintCaretView : NSLayoutConstraint?
     let padding = MFStyler.defaultHorizontalPaddingForApplicationWidth()
@@ -48,9 +47,6 @@ import Foundation
         headLineBodyWidth.priority = .defaultHigh
         headLineBodyWidth.isActive = true
         headlineBody.widthAnchor.constraint(lessThanOrEqualToConstant: maxWidth).isActive = true
-
-        spaceBetweenViews = caretButton.topAnchor.constraint(greaterThanOrEqualTo: headlineBody.bottomAnchor, constant: spaceBetweenConstant)
-        spaceBetweenViews?.isActive = true
         
         //Caret view
         caretButton.translatesAutoresizingMaskIntoConstraints = false
@@ -58,9 +54,7 @@ import Foundation
         leftConstraintCaretView?.isActive = true
         view.bottomAnchor.constraint(equalTo: caretButton.bottomAnchor).isActive = true
         
-        let constraint = view.rightAnchor.constraint(greaterThanOrEqualTo: headlineBody.rightAnchor)
-        constraint.priority = .defaultLow
-        constraint.isActive = true
+        caretButton.topAnchor.constraint(greaterThanOrEqualTo: headlineBody.bottomAnchor, constant: spaceBetweenConstant).isActive = true
         
         //Background image view
         backgroundImageView.translatesAutoresizingMaskIntoConstraints = false

From c4112665d9ba4b4ab58686ee5ea52fdd086eabdf Mon Sep 17 00:00:00 2001
From: panxi <xinleiryan.pan@verizonwireless.com>
Date: Fri, 10 Jan 2020 11:35:29 -0500
Subject: [PATCH 16/17] add bottom padding

---
 .../VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift b/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
index 80eaf69e..9c3dba8a 100644
--- a/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
+++ b/MVMCoreUI/Molecules/VerticalCombinationViews/HeadLineBodyCaretLinkImage.swift
@@ -52,7 +52,7 @@ import Foundation
         caretButton.translatesAutoresizingMaskIntoConstraints = false
         leftConstraintCaretView = caretButton.leadingAnchor.constraint(equalTo: view.leadingAnchor, constant: padding)
         leftConstraintCaretView?.isActive = true
-        view.bottomAnchor.constraint(equalTo: caretButton.bottomAnchor).isActive = true
+        view.bottomAnchor.constraint(equalTo: caretButton.bottomAnchor, constant: PaddingDefault).isActive = true
         
         caretButton.topAnchor.constraint(greaterThanOrEqualTo: headlineBody.bottomAnchor, constant: spaceBetweenConstant).isActive = true
         

From 85f210abe8397b69585ffab06eb4be87ce3d0646 Mon Sep 17 00:00:00 2001
From: Kevin G Christiano <kevin.christiano@verizonwireless.com>
Date: Mon, 13 Jan 2020 08:49:51 -0500
Subject: [PATCH 17/17] Accessibility fixes.

---
 MVMCoreUI/Atoms/Views/Label.swift | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

diff --git a/MVMCoreUI/Atoms/Views/Label.swift b/MVMCoreUI/Atoms/Views/Label.swift
index 56a0c38b..30101710 100644
--- a/MVMCoreUI/Atoms/Views/Label.swift
+++ b/MVMCoreUI/Atoms/Views/Label.swift
@@ -91,6 +91,7 @@ public typealias ActionBlock = () -> ()
         translatesAutoresizingMaskIntoConstraints = false
         clauses = []
         accessibilityCustomActions = []
+        accessibilityTraits = .staticText
         
         let tapGesture = UITapGestureRecognizer(target: self, action: #selector(textLinkTapped(_:)))
         tapGesture.numberOfTapsRequired = 1
@@ -522,6 +523,7 @@ public typealias ActionBlock = () -> ()
     
     func appendActionableClause(range: NSRange, actionBlock: @escaping ActionBlock) {
         
+        accessibilityTraits = .button
         let accessibleAction = customAccessibilityAction(range: range)
         clauses.append(ActionableClause(range: range, actionBlock: actionBlock, accessibilityID: accessibleAction?.hash ?? -1))
     }
@@ -582,6 +584,7 @@ extension Label {
         styleB2(true)
         accessibilityCustomActions = []
         clauses = []
+        accessibilityTraits = .staticText
     }
     
     @objc public func setWithJSON(_ json: [AnyHashable: Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) {
@@ -721,7 +724,6 @@ extension UITapGestureRecognizer {
         if label.makeWholeViewClickable {
             return true
         }
-        
         guard let abstractContainer = label.abstractTextContainer() else { return false }
         let textContainer = abstractContainer.0
         let layoutManager = abstractContainer.1
@@ -775,7 +777,7 @@ extension Label {
     }
     
     @objc public func accessibilityCustomAction(_ action: UIAccessibilityCustomAction) {
-        
+       
         for clause in clauses {
             if action.hash == clause.accessibilityID {
                 clause.performAction()
@@ -783,4 +785,19 @@ extension Label {
             }
         }
     }
+    
+    open override func accessibilityActivate() -> Bool {
+     
+        guard let accessibleActions = accessibilityCustomActions else { return false }
+        
+        for clause in clauses {
+            for action in accessibleActions {
+                if action.hash == clause.accessibilityID {
+                    clause.performAction()
+                    return true
+                }
+            }
+        }
+        return false
+    }
 }
