Skip to content

Commit

Permalink
Delete Christmas Wishlist feature (#1376)
Browse files Browse the repository at this point in the history
  • Loading branch information
ninarg authored Aug 30, 2024
1 parent c47bd1e commit 9932188
Show file tree
Hide file tree
Showing 41 changed files with 6 additions and 912 deletions.
12 changes: 0 additions & 12 deletions Demo/Demo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@
46E7740A242CEF0A008A5E93 /* RoundedImageViewDemoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46E772FD242CEF09008A5E93 /* RoundedImageViewDemoView.swift */; };
46E7740C242CEF0A008A5E93 /* LoadingIndicatorViewDemoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46E77301242CEF09008A5E93 /* LoadingIndicatorViewDemoView.swift */; };
46E7740D242CEF0A008A5E93 /* FeedbackDemoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46E77303242CEF09008A5E93 /* FeedbackDemoView.swift */; };
46E7740E242CEF0A008A5E93 /* ChristmasWishListDemoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46E77305242CEF09008A5E93 /* ChristmasWishListDemoView.swift */; };
46E7740F242CEF0A008A5E93 /* CalloutDemoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46E77307242CEF09008A5E93 /* CalloutDemoView.swift */; };
46E77410242CEF0A008A5E93 /* RibbonDemoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46E77309242CEF09008A5E93 /* RibbonDemoView.swift */; };
46E77411242CEF0A008A5E93 /* ViewingsListDemoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46E7730B242CEF09008A5E93 /* ViewingsListDemoView.swift */; };
Expand Down Expand Up @@ -289,7 +288,6 @@
46E772FD242CEF09008A5E93 /* RoundedImageViewDemoView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RoundedImageViewDemoView.swift; sourceTree = "<group>"; };
46E77301242CEF09008A5E93 /* LoadingIndicatorViewDemoView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LoadingIndicatorViewDemoView.swift; sourceTree = "<group>"; };
46E77303242CEF09008A5E93 /* FeedbackDemoView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FeedbackDemoView.swift; sourceTree = "<group>"; };
46E77305242CEF09008A5E93 /* ChristmasWishListDemoView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChristmasWishListDemoView.swift; sourceTree = "<group>"; };
46E77307242CEF09008A5E93 /* CalloutDemoView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CalloutDemoView.swift; sourceTree = "<group>"; };
46E77309242CEF09008A5E93 /* RibbonDemoView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RibbonDemoView.swift; sourceTree = "<group>"; };
46E7730B242CEF09008A5E93 /* ViewingsListDemoView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewingsListDemoView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -738,7 +736,6 @@
46E7731F242CEF09008A5E93 /* Button */,
46E77306242CEF09008A5E93 /* Callout */,
46E77356242CEF09008A5E93 /* CheckmarkTitleView */,
46E77304242CEF09008A5E93 /* ChristmasWishList */,
46E7731D242CEF09008A5E93 /* CollapsibleContentView */,
46E77316242CEF09008A5E93 /* ColumnListsView */,
46E77326242CEF09008A5E93 /* Consent */,
Expand Down Expand Up @@ -983,14 +980,6 @@
path = Feedback;
sourceTree = "<group>";
};
46E77304242CEF09008A5E93 /* ChristmasWishList */ = {
isa = PBXGroup;
children = (
46E77305242CEF09008A5E93 /* ChristmasWishListDemoView.swift */,
);
path = ChristmasWishList;
sourceTree = "<group>";
};
46E77306242CEF09008A5E93 /* Callout */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -1851,7 +1840,6 @@
5DCE0885280FDF2A00ED7407 /* MonthAndYearPickerDemoView.swift in Sources */,
46E77440242CEF0A008A5E93 /* SpacingDemoView.swift in Sources */,
5DEAC3C425C164D9003376AD /* IconButtonDemoView.swift in Sources */,
46E7740E242CEF0A008A5E93 /* ChristmasWishListDemoView.swift in Sources */,
46E7742D242CEF0A008A5E93 /* PrimingDemoView.swift in Sources */,
46E77436242CEF0A008A5E93 /* QuestionnaireDefaultData.swift in Sources */,
46E77428242CEF0A008A5E93 /* ReviewButtonViewDemoView.swift in Sources */,
Expand Down
4 changes: 0 additions & 4 deletions Demo/SnapshotTests/ComponentViewTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,6 @@ class ComponentViewTests: XCTestCase {
snapshot(.visibilityDrivenTitleView)
}

func testChristmasWishListView() {
snapshot(.christmasWishListView)
}

func testPriming() {
snapshot(.priming)
}
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This file was deleted.

3 changes: 0 additions & 3 deletions Demo/Sources/Demo/DemoViews/ComponentDemoViews.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ enum ComponentDemoViews: String, CaseIterable, DemoGroup, DemoGroupItem {
case callout
case checkbox
case checkmarkTitleView
case christmasWishListView
case cogWheelButton
case collapsibleContentView
case columnListsView
Expand Down Expand Up @@ -157,8 +156,6 @@ enum ComponentDemoViews: String, CaseIterable, DemoGroup, DemoGroupItem {
return FeedbackDemoView()
case .happinessRating:
return HappinessRatingDemoView()
case .christmasWishListView:
return ChristmasWishListDemoView()
case .nativeAdvert:
return NativeAdvertDemoView()
case .callout:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ class FavoriteAdsListDemoView: UIView {
view.title = folderTitle
view.subtitle = "\(viewModels.count) favoritter"
view.sortingTitle = currentSorting.rawValue
view.isFooterShareButtonHidden = true
view.configure(scrollShadowHeight: 44)
return view
}()
Expand Down Expand Up @@ -94,7 +93,6 @@ extension FavoriteAdsListDemoView: TweakableDemo {
case sharedPersonalFolder
case readOnlyFolderDefaultModels
case readOnlyFolderNoFavorites
case footerShareButton
}

var numberOfTweaks: Int { Tweaks.allCases.count }
Expand All @@ -112,13 +110,11 @@ extension FavoriteAdsListDemoView: TweakableDemo {
setReadOnly(false)
favoritesListView.setEditing(false)
resetHeader()
favoritesListView.isFooterShareButtonHidden = true
case .selectionModeWithMessages:
resetViewModels()
setReadOnly(false)
favoritesListView.setEditing(false)
resetHeader()
favoritesListView.isFooterShareButtonHidden = true
favoritesListView.configure(infoMessages: [
.message(
"This is a single demo message. It's kinda long, but it should still present as needed",
Expand All @@ -136,52 +132,39 @@ extension FavoriteAdsListDemoView: TweakableDemo {
favoritesListView.setEditing(false)
resetHeader()
setTitle("Veldig langt navn, ganske nøyaktig 50 tegn faktisk")
favoritesListView.isFooterShareButtonHidden = true
case .emptyFolder:
setReadOnly(false)
setViewModels([])
favoritesListView.setEditing(false)
resetHeader()
favoritesListView.isFooterShareButtonHidden = true
case .editModeNoneSelected:
resetViewModels()
setReadOnly(false)
favoritesListView.setEditing(true)
favoritesListView.selectAllRows(false, animated: false)
resetHeader()
favoritesListView.isFooterShareButtonHidden = true
case .editModeAllSelected:
resetViewModels()
setReadOnly(false)
favoritesListView.setEditing(true)
favoritesListView.selectAllRows(true, animated: false)
resetHeader()
favoritesListView.isFooterShareButtonHidden = true
case .sharedPersonalFolder:
resetViewModels()
setReadOnly(false)
favoritesListView.setEditing(false)
resetHeader()
favoritesListView.isShared = true
favoritesListView.isFooterShareButtonHidden = true
case .readOnlyFolderDefaultModels:
resetViewModels()
setReadOnly(true)
favoritesListView.setEditing(false)
resetHeader()
favoritesListView.isFooterShareButtonHidden = true
case .readOnlyFolderNoFavorites:
setViewModels([])
setReadOnly(true)
favoritesListView.setEditing(false)
resetHeader()
favoritesListView.isFooterShareButtonHidden = true
case .footerShareButton:
resetViewModels()
setReadOnly(false)
favoritesListView.setEditing(false)
resetHeader()
favoritesListView.isFooterShareButtonHidden = false
}
}
}
Expand Down Expand Up @@ -284,7 +267,6 @@ extension FavoriteAdsListViewModel {
static let `default` = FavoriteAdsListViewModel(
searchBarPlaceholder: "Søk etter en av dine favoritter",
headerShareButtonTitle: "Delt liste",
footerShareButtonTitle: "Del ønskelisten din",
addCommentActionTitle: "Skriv\nnotat",
editCommentActionTitle: "Rediger\nnotat",
deleteAdActionTitle: "Slett",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ extension FavoriteFoldersListDemoView: TweakableDemo {
enum Tweaks: String, CaseIterable, TweakingOption {
case toggleMode
case editMode
case xmasButton
}

var shouldSnapshotTweaks: Bool { false }
Expand All @@ -70,15 +69,10 @@ extension FavoriteFoldersListDemoView: TweakableDemo {
isEditing = false
allFavorites = FavoriteFoldersFactory.create()
view.setEditing(false)
view.hideXmasButton()
case .editMode:
isEditing = true
allFavorites = FavoriteFoldersFactory.create(withSelectedItems: false)
view.setEditing(true)
view.hideXmasButton()
case .xmasButton:
let text = "Tips! Nå kan du endelig opprette og dele din egen juleønskeliste! Her er i såfall knappen for å gjøre det! God jul!"
view.showXmasButton(withCalloutText: text)
}
}
}
Expand Down Expand Up @@ -116,10 +110,6 @@ extension FavoriteFoldersListDemoView: FavoriteFoldersListViewDelegate {
func favoriteFoldersListViewDidFocusSearchBar(_ view: FavoriteFoldersListView) {
// Set bottomSheet to expanded here, if needed.
}

func favoriteFoldersListViewDidSelectXmasButton(_ view: FavoriteFoldersListView) {
view.hideXmasButton()
}
}

// MARK: - FavoriteFoldersListViewDataSource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ struct FavoriteFolder: FavoriteFolderViewModel {
let subtitle: String?
let imagePath: String?
let isDefault: Bool
let isXmas: Bool
let detailText: String? = "23 annonser"
let cornerRadius: CGFloat = 12
let imageViewWidth: CGFloat = 40
Expand All @@ -23,14 +22,13 @@ struct FavoriteFoldersFactory {
var favorites = [FavoriteFolder]()

for (index, (title, imagePath)) in zip(titles, imagePaths).enumerated() {
let isSelected = withSelectedItems ? [1, 2].contains(index) : false
let isSelected = withSelectedItems ? [0, 1].contains(index) : false
let folder = FavoriteFolder(
id: index,
title: title,
subtitle: index == 2 ? "Delt liste" : nil,
subtitle: index == 1 ? "Delt liste" : nil,
imagePath: imagePath,
isDefault: index == 1,
isXmas: index == 0,
isDefault: index == 0,
isSelected: isSelected
)

Expand All @@ -42,7 +40,6 @@ struct FavoriteFoldersFactory {

private static var titles: [String] {
return [
"Mine julegaveønsker",
"Mine funn",
"We accept up to 50 characters for a folder's name",
"Mansion",
Expand Down
Loading

0 comments on commit 9932188

Please sign in to comment.