Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "pixels for bookmarks > favorites tab (#3572)" #3803

Merged
merged 2 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions Core/PixelEvent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,6 @@ extension Pixel {
case bookmarkAddFavoriteBySwipe
case bookmarkDeletedFromBookmark

case bookmarksUIFavoritesAction
case bookmarksUIFavoritesManage

case bookmarkImportSuccess
case bookmarkImportFailure
case bookmarkImportFailureParsingDL
Expand Down Expand Up @@ -1111,9 +1108,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"
Expand Down
4 changes: 0 additions & 4 deletions DuckDuckGo/BookmarksViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -787,10 +787,6 @@ class BookmarksViewController: UIViewController, UITableViewDelegate {
changeEditButtonToDone()
configureToolbarMoreItem()
refreshFooterView()

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

private func finishEditing() {
Expand Down
10 changes: 1 addition & 9 deletions DuckDuckGo/FavoritesHomeViewSectionRenderer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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)
}

Expand Down Expand Up @@ -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 }

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

coordinator.drop(dragItem, toItemAt: destinationPath)

fireActionPixel()
}

func collectionView(_ collectionView: UICollectionView, itemsForBeginning session: UIDragSession, at indexPath: IndexPath) -> [UIDragItem] {
Expand Down Expand Up @@ -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)
}

}
Loading