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

Tab Switcher Animation: Add real tracker count #5723

Open
wants to merge 6 commits into
base: feature/mike/tab-switcher-tile-animation/add-animated-tile-placeholder
Choose a base branch
from

Conversation

mikescamell
Copy link
Contributor

@mikescamell mikescamell commented Mar 3, 2025

Task/Issue URL: https://app.asana.com/0/488551667048375/1209368500700765

Description

Replaced random tracker count with actual tracker data from the past 7 days in the tab switcher animation tile. The tracker count is now fetched from the WebTrackersBlockedAppRepository instead of generating random numbers.

Steps to test this PR

Tab Switcher Tracker Count

  • Open the tab switcher
  • Verify the tracker count shown matches the actual number of trackers blocked in the last 7 days
  • Verify the tracker animation tile displays correctly in both grid and list views

Demo

(Tablet omitted as only count has changed)

Screen_recording_20250303_180553.mp4

Copy link
Contributor Author

mikescamell commented Mar 3, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@mikescamell mikescamell force-pushed the feature/mike/tab-switcher-tile-animation/add-animated-tile-placeholder branch from a4c9e80 to 6150c8f Compare March 3, 2025 16:23
@mikescamell mikescamell force-pushed the feature/mike/tab-switcher-tile-animation/display-real-tracker-count branch from 6dbb1d4 to 753e562 Compare March 3, 2025 16:23
@mikescamell mikescamell changed the base branch from feature/mike/tab-switcher-tile-animation/add-animated-tile-placeholder to graphite-base/5723 March 3, 2025 16:27
@mikescamell mikescamell force-pushed the feature/mike/tab-switcher-tile-animation/display-real-tracker-count branch from 753e562 to f4309c1 Compare March 3, 2025 17:47
@mikescamell mikescamell changed the base branch from graphite-base/5723 to feature/mike/tab-switcher-tile-animation/add-animated-tile-placeholder March 3, 2025 17:47
@mikescamell mikescamell marked this pull request as ready for review March 3, 2025 18:01
@mikescamell mikescamell changed the title Tab Switcher Tile Animation: Add real tracker count Tab Switcher Animation: Add real tracker count Mar 3, 2025
@mikescamell mikescamell force-pushed the feature/mike/tab-switcher-tile-animation/display-real-tracker-count branch from f4309c1 to c5263f4 Compare March 4, 2025 14:23
@mikescamell mikescamell force-pushed the feature/mike/tab-switcher-tile-animation/add-animated-tile-placeholder branch from e4fd0fa to 2e13d0c Compare March 4, 2025 14:23
@mikescamell mikescamell changed the base branch from feature/mike/tab-switcher-tile-animation/add-animated-tile-placeholder to graphite-base/5723 March 6, 2025 16:46
@mikescamell mikescamell force-pushed the feature/mike/tab-switcher-tile-animation/display-real-tracker-count branch from c5263f4 to b005223 Compare March 6, 2025 17:16
@mikescamell mikescamell changed the base branch from graphite-base/5723 to feature/mike/tab-switcher-tile-animation/add-animated-tile-placeholder March 6, 2025 17:17
… and WebTrackersBlockedDao

Not adding the public API yet as it's an experiment and there's a chance we kill it
This commit refactors the Tab Switcher to display the tracker animation tile with the actual tracker count.

*   The `TabSwitcherViewModel` now uses `liveData` instead of `map` to emit the list of `TabSwitcherItem`.
*   The `TabSwitcherViewModel` now uses a `switchMap` operator to emit the `tabSwitcherItems` live data which allows us to call the getTrackersCountBetween suspending function
*   The `TabSwitcherViewModel` now creates the tracker animation tile using the real number of trackers blocked in the last 7 days, retrieved using the `WebTrackersBlockedAppRepository`.
* The `TabSwitcherAdapter` now takes the actual tracker count from the `TabSwitcherItem.TrackerAnimationTile` to show in the view.
* Removed the random tracker count generation from the adapter.
@mikescamell mikescamell force-pushed the feature/mike/tab-switcher-tile-animation/display-real-tracker-count branch from b005223 to 4fe8ab9 Compare March 6, 2025 18:07
@mikescamell mikescamell force-pushed the feature/mike/tab-switcher-tile-animation/add-animated-tile-placeholder branch from f8fd101 to 0f66c87 Compare March 6, 2025 18:08
@0nko 0nko self-assigned this Mar 7, 2025
Copy link
Member

@0nko 0nko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, nice work! 🥇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants