1
0
Fork 0
Commit Graph

56 Commits (d0e9f1f1654d60d2b056f488d6ac84dc39b268c5)

Author SHA1 Message Date
Tiger Oakes d0e9f1f165
Update Kotlin dependency (#10806) 2020-07-15 18:02:58 -07:00
Tiger Oakes 69020a1f26
For #12457 - Add MockK matcher for nav directions (#12262) 2020-07-14 10:39:23 -07:00
Sebastian Kaspari a2a7b11425 Issue #12311: BrowserToolbarController: Stop SessionFeature and release session from EngineView. 2020-07-09 12:36:56 -04:00
ekager 60069395eb Update AC to 48.0.20200627130132 and fix breaking changes 2020-06-27 20:11:31 -04:00
Mihai Branescu 632b64971f For #10467 - removed unused tests and resources related to blue dot notification 2020-06-24 21:33:32 -04:00
Tiger Oakes d3d5c8934f Cleanup tests for toolbar controller 2020-06-15 15:25:33 -04:00
David Walsh 8b24cdec42
For 11428 - Focus on home screen address bar when tab tray new tab is tapped (#11429) 2020-06-12 17:55:07 -05:00
Sawyer Blatz 13d077eb66
For #11269: Telemetry for new reader mode position (#11385) 2020-06-12 11:39:35 -07:00
Tiger Oakes 651b2831fe Fix tests in toolbar controller 2020-06-11 18:15:09 -04:00
Jeff Boek cd3b6181b3 For #10374 - Adds quick contextual menu to tab switcher
Co-authored-by: person808 <kainaluh808@gmail.com>
2020-06-10 16:50:28 -07:00
Dennis Schubert d046d908fc Bug 1643132 - Remove native "Report site issue" functionality.
This will be replaced by the WebCompat team's system extension that ships as an android-component.
2020-06-04 18:23:11 -04:00
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
2020-05-29 17:17:56 -05:00
Jeff Boek 601aedda46 For #10504 - Removes "old" TabTrayFragment 2020-05-21 15:17:20 -07:00
ValentinTimisica 1e83f54a94 For #10343: Updates UI tests accordingly to 'Library' removal 2020-05-11 10:22:19 -07:00
ekager c4e83367f6 For #6832 - Fix various fragment not attached to a context crashes 2020-04-22 20:56:35 -07:00
mcarare e87ea301ab For #9536: Update tests to check opened tab is in same browsing mode 2020-04-16 19:50:25 -07:00
Jeff Boek 4cbb9aebaf
Cleans up nav_graph.xml (#9829)
* For #9751 - Cleans up homeFragment directions

* For #9751 - Uses global actions for fragments not owned by homeFragment

* For #9751 - Cleans up SearchFragment directions

* For #9751 - Removes settings action from DeleteBrowsingDataFragment

* For #9751 - Removes browser action from SettingsFragment

* For #9751 - Adds ManagePhoneFeature global action

* For #9751 - Clean up unused deletebrowsingfragment actions

* For #9751 - Cleans Up HistoryFragment actions

* For #9751 - Removes Home -> Search action

* For #9751 - Removes the Bookmark -> Browser action

* For #9751 - Cleans up bookmark fragment actions

* For #9751 - Cleans up actions from ShareController

* For #9751 - Removes defaultBrowserFragment to browserFragment action

* For #9751 - Removes about -> browser action

* For #9751 - Adds global action to TrackingProtectionFragment

* For #9751 - Removes exception -> browser action

* For #9751 - Removes login -> browser action

* For #9751 - Fixes LoginFragment directions

* For #9751 - Removes ExternalAppBrowser directions

* for #9751 - Cleans up actions

* For #9751 - Fixes unit tests

* For #9751 - Addresses nits in PR
2020-04-13 21:43:45 -07:00
Christian Sadilek 0f1bff7402 No issue: Refactor readerview to use browser-state 2020-04-07 16:31:03 -04:00
Michael Comella 6e0d851da3 For #9605: replace unit test runners with FenixRobolectricTestRunner.
This is how we can apply the new test runner to remove duplication.

This commit was generated programmatically with the following commands:
```
  // Replace test runners with new one.
  find app/src/test -type f -exec gsed -i "s/@RunWith(RobolectricTestRunner::class)/@RunWith(FenixRobolectricTestRunner::class)/" {} +
  find app/src/test -type f -exec gsed -i "s/@RunWith(AndroidJUnit4::class)/@RunWith(FenixRobolectricTestRunner::class)/" {} +

  // Replace imports of old test runners with new one
  find app/src/test -type f -exec gsed -i "s/org.robolectric.RobolectricTestRunner/org.mozilla.fenix.helpers.FenixRobolectricTestRunner/" {} +
  find app/src/test -type f -exec gsed -i "s/androidx.test.ext.junit.runners.AndroidJUnit4/org.mozilla.fenix.helpers.FenixRobolectricTestRunner/" {} +

  // Remove unused imports
  find app/src/test -type f -exec gsed -i "/@Config(application = TestApplication::class)/d" {} +
  find app/src/test -type f -exec gsed -i "/import org.mozilla.fenix.TestApplication/d" {} +
  find app/src/test -type f -exec gsed -i "/import org.robolectric.annotation.Config/d" {} +
```

Where gsed is the GNU version of sed installed via homebrew. After
running these commands, I need to manually clean up the following files:
- FenixRobolectricTestRunner
- LocaleManagerExtensionTest
2020-04-03 09:27:49 -07:00
mcarare 76f15a1f7f For #9498: Update unit tests with new constructor argument 2020-03-30 09:56:51 -07:00
Arturo Mejia 7dff584b82 Remove @ObsoleteCoroutinesApi from tests 2020-03-18 17:25:51 -07:00
Mihai Branescu b0e4453fb7 For #8800 - add tests for dismissing highlighted items 2020-03-11 19:05:55 +02:00
mcarare 95a89f9dba For #8474 Remove obsolete unit tests for removed menu items 2020-03-11 09:52:28 -07:00
Sawyer Blatz e96732604b For #167: Improves home to browser animation 2020-02-28 18:04:14 -07:00
Sawyer Blatz d918cfdf38 For #1901: Screenshot engineView to remove GV flash
Co-authored-by: ekager <ekager@mozilla.com>
2020-02-21 08:35:42 -08:00
Emily Kager 9e4e23eceb
Closes #8176 - Adds new string for add to top sites (#8209) 2020-02-07 22:05:35 -05:00
Gabriel Luong 64a4a7f422
Provide add-on support (#8064)
Closes #5630, #6069, #6092, #6091, #6124, and #6147.

Co-authored-by: Simon Chae <chaesmn@gmail.com>
Co-authored-by: Arturo Mejia <arturomejiamarmol@gmail.com>
Co-authored-by: Christian Sadilek <christian.sadilek@gmail.com>
Co-authored-by: Gabriel Luong <gabriel.luong@gmail.com>
2020-02-04 01:41:51 -05:00
Gabriel Luong e1863dd3c2 For #6758 - Part 4: Implement "Add to Firefox Home" browser menu item
- The "Add to Firefox Home" browser menu item adds a top site to the top site storage.
- Refactors the FenixSnackbar from BaseBrowserFragment into BrowserToolbarController
since there are multiple menu items that need to show a FenixSnackbar.
- Adds metrics for the new browser menu item.
2020-01-24 15:18:25 -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 7e8f079269
Use ShareData with ShareFragment (#6698) 2019-11-25 11:07:21 -08:00
Severin Rudie 6909a76bcb
4281 remove qab (#6310)
* For #4281: small ToolbarMenu refactor

This makes it easier to see how items are ordered in the menuItems list

* For 4281: add QAB buttons to menu

* For 4281: removed menu back button per mocks

I double checked with UX, and we'll be relying on the hardware back button for its functionality

* For 4281: add content descriptions for bookmarking

* For 4281: updated BrowserToolbarController for new functionality

* For 4281: provided simple dependencies to browser controller

More complex changes will be in a following commit, for review readability

* For 4281: move toolbar controller dependencies up to BaseBrowserFragment

The functionality they control is being moved into the toolbar menu, which is shared by both normal tabs and custom ones

* For 4281: removed (now unused) code related to QAB

* For 4281: fix test compilation after QAB removal

Tests still need to be expanded to include added functionality

* For 4281: updated menu to show if url is bookmarked

This sloppy workaround is required because TwoStateButton requires that `isInPrimaryState` be a synchronous call, and checking whether or not the current site is bookmarked is quite slow (10-50 MS, in my tests).  After days of work and many attempted solutions, this was the least abhorrent among them.

https://github.com/mozilla-mobile/android-components/issues/4915 was opened against AC to evaluate potentially supporting async `isInPrimaryState` functions.
https://github.com/mozilla-mobile/fenix/issues/6370 was opened against Fenix to investigate the unexpectedly slow call to `BookmarkStorage`.

* For 4281: update reader mode switch

* For 4281: selectively show/hide menu items

* For 4281: add reader mode appearance

* For 4281: update bookmark button when it is clicked

* For 4281: removed unused QAB code

* For 4281: removed QAB robot, updated UI tests

* For 4281: removed QuickActionSheet metrics

Since this behavior now lives in the toolbar, it is tracked via Event.BrowserMenuItemTapped

* For 4281: fixed lint errors

* For 4281: add new strings for buttons added to menu

This is necessary because the location change (from QAB to toolbar menu) could affect the grammar in some languages

* For 4281: remove outdated TODOs

* For 4281: removed QAB container

* For 4281: removed back button reference from UI test

This button no longer exists

* For 4821: Fixes a visual defect (extra padding on top of toolbar)

* For 4281: update copy on reader mode

* For 4281: fixed review nits
2019-11-11 17:10:14 -08:00
mcarare 11ad1010a9 For #6323 Creating 1st collection from tab shows Name collection screen
Added a check for existence of at least a collection to select from.
2019-11-11 14:36:55 -08: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
ValentinTimisica 485ccba189 Fixes #5323: Show a snackbar while browsing data is deleting. (#6105) 2019-10-21 09:57:06 -07:00
shldhll 265f89e772 Added required coroutines in tests. Closes #5876 2019-10-11 00:01:07 +05:30
shldhll 8e17ac05b1 Optimized imports. Closes #5876 2019-10-10 04:17:43 +05:30
shldhll f907ec52f0 Removed ObsoleteCoroutinesApi in tests. Closes #5876 2019-10-10 04:04:51 +05:30
Emily Kager f9afd97a68 For #1901 - Get rid of black flash when leaving GV Engine 2019-10-09 11:02:21 -07:00
Tiger Oakes 6c30a94081 Move settings classes to packages 2019-09-20 12:36:15 -07:00
Sawyer Blatz fd1fcd8b89 For #4155: Adds paste & go for search terms 2019-09-19 08:24:27 -07:00
Tiger Oakes 42bb3e1410 Change deleteAndQuit to take an activity 2019-09-15 20:03:04 -07:00
Emily Kager e3209dcc84 For #3700 - Add Setting to Delete Data on "Quit" menu action 2019-09-11 16:06:18 -07:00
Sawyer Blatz 53b3f105ca For #4155: Sets pastedText default value 2019-09-11 09:03:17 -07:00
Sawyer Blatz 52fd327bc0 For #4155: Adds tests for browser toolbar popup menu 2019-09-11 09:03:17 -07:00
Sawyer Blatz fdd2b59fb8 For #4155: Adds popup menu for browser toolbar 2019-09-11 09:03:17 -07:00
Sawyer Blatz aef087aae0
No issue: Removes unused nestedScrollQuickActionView (#5143) 2019-09-06 09:03:24 -07:00
mihai-adrian 3171f3a1a7 Fixes #4997: Changed navigation to ShareFragment
Changed test for new global navigation to share fragment.
2019-09-03 07:08:08 -10:00
Tiger Oakes f740d4382a Closes #773 - Add shortcuts to homescreen (#4925) 2019-08-29 14:45:11 -05:00
Tiger Oakes c475bc87cf Move classes out of top-level package 2019-08-21 13:52:30 -07:00
Tiger Oakes ac6c1ec2ee Closes #2690 - Clean up CreateCollection viewmodel (#4731) 2019-08-20 10:45:41 -07:00