Skip to content
This repository has been archived by the owner on Feb 24, 2025. It is now read-only.

Commit

Permalink
Revert "pixels for bookmarks > favorites tab (#3572)" (#3803)
Browse files Browse the repository at this point in the history
Task/Issue URL:
https://app.asana.com/0/392891325557410/1208736944745857/f
Tech Design URL:
CC:

**Description**:
This reverts commit 95897a7 as the
pixels are no longer required.

**Steps to test this PR**:
1. Build and run the app.
2. Open bookmarks manager and tap on favorites view and smoke test it.
brindy authored Jan 17, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 2b31aaa commit 6712a90
Showing 3 changed files with 1 addition and 19 deletions.
6 changes: 0 additions & 6 deletions Core/PixelEvent.swift
Original file line number Diff line number Diff line change
@@ -216,9 +216,6 @@ extension Pixel {
case bookmarkAddFavoriteBySwipe
case bookmarkDeletedFromBookmark

case bookmarksUIFavoritesAction
case bookmarksUIFavoritesManage

case bookmarkImportSuccess
case bookmarkImportFailure
case bookmarkImportFailureParsingDL
@@ -1105,9 +1102,6 @@ extension Pixel.Event {
case .bookmarkAddFavoriteBySwipe: return "m_add_favorite_by_swipe"
case .bookmarkDeletedFromBookmark: return "m_bookmark_deleted_from_bookmark"

case .bookmarksUIFavoritesAction: return "m_bookmarks_ui_favorites_action_daily"
case .bookmarksUIFavoritesManage: return "m_bookmarks_ui_favorites_manage_daily"

case .homeScreenShown: return "mh"
case .homeScreenEditFavorite: return "mh_ef"
case .homeScreenDeleteFavorite: return "mh_df"
4 changes: 0 additions & 4 deletions DuckDuckGo/BookmarksViewController.swift
Original file line number Diff line number Diff line change
@@ -787,10 +787,6 @@ class BookmarksViewController: UIViewController, UITableViewDelegate {
changeEditButtonToDone()
configureToolbarMoreItem()
refreshFooterView()

if !favoritesContainer.isHidden {
DailyPixel.fireDaily(.bookmarksUIFavoritesManage)
}
}

private func finishEditing() {
10 changes: 1 addition & 9 deletions DuckDuckGo/FavoritesHomeViewSectionRenderer.swift
Original file line number Diff line number Diff line change
@@ -156,7 +156,6 @@ class FavoritesHomeViewSectionRenderer {
guard let indexPath = collectionView.indexPath(for: cell),
let favorite = viewModel.favorite(at: indexPath.row) else { return }
Pixel.fire(pixel: .homeScreenDeleteFavorite)
fireActionPixel()
viewModel.removeFavorite(favorite)
WidgetCenter.shared.reloadAllTimelines()
collectionView.performBatchUpdates {
@@ -169,7 +168,6 @@ class FavoritesHomeViewSectionRenderer {
guard let indexPath = collectionView.indexPath(for: cell),
let favorite = viewModel.favorite(at: indexPath.row) else { return }
Pixel.fire(pixel: .homeScreenEditFavorite)
fireActionPixel()
controller?.favoritesRenderer(self, didRequestEdit: favorite)
}

@@ -274,7 +272,7 @@ class FavoritesHomeViewSectionRenderer {
let dragItem = coordinator.items.first?.dragItem,
let sourcePath = coordinator.items.first?.sourceIndexPath,
let destinationPath = coordinator.destinationIndexPath,
let cell = collectionView.cellForItem(at: sourcePath) as? FavoriteHomeCell,
let cell = self.collectionView(collectionView, cellForItemAt: sourcePath) as? FavoriteHomeCell,
let favorite = cell.favorite
else { return }

@@ -287,7 +285,6 @@ class FavoritesHomeViewSectionRenderer {

coordinator.drop(dragItem, toItemAt: destinationPath)

fireActionPixel()
}

func collectionView(_ collectionView: UICollectionView, itemsForBeginning session: UIDragSession, at indexPath: IndexPath) -> [UIDragItem] {
@@ -317,9 +314,4 @@ class FavoritesHomeViewSectionRenderer {
return UICollectionViewDropProposal(operation: .move, intent: .insertAtDestinationIndexPath)
}

/// Actions are only available from the bookmarks UI, so this is safe to send from here.
func fireActionPixel() {
DailyPixel.fire(pixel: .bookmarksUIFavoritesAction)
}

}

0 comments on commit 6712a90

Please sign in to comment.