Commit Graph

104 Commits (5ddce84b81a529e874db7ac64a2a1c43e9e31b93)

Author SHA1 Message Date
Tiger Oakes 113241e8ce
Enforce IO thread inside of components (#14704)
* Automatically run PermissionStorage on IO thread

* Run TabCollectionStorage on dedicated scope + IO

* Update findSitePermissionsBy calls
4 years ago
Tiger Oakes 0102e03d75
Add tests for collection creation (#13909) 4 years ago
Tiger Oakes 61d6b333de Update LongParameterList baseline 4 years ago
ekager 46511d6f8e For #10163 - Adds tab multiselect mode 4 years ago
Tiger Oakes 652af79e95
Migrate from Session.toTab to BrowserStore (#12221) 4 years ago
Kainalu Hagiwara 02a929a926 No issue - Suppress new warnings from detekt update 4 years ago
Tiger Oakes ac3df6bc5e
Add tests for adapters in collections (#12649) 4 years ago
Tiger Oakes 4f6f0785c5
For #11943: Fix intermittent coroutine failure (#12027) 4 years ago
Tiger Oakes 0b781ae3b7 Add tests for collection creation controller 4 years ago
Jeff Boek 52c2fdb310
Remove tab tray feature flag (#11176)
* For #11171 - Removes feature flag for the new tab tray

* For #11171 - Removes all tab references from homeFragment

* For #11171 - Fixes unit tests

* For #11171 - Gets UI tests to compile and HomeScreenTest to pass

* For #11171 - Fixes `deleteMultipleSelectionTest`

* For #11171 - Fixes `openHistoryItemInNewPrivateTabTest`

* For #11171 - Fixes `openHistoryInPrivateTabTest`

* For #11171 - Fixes `openHistoryInNewTabTest`

* For #11171 - Fixes `openNewPrivateTabTest`

* For #11171 - Fixes tabbedBrowsingTests

* For #11171 - Fixes SettingsPrivacyTest

* For #11171 - Fixes TopSitesTest

* For #11171 - Fixes lint errors

* Ignore
4 years ago
mcarare 5a23fb33f8 For #11182: Fix back button text update according to save step. 4 years ago
mcarare a910698007 For #11182: Set click listener also to icon button. 4 years ago
mcarare 29f1800021 For #11182: Explicitly clone select tabs on updating SaveCollectionStep. 4 years ago
mcarare 68286d263a For #11182: Set click listener to full layout instead of just icon. 4 years ago
Tiger Oakes 6317eea690 Add tests for some of collection creation 4 years ago
Jeff Boek 8662164b8a
Refactors the TabTrayDialogFragment to ditch that weird interactor (#11061)
* For #11056 - Removes unused argument when navigating to the collection creation fragment

* For #11056 - Moved the collection creation navigation logic to the TabTrayDialogFragment

* For #11056 - Moves navigating to the share screen from home/browser to the TabTrayDialogFragment

* For #11056 - We moved tab selection logic from home/browser to the tab tray dialog

* For #11056 - Moved new tab tapped logic to the tab tray dialog fragment

* For #11056 - Removes all interactor logic for the TabTrayDialogFragment

* For #11056 - Migrates the presentation / navigation around the TabTrayDialog to the androidx navigation library
4 years ago
mcarare a59917cdc0 For #9626: Swap margin for padding and remove use of touch delegate.
Also remove text margin to maintain visual appearance.
4 years ago
mcarare d706b085a9 For #9626: Delay cloning ConstraintSet to only when needed for updating. 4 years ago
ekager c4e83367f6 For #6832 - Fix various fragment not attached to a context crashes 4 years ago
Sebastian Kaspari 02aabea14a Update to new feature-media API. 4 years ago
ValentinTimisica 3647606aae Fixes #9280: Remove tabs fade in animation when pressing on Add new collection 4 years ago
ValentinTimisica 69e8a2f357 Fixes #4987: Remove close tabs functionality when they are added to a collection 4 years ago
ValentinTimisica a72d50d78f Fixes #7734: Remove animation for back button 4 years ago
ValentinTimisica 8871c05c9d Fixes #9243: Remove tabs fade in animation when pressing on Save to Collection 4 years ago
Harshal Lele e318cd7d15 fix #8135 - remove getColorFromAttr 4 years ago
Tiger Oakes 5faa22d611
Use createBlendModeColorFilterCompat (#8129) 4 years ago
David Walsh e727ae5d7e Fix 5366 - Use VectorDrawableCompat for all imagery (#7221)
* Fix 5366 - Use VectorDrawableCompat for all imagery

* Fix detekt lint issues

* Restore previous comment contents
5 years ago
Mihai Branescu c46bf84ac9 For #6330 Collections Numbering (#6453)
* For #6330 - Added logic for getting the recommended default collection name

* For #6330 - Added unit test for default collection number method
5 years ago
Gabriel 56b21426eb
For #5574 - Migrate SessionControl to LibState (#6651)
* For #5574 - Part 1: Port TabAction.SaveTabGroup to TabSessionInteractor and SessionControlController. (#6651)

- Introduces the TabSessionInteractor, SessionControlInteractor and SessionControlController classes.
- Removes the TabAction.SaveTabGroup.

* For #5574 - Part 2: Port TabAction.PrivateBrowsingLearnMore to TabSessionInteractor and SessionControlController (#6651)

* For #5574 - Part 3: Port TabAction.ShareTabs to TabSessionInteractor and SessionControlController (#6651)

* For #5574 - Part 4: Remove unused TabAction.Share and TabItemMenu (#6651)

In #2205, the tab overflow button was removed which would have shown the
TabItemMenu when clicked. So, we can remove TabItemMenu since it is not
used and as a result, we can also remove TabAction.Share since there are
no consumers.

* For #5574 - Part 5: Port TabAction.PlayMedia and TabAction.PauseMedia to TabSessionInteractor and SessionControlController (#6651)

* For #5574 - Part 6: Port TabAction.Select to TabSessionInteractor and SessionControlController (#6651)

* For #5574 - Part 7: Port Onboarding.Finish to OnboardingInteractor and SessionControlController (#6651)

* For #5574 - Part 8: Port TabAction.Close and TabAction.CloseAll to TabSessionInteractor and SessionControlController (#6651)

- Removes TabAction

* For #5574 - Part 9: Port CollectionAction.Delete to CollectionInteractor and SessionControlController (#6651)

* For #5574 - Part 10: Port CollectionAction.ShareTabs to CollectionInteractor and SessionControlController (#6651)

* For #5574 - Part 11: Port CollectionAction.AddTab and CollectionAction.Rename to CollectionInteractor and SessionControlController (#6651)

* For #5574 - Part 12: Port CollectionAction.RemoveTab to CollectionInteractor and SessionControlController (#6651)

* For #5574 - Part 13: Port CollectionAction.OpenTab to CollectionInteractor and SessionControlController (#6651)

* For #5574 - Part 14: Port CollectionAction.CloseTabs to CollectionInteractor and SessionControlController (#6651)

* For #5574 - Part 15: Introduce a HomeFragmentStore (#6651)

- We will hook up the HomeFragmentStore in later parts.
- Removes List<Tab>.toSessionBundle(context: Context) since it is unused.

* For #5574 - Part 16: Port CollectionAction.Collapse and CollectionAction.Expand to CollectionInteractor and SessionControlController (#6651)

- We assume the store is hooked up to the SessionControlController in this part,
but this work will be done in a later part.
- Removes CollectionAction.

* For #5574 - Part 20: Remove the architecture module. (#6651)

* For #5574 - Part 17:  Remove duplicate subscribeToTabCollections in BrowserFragment.kt (#6651)

There is a duplicate call of subscribeToTabCollections() in both HomeFragment and BrowserFragment.
In this patch, we remove the call in BrowserFragment to avoid passing the HomeFragmentStore to
BrowserFragment in order to dispatch the CollectionsChange event.

* For #5574 - Part 18: Delete SessionControlComponent and fix TabCollection and Tab imports (#6651)

* For #5574 - Part 19: Use the new HomeFragmentStore in the HomeFragment (#6651)

- Renames SessionControlUIView to SessionControlView

* For #5574 - Part 21: Fix white screen on home fragment (#6651)

* For #5574 - Part 22: Fix formatting in SessionControlInteractor and replace See with @see in SessionControlController (#6651)

* For #5574 - Part 23: Move to metrics.track call to the beginning of handleCollectionRemoveTab (#6651)

This ensures that the metrics.track will be called immediately before the tab is removed from the collection.

* For #5574 - Part 24: Use the sessionManager getter in SessionControlController (#6651)

* For #5574 - Part 25: Use mapNotNull in List<Tab>.toSessionBundle (#6651)

* For #5574 - Part 26: Simplify closeTab and closeAllTabs functions by assigning a deletionJob constant (#6651)

* For #5574 - Part 27: Replace listOf() with emptyList() in removeAllTabsWithUndo (#6651)

* For #5574 - Part 28: Replace the Context parameter with the HomeActivity in SessionControlController (#6651)

* For #5574 - Part 29: Add test for HomeFragmentStore, DefaultSessionControlController and SessionControlInteractor (#6651)

* For #5574 - Removes running CI against the architecture debug build varient
5 years ago
Tiger Oakes a5e9439c6e Clean up tracking protection fragment (#6532)
* Clean up exceptions fragment

* Clean up tracking protection fragment

* Move saved logins to list adapter
5 years ago
Severin Rudie 8d68317388
4844 fix url elision (#6588)
* For #4844: add test cases for url elision

* For 4844: implement toShortUrl to pass test cases

* For 4844: update plumbing to use toShortUrl

* For 4844: adds/handles suggested url elision test case
5 years ago
ValentinTimisica 34959a434f Fixes #6341: Initialize 'selectedTabs' based on opened/selected tabs.
The problem was that the parameter 'selectedTabIds' was not taken into account
when initializing the variable 'selectedTabs'. So I made the initialization
based on both the selected tab and the number of open tabs.
5 years ago
Chenxia Liu 41ee8a4efb For #6294 - When only one tab is being saved to collection, add it to selected tabs. 5 years ago
Severin Rudie aa8642f534
#4596 migrate collections (#5911)
* For #4596: move code from CollectionCreationComponent to CollectionCreationStore

Other than adding comments, no changes were made. The code will be updated in a following commit. This is in order to make the commit diff more readable.

* For 4596: update CollectionCreateStore to libstate

* For 4596: copied CollectionCreationUIView into CollectionCreationView

Otherwise, no code was changed. The next commit will update this code. This is in order to make the commit diff more readable.

* For 4596: update CollectionCreationView to LibState

Note that the minimal changes possible to enable migration were made.  Refactoring will happen in a later commit.

* For 4596: updated CollectionCreationTabListAdapter to work with the new View

* For 4596: updated SaveCollectionListAdapter to work with the new View

* For 4596: implemented CollectionCreationController

For now, it has an identical interface to the interactor. In a later commit several of its responsibilities will be moved around, some to the interactor and some to the reducer

* For 4596: copied over previous reducer code

No other changes were made. The code will be updated in the following commit. This is done to make changes more readable for the reviewer

* For 4596: update reducer code param names

Otherwise, no changes at this time

* For 4596: add arguments to CreateCollectionFragment in nav_graph

These will be used to replace the current CreateCollectionViewModel, which shares data between fragments in a way that doesn't fit within our architecture.

* For 4596: pass arguments to collection via transaction instead of VM

The VM will be removed in a later commit

* For 4596: update BrowserToolbarController to share state to collection via its Direction

* For 4596: removed CreateCollectionViewModel

* For 4596: test tab retrieval in CreateCollectionFragment

* For 4596: fix crashing CreateCollectionFragmentTest

* For 4596: removed classes create collection classes used by old architecture

* For 4596: collection interactor rename + kdoc

* For 4596: moved collection interactor interface

* For 4596: renamed CreateCollectionFragment

All related classes followed the pattern of CollectionCreationX

* For 4596: kdoc CollectionCreationController

There's no effective difference between these calls and their interactor equivalent, so I linked to them

* For 4596: fix bug that caused rename to not work

* For 4596: removed unused collection actions

These were unused before the LibState refactor

* For 4596: kdoc StepChanged

* For 4596: removed todos about moving logic to the reducer

saveTabsToCollection: this could be moved, but that would involve creating a new action. SaveCollectionStep should probably be refactored out, so adding this layer of indirection seemed counterproductive

handleBackPress: needs to be able to call dismiss(). The reducer doesn't (and shouldn't) be able to do that, so this needs to live here

stepBack: called by handleBackPress. See above

* For 4596: wrote tests for CollectionCreationController#stepback

* For 4596: fixed tests broken by changes to collections

* For 4596: small readability refactor for CollectionController#stepBack

No change to functionality (see tests)

* For 4596: broke apart CollectionView#update

There's probably a lot more that could be done here, but smaller changes were made to reduce scope

* For 4596: remove unnecessary todos

It looks like we don't follow the suggested pattern in this project

* For 4596: test CollectionCreationController#normalSessionSize

* For 4596: updated naming in CollectionCreationController per review
5 years ago
mihai-adrian ef4a6b4154 For #4877: Restored logic for closing tabs when not on browserFragment
Added return in function when saving collections coming from browser fragment
5 years ago
Colin Lee 709588572a
For #5055: Crash when opening bookmarks (#5058) 5 years ago
Jeff Boek 68f5d211d3 For #4326 - Updates codebase to support latest version of detekt 5 years ago
Tiger Oakes ac6c1ec2ee Closes #2690 - Clean up CreateCollection viewmodel (#4731) 5 years ago
Sawyer Blatz 4731977f5d
For #4421: Fixes issues with new glean events (#4816) 5 years ago
Jorge De Los Santos 337ad1e88e For #3424 - Make talkback ignore ImageButton in Collection Sele… (#3792)
For #3424 - Make talkback ignore ImageButton in Collection Selection by removing contentDescription and setting importantForAccessibility=no
5 years ago
Colin Lee ef97173cd9
For #4529, #4427: Resuming after restoring instance state breaks UI (#4571)
* For #4529, #4427: Resuming after restoring instance state breaks UI

* Clear up warnings
5 years ago
Sawyer Blatz 9d65e665e5 No issue: Removes deprecated usage of ViewModelProviders 5 years ago
Nikit Bhandari 671727c3e8 For #4341 use camelCase for views referenced from code 5 years ago
Nikit Bhandari 46de06d132 For #4339 reduce build warnings (#4340) 5 years ago
mihai-adrian 458632f4bf fixes #4237 - Cannot edit the default name of a collection, only replace it
changed setting of text to be done before transition, preventing transition to make textView unclickable;
 added renaming situation to showKeyboard in onResume();
 changed title text when renaming, from: "Name collection" to "Rename collection".
5 years ago
mihai-adrian ef3c813aee fixes #4237 - Cannot edit the default name of a collection, only replace it
changed setting of text to be done before transition, preventing transition to make textView unclickable;
 added renaming situation to showKeyboard in onResume();
 changed title text when renaming, from: "Name collection" to "Rename collection".
5 years ago
mihai-adrian 2e300fc8cf fixes #4237 - Cannot edit the default name of a collection, only replace it
made name_collection_edittext field clickable
5 years ago
Tiger Oakes 88c05a5f43 Use glide-like image loading function 5 years ago
Nikit Bhandari 9d9685625a For #4201 fix app crash on renaming a collection (#4202)
* For #4201 fix app crash on renaming a collection

* update
5 years ago
Sawyer Blatz 13198f56df For #969: Adds telemetry for collections (#3935) 5 years ago