-
Notifications
You must be signed in to change notification settings - Fork 949
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 show/hide behaviour #5729
Draft
mikescamell
wants to merge
22
commits into
feature/mike/tab-switcher-tile-animation/translations
Choose a base branch
from
feature/mike/tab-switcher-tile-animation/add-show-hide-logic
base: feature/mike/tab-switcher-tile-animation/translations
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Tab Switcher Animation: Add show/hide behaviour #5729
mikescamell
wants to merge
22
commits into
feature/mike/tab-switcher-tile-animation/translations
from
feature/mike/tab-switcher-tile-animation/add-show-hide-logic
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Mar 4, 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.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
c08e5e9
to
684efba
Compare
6b63d29
to
a5c2d0d
Compare
684efba
to
6f1378c
Compare
Allows to reshow the animation without having to uninstall and reinstall
We only show if you have 10 trackers or more Next we'll check the tab count
6f1378c
to
cf82097
Compare
a5c2d0d
to
faeee79
Compare
…de based on tab count Only show if we have 2 or more tabs open Next we'll extract this logic out
The logic for determining the visibility of the Tracker Animation Tile has been moved to a new `TabSwitcherTileAnimationMonitor` class. This includes: - Determining the tracker count in the last 7 days. - Determining the number of open tabs. - Checking if the animation tile is dismissed. - Defining the minimum requirements for displaying the tile (minimum tracker count and minimum tab count). The `WebTrackersBlockedAppRepository` has been updated to have a new public method to retrieve the number of tracker count for last 7 days. The `TabSwitcherViewModel` was refactored to use the new `TabSwitcherTileAnimationMonitor` and the `observeAnimationTileVisibility` function. The `createTrackerAnimationTile` and `getTrackerCountForLast7Days` were deleted.
- Adds a new state to track if the animation tile has been seen. - Modifies the logic for displaying the animation tile to include the new state. - The animation tile will show if NOT dismissed but already seen, even if we have less than 2 tabs
We want the text in the Animation tile to match the text in the tabs.
This change ensures that the dismissed state of the tab animation tile is cleared when user clears app data. It adds the `TabSwitcherAnimationFeature` and `TabSwitcherPrefsDataStore` dependencies to the `ClearPersonalDataAction`. When `clearPersonalData` is called, it now also checks if the animation feature is enabled and clears the `isDismissed` flag accordingly.
cf82097
to
2603460
Compare
Makes it much easier to test. Renamed the text to make it clear we're resetting as the new logic for showing/hiding determines whether you will see it.
…clear We've decided to reset the tile if a user clears data as it's done so often that they might not see the tile much
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Task/Issue URL: https://app.asana.com/0/1207908166761516/1209368500700767
Description
Added show/hide logic for the animated tile. The tile appears when users have blocked at least 10 trackers and have 2 or more tabs open.
Once visible the tile does not get removed unless:
Once dismissed, the tile will not reappear until explicitly re-enabled or reset through dev settings.
Steps to test this PR
Pre-requisites:
tabSwitcherAnimation
feature toggle is turned onTab Switcher Animated Tile Showing
Tab Switcher Animated Tile Stays Visible Once Seen
Tab Switcher Animated Tile Dismissal
Tab Switcher Animated Tile Clearing Data
Tab Switcher Animated Tile Show Again
Tab Switcher Animated Tile Close All Tabs
Demo
Screen_recording_20250307_190356.mp4