Skip to content

Commit

Permalink
Remove HomePageViewController code (#3454)
Browse files Browse the repository at this point in the history
<!--
Note: This checklist is a reminder of our shared engineering
expectations. Feel free to change it, although assigning a GitHub
reviewer and the items in bold are required.

⚠️ If you're an external contributor, please file an issue first before
working on a PR, as we can't guarantee that we will accept your changes
if they haven't been discussed ahead of time. Thanks!
-->

Task/Issue URL:
https://app.asana.com/0/72649045549333/1208547223289954/f
Tech Design URL:
CC: @brindy 

**Description**:

This is a follow up after #3453.

Removes unused code related to HomePageViewController. Home renderers
abstraction was also removed, though the implementation itself is used
in both Bookmarks controller and to show Favorites while editing URL on
non-home tab.

**Steps to test this PR**:
1. Make sure code compiles and tests pass.

**Definition of Done (Internal Only)**:

* [ ] Does this PR satisfy our [Definition of
Done](https://app.asana.com/0/1202500774821704/1207634633537039/f)?

**Copy Testing**:

* [ ] Use of correct apostrophes in new copy, ie `’` rather than `'`

**Orientation Testing**:

* [ ] Portrait
* [ ] Landscape

**Device Testing**:

* [ ] iPhone SE (1st Gen)
* [ ] iPhone 8
* [ ] iPhone X
* [ ] iPhone 14 Pro
* [ ] iPad

**OS Testing**:

* [ ] iOS 15
* [ ] iOS 16
* [ ] iOS 17

**Theme Testing**:

* [ ] Light theme
* [ ] Dark theme

---
###### Internal references:
[Software Engineering
Expectations](https://app.asana.com/0/59792373528535/199064865822552)
[Technical Design
Template](https://app.asana.com/0/59792373528535/184709971311943)
  • Loading branch information
dus7 authored Oct 29, 2024
1 parent c5aab0c commit 199de4d
Show file tree
Hide file tree
Showing 38 changed files with 35 additions and 1,920 deletions.
140 changes: 22 additions & 118 deletions DuckDuckGo.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

123 changes: 0 additions & 123 deletions DuckDuckGo/Base.lproj/Home.storyboard

This file was deleted.

14 changes: 4 additions & 10 deletions DuckDuckGo/FavoritesHomeViewSectionRenderer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ protocol FavoritesHomeViewSectionRendererDelegate: AnyObject {
favoriteDeleted favorite: BookmarkEntity)
}

class FavoritesHomeViewSectionRenderer: NSObject, HomeViewSectionRenderer {
class FavoritesHomeViewSectionRenderer {

struct Constants {

Expand All @@ -43,7 +43,8 @@ class FavoritesHomeViewSectionRenderer: NSObject, HomeViewSectionRenderer {
static let defaultHeaderHeight: CGFloat = 20
static let horizontalMargin: CGFloat = 2
static let largeModeMargin: CGFloat = 24

static let sideInsets: CGFloat = 25

}

let viewModel: FavoritesListInteracting
Expand Down Expand Up @@ -83,13 +84,6 @@ class FavoritesHomeViewSectionRenderer: NSObject, HomeViewSectionRenderer {
return Constants.defaultHeaderHeight
}

func install(into controller: HomeViewController) {
self.controller = controller
if numberOfItems > 0 {
controller.hideLogo()
}
}

func install(into controller: UIViewController & FavoritesHomeViewSectionRendererDelegate) {
self.controller = controller
}
Expand All @@ -103,7 +97,7 @@ class FavoritesHomeViewSectionRenderer: NSObject, HomeViewSectionRenderer {
if isPad {
margin = (collectionView.frame.width - Constants.searchWidthPad) / 2
} else {
let defaultMargin = HomeViewSectionRenderers.Constants.sideInsets
let defaultMargin = FavoritesHomeViewSectionRenderer.Constants.sideInsets
let landscapeMargin = (collectionView.frame.width - Constants.searchWidth + defaultMargin) / 2
margin = isPortrait ? defaultMargin : landscapeMargin
}
Expand Down
181 changes: 0 additions & 181 deletions DuckDuckGo/HomeCollectionView.swift

This file was deleted.

Loading

0 comments on commit 199de4d

Please sign in to comment.