1
0
Fork 0
Commit Graph

79 Commits (15ff4726a0a90d7be7a89f60e706d543b969ab99)

Author SHA1 Message Date
Tiger Oakes 5faa22d611
Use createBlendModeColorFilterCompat (#8129) 2020-02-06 11:18:08 -08:00
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
2019-12-16 20:35:36 -08:00
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
2019-12-10 12:10:01 -08:00
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
2019-12-04 22:06:05 -05:00
Tiger Oakes a5e9439c6e Clean up tracking protection fragment (#6532)
* Clean up exceptions fragment

* Clean up tracking protection fragment

* Move saved logins to list adapter
2019-11-22 10:38:13 -05:00
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
2019-11-15 14:25:50 -08:00
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.
2019-10-31 16:22:14 -07:00
Chenxia Liu 41ee8a4efb For #6294 - When only one tab is being saved to collection, add it to selected tabs. 2019-10-29 11:27:51 -07:00
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
2019-10-22 17:33:54 -07:00
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
2019-09-10 21:42:16 -07:00
Colin Lee 709588572a
For #5055: Crash when opening bookmarks (#5058) 2019-08-31 17:41:50 -05:00
Jeff Boek 68f5d211d3 For #4326 - Updates codebase to support latest version of detekt 2019-08-21 13:50:51 -07:00
Tiger Oakes ac6c1ec2ee Closes #2690 - Clean up CreateCollection viewmodel (#4731) 2019-08-20 10:45:41 -07:00
Sawyer Blatz 4731977f5d
For #4421: Fixes issues with new glean events (#4816) 2019-08-19 14:49:48 -07:00
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
2019-08-12 11:49:25 -04:00
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
2019-08-08 11:05:01 -05:00
Sawyer Blatz 9d65e665e5 No issue: Removes deprecated usage of ViewModelProviders 2019-08-07 19:21:41 -04:00
Nikit Bhandari 671727c3e8 For #4341 use camelCase for views referenced from code 2019-08-03 09:25:55 -07:00
Nikit Bhandari 46de06d132 For #4339 reduce build warnings (#4340) 2019-07-31 11:43:49 -07:00
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".
2019-07-30 16:26:10 -04:00
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".
2019-07-30 16:26:10 -04:00
mihai-adrian 2e300fc8cf fixes #4237 - Cannot edit the default name of a collection, only replace it
made name_collection_edittext field clickable
2019-07-30 16:26:10 -04:00
Tiger Oakes 88c05a5f43 Use glide-like image loading function 2019-07-29 10:22:23 -07:00
Nikit Bhandari 9d9685625a For #4201 fix app crash on renaming a collection (#4202)
* For #4201 fix app crash on renaming a collection

* update
2019-07-22 10:31:00 -07:00
Sawyer Blatz 13198f56df For #969: Adds telemetry for collections (#3935) 2019-07-18 16:05:42 -07:00
Tiger Oakes 6da6ddb095 Use StateListDrawable & resources w/ TabCollection 2019-07-18 15:29:06 -04:00
Tiger Oakes ef8d9604ae No issue: Normalize license header comment (#3909) 2019-07-12 11:38:15 -07:00
Tiger Oakes 8cd1a0cb38 Move adapter Job setup code to helper class (#3407) 2019-07-01 13:34:25 -05:00
Sawyer Blatz 7e46e71d00 For #3005: Closes tabs when saving to collection (#3723) 2019-07-01 11:39:48 -05:00
Tiger Oakes 4994554576 No issue: Adds lint exception for when statement (#3685) 2019-06-26 15:52:24 -07:00
Tiger Oakes 30930cdc88 Import variables referred to by path 2019-06-25 13:57:34 -07:00
Tiger Oakes d01bb8c442 Use lifecycleScope for collections fragments 2019-06-25 13:56:15 -07:00
vmbaicu 021900e7ad Fixes #3527 - Set Collection name max length (#3531) 2019-06-24 13:58:04 -07:00
Nikit Bhandari cfefc5632b For #3489: Disables blank collection names (#3490) 2019-06-24 13:44:02 -07:00
Emily Kager 6bd9b82385 No issue: Remove flash of tab adapter updating data in create collection 2019-06-14 11:01:54 -07:00
Emily Kager e28277693b Closes #3428 - Make + in collection creation selection stage clickable 2019-06-13 22:37:47 -07:00
Emily Kager 8b4c2db4e4 For #3433 - Add checkbox hide changes to change payload 2019-06-13 13:01:44 -07:00
Emily Kager edc1422b68 For #3288 - call setChecked after calling setOnCheckedChangeListener (#3357) 2019-06-11 16:38:32 -05:00
Sawyer Blatz decacbfc97 For #3323 Runs PublicSuffixList synchronously 2019-06-11 09:19:51 -07:00
Nikit Bhandari d814e95794 fix crash on renaming a collection 2019-06-08 06:44:15 -07:00
Sawyer Blatz 45c509fbce
For #2648: Updates trimming of url hostname (#3191)
* For #2648: Updates trimming of url hostname

* For #2648: Fix nits
2019-06-07 09:33:07 -07:00
Emily Kager 7368a95d29 No issue: Sets up observers for tab collection changes (#3248) 2019-06-07 09:45:38 -05:00
ekager 87f6268816 For #3101 - Do not show tab selection screen for 1 tab 2019-06-04 10:08:43 -07:00
Emily Kager 0327b1146b For #2977 - Update add new collections flow (#2991)
* For #2977 - Update add new collections flow

* Rename shared elements to be more general

* Make tab list not clickable in other modes

* For #2577 - Stop Flickering in List

* Add extensions function for next step with collections list size
2019-05-31 12:59:51 -05:00
Sawyer Blatz 9e0e5d95d9 For #2931: Show browser snackbar above quick action sheet 2019-05-30 14:52:09 -07:00
Sawyer Blatz 6a53127ef9 For #2948: Adds menu button add tab to collection 2019-05-29 09:08:11 -07:00
Emily Kager 1ef85433b4 For #2891 - Make checkbox invisible so text isn't cut off 2019-05-28 20:57:02 -07:00
Emily Kager a6a72885d2 For #2898 - Adds Deselect All in Collection Creation Select Tabs Step 2019-05-28 14:58:16 -07:00
Harsh Shandilya 7d9c8726c5 treewide: Resolve compilation warnings (#2859)
Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
2019-05-27 19:04:17 +02:00
Emily Kager 01c9317be0 For #2843 - Improve Collections UI and UX (#2851) 2019-05-24 17:06:17 -07:00