From e6787c764dceb9e0e05377305f1eccded3009922 Mon Sep 17 00:00:00 2001 From: aly-cloud Date: Wed, 18 Mar 2026 18:13:32 -0400 Subject: [PATCH 1/5] ui progress fixed take 1 --- .../UI/EateryScreen/MenuHeaderView.swift | 29 ++++++++++--------- .../UI/HomeScreen/HomeViewController.swift | 2 +- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/Eatery Blue/UI/EateryScreen/MenuHeaderView.swift b/Eatery Blue/UI/EateryScreen/MenuHeaderView.swift index d8e3baf..4fab40e 100644 --- a/Eatery Blue/UI/EateryScreen/MenuHeaderView.swift +++ b/Eatery Blue/UI/EateryScreen/MenuHeaderView.swift @@ -65,18 +65,6 @@ class MenuHeaderView: UIView { buttonView.backgroundColor = UIColor.Eatery.gray00 buttonView.layer.cornerRadius = 21 buttonView.layoutMargins = UIEdgeInsets(top: 0, left: 8, bottom: 0, right: 16) - - let titleLabel = UILabel() - titleLabel.text = "Change Date" - titleLabel.font = .preferredFont(for: .subheadline, weight: .semibold) - titleLabel.textColor = UIColor.Eatery.primaryText - - buttonView.addSubview(titleLabel) - titleLabel.snp.makeConstraints { make in - make.trailing.equalTo(buttonView.layoutMarginsGuide) - make.centerY.equalTo(buttonView) - } - let imageView = UIImageView() imageView.image = UIImage(named: "EateryCalendar") imageView.contentMode = .center @@ -88,6 +76,19 @@ class MenuHeaderView: UIView { make.centerY.equalTo(buttonView) } + let titleLabel = UILabel() + titleLabel.text = "Change Date" + titleLabel.font = .preferredFont(for: .subheadline, weight: .semibold) + titleLabel.textColor = UIColor.Eatery.primaryText + + buttonView.addSubview(titleLabel) + titleLabel.snp.makeConstraints { make in +// make.trailing.equalTo(buttonView.layoutMarginsGuide) + make.leading.equalTo(imageView.snp.trailing) + make.trailing.lessThanOrEqualTo(buttonView.layoutMarginsGuide) + make.centerY.equalTo(buttonView) + } + buttonView.isUserInteractionEnabled = true } @@ -102,6 +103,7 @@ class MenuHeaderView: UIView { private func setUpConstraints() { titleLabel.snp.makeConstraints { make in make.top.leading.equalTo(layoutMarginsGuide) + make.trailing.lessThanOrEqualTo(buttonView.snp.leading) } subtitleLabel.snp.makeConstraints { make in @@ -113,7 +115,8 @@ class MenuHeaderView: UIView { make.trailing.equalTo(layoutMarginsGuide) make.top.equalTo(layoutMarginsGuide).offset(8) make.height.equalTo(42) - make.width.equalTo(156) +// make.width.equalTo(156) + make.width.equalTo(160) // arbitrary guess } menuInaccuracyLabel.snp.makeConstraints { make in diff --git a/Eatery Blue/UI/HomeScreen/HomeViewController.swift b/Eatery Blue/UI/HomeScreen/HomeViewController.swift index f6e9fa8..b3eab15 100644 --- a/Eatery Blue/UI/HomeScreen/HomeViewController.swift +++ b/Eatery Blue/UI/HomeScreen/HomeViewController.swift @@ -121,7 +121,7 @@ class HomeViewController: UIViewController { collectionView.backgroundColor = UIColor.Eatery.surface collectionView.contentInsetAdjustmentBehavior = .never collectionView.delegate = self - collectionView.contentInset.bottom = tabBarController?.tabBar.frame.height ?? 0 + collectionView.contentInset.bottom = (tabBarController?.tabBar.frame.height ?? 0) + 25 // 108 collectionView.showsVerticalScrollIndicator = false collectionView.register( From 1fd24dbc0162fe7fb76a9ede52c772af2df52067 Mon Sep 17 00:00:00 2001 From: aly-cloud Date: Sat, 4 Apr 2026 13:03:24 -0700 Subject: [PATCH 2/5] Deleted comments Deleted comments to clean up code! --- Eatery Blue/UI/EateryScreen/MenuHeaderView.swift | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Eatery Blue/UI/EateryScreen/MenuHeaderView.swift b/Eatery Blue/UI/EateryScreen/MenuHeaderView.swift index 4fab40e..9b4e80f 100644 --- a/Eatery Blue/UI/EateryScreen/MenuHeaderView.swift +++ b/Eatery Blue/UI/EateryScreen/MenuHeaderView.swift @@ -83,7 +83,6 @@ class MenuHeaderView: UIView { buttonView.addSubview(titleLabel) titleLabel.snp.makeConstraints { make in -// make.trailing.equalTo(buttonView.layoutMarginsGuide) make.leading.equalTo(imageView.snp.trailing) make.trailing.lessThanOrEqualTo(buttonView.layoutMarginsGuide) make.centerY.equalTo(buttonView) @@ -115,8 +114,7 @@ class MenuHeaderView: UIView { make.trailing.equalTo(layoutMarginsGuide) make.top.equalTo(layoutMarginsGuide).offset(8) make.height.equalTo(42) -// make.width.equalTo(156) - make.width.equalTo(160) // arbitrary guess + make.width.equalTo(160) } menuInaccuracyLabel.snp.makeConstraints { make in From 79848ccac31f95d4d6f2605e78cd16c5509c2bb2 Mon Sep 17 00:00:00 2001 From: aly-cloud Date: Sat, 4 Apr 2026 14:31:57 -0700 Subject: [PATCH 3/5] Updated Change Date Button Constraints Shrunk fixed button width and shrunk Calendar icon frame to show the full "Closed Today," and shrunk the right button inset to make Change Date button insets more even --- Eatery Blue/UI/EateryScreen/MenuHeaderView.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Eatery Blue/UI/EateryScreen/MenuHeaderView.swift b/Eatery Blue/UI/EateryScreen/MenuHeaderView.swift index 9b4e80f..03c95be 100644 --- a/Eatery Blue/UI/EateryScreen/MenuHeaderView.swift +++ b/Eatery Blue/UI/EateryScreen/MenuHeaderView.swift @@ -64,14 +64,14 @@ class MenuHeaderView: UIView { private func setUpButtonImageView() { buttonView.backgroundColor = UIColor.Eatery.gray00 buttonView.layer.cornerRadius = 21 - buttonView.layoutMargins = UIEdgeInsets(top: 0, left: 8, bottom: 0, right: 16) + buttonView.layoutMargins = UIEdgeInsets(top: 0, left: 8, bottom: 0, right: 14) let imageView = UIImageView() imageView.image = UIImage(named: "EateryCalendar") imageView.contentMode = .center buttonView.addSubview(imageView) imageView.snp.makeConstraints { make in - make.width.height.equalTo(40) + make.width.height.equalTo(36) // or 16? make.leading.equalTo(buttonView.layoutMarginsGuide) make.centerY.equalTo(buttonView) } @@ -114,7 +114,7 @@ class MenuHeaderView: UIView { make.trailing.equalTo(layoutMarginsGuide) make.top.equalTo(layoutMarginsGuide).offset(8) make.height.equalTo(42) - make.width.equalTo(160) + make.width.equalTo(156) } menuInaccuracyLabel.snp.makeConstraints { make in From 8abaf07273c7f3a2c503da0dc1beb3958a30b2f3 Mon Sep 17 00:00:00 2001 From: aly-cloud Date: Sat, 4 Apr 2026 14:32:51 -0700 Subject: [PATCH 4/5] Deleted Comment --- Eatery Blue/UI/EateryScreen/MenuHeaderView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Eatery Blue/UI/EateryScreen/MenuHeaderView.swift b/Eatery Blue/UI/EateryScreen/MenuHeaderView.swift index 03c95be..f3a324e 100644 --- a/Eatery Blue/UI/EateryScreen/MenuHeaderView.swift +++ b/Eatery Blue/UI/EateryScreen/MenuHeaderView.swift @@ -71,7 +71,7 @@ class MenuHeaderView: UIView { buttonView.addSubview(imageView) imageView.snp.makeConstraints { make in - make.width.height.equalTo(36) // or 16? + make.width.height.equalTo(36) make.leading.equalTo(buttonView.layoutMarginsGuide) make.centerY.equalTo(buttonView) } From 35e071f3d081920bd6c048ae0dce272b863bd807 Mon Sep 17 00:00:00 2001 From: aly-cloud Date: Sat, 4 Apr 2026 21:28:53 -0700 Subject: [PATCH 5/5] Create Constant for Bottom Padding Total is 108 --- Eatery Blue/UI/HomeScreen/HomeViewController.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Eatery Blue/UI/HomeScreen/HomeViewController.swift b/Eatery Blue/UI/HomeScreen/HomeViewController.swift index b3eab15..36597f6 100644 --- a/Eatery Blue/UI/HomeScreen/HomeViewController.swift +++ b/Eatery Blue/UI/HomeScreen/HomeViewController.swift @@ -46,6 +46,7 @@ class HomeViewController: UIViewController { static let loadingHeaderHeight: CGFloat = maxHeaderHeight + 52 static let collectionViewTopPadding: CGFloat = 8 static let collectionViewSectionPadding: CGFloat = 16 + static let collectionViewBottomPadding: CGFloat = 25 static let isTesting = false } @@ -121,7 +122,8 @@ class HomeViewController: UIViewController { collectionView.backgroundColor = UIColor.Eatery.surface collectionView.contentInsetAdjustmentBehavior = .never collectionView.delegate = self - collectionView.contentInset.bottom = (tabBarController?.tabBar.frame.height ?? 0) + 25 // 108 + collectionView.contentInset.bottom = (tabBarController?.tabBar.frame.height ?? 0) + Constants + .collectionViewBottomPadding collectionView.showsVerticalScrollIndicator = false collectionView.register(