Commit Graph

40 Commits (1ec4cf8dad862661d599d4d6f3a32cb0e9d04735)

Author SHA1 Message Date
Gabriel Luong 1ec4cf8dad [fenix] For https://github.com/mozilla-mobile/fenix/issues/27667 - Remove import-ordering from the list of disabled ktlint rules 2 years ago
Arturo Mejia 4fdfb13d88 [fenix] For https://github.com/mozilla-mobile/fenix/issues/3709: Add save to PDF UI. 2 years ago
mcarare 932823c871 [fenix] For https://github.com/mozilla-mobile/fenix/issues/26844: Fix ktlint issues and remove them from baseline. 2 years ago
Alexandru2909 075094b4b9 [fenix] For https://github.com/mozilla-mobile/fenix/issues/24454 - Remove Event.wrapper for SyncAccount metrics 2 years ago
Roger Yang 094630c613 [fenix] Close https://github.com/mozilla-mobile/fenix/issues/14313: Always add copy to clipboard action in share actions 2 years ago
mcarare 47424e8f00 [fenix] For https://github.com/mozilla-mobile/fenix/issues/22477: Ignore null and empty values for share data title. 2 years ago
Sebastian Kaspari d9ca412bec [fenix] Update Kotlin to 1.5.10 (and Coroutines to 1.5.0). 3 years ago
Roger Yang 63775af142 [fenix] Closes https://github.com/mozilla-mobile/fenix/issues/19921: Update appcompat and fragment dependencies to 1.3.x 3 years ago
MarcLeclair 4c45f615bb [fenix] 16900 make navgraph inflation asynchronous (https://github.com/mozilla-mobile/fenix/pull/18889)
* For https://github.com/mozilla-mobile/fenix/issues/16900: implement async navgraph inflation

For https://github.com/mozilla-mobile/fenix/issues/16900: removed nav graph from xml

For https://github.com/mozilla-mobile/fenix/issues/16900: inflate navGraph programatically

For https://github.com/mozilla-mobile/fenix/issues/16900: Made NavGraph inflation asynchronous

For https://github.com/mozilla-mobile/fenix/issues/16900: Changed to block with runBlocking

For https://github.com/mozilla-mobile/fenix/issues/16900: Refactored blocking call into a function

For 16900: NavGraph inflation is now async

We now attach the nav graph (or check if its attached) on every nav call ( an extension function for NavController).
This is done by checking the value of the job stored in PerfNavController.map which keeps track of the job with the NavController as a Key.
If the job hasn't been completed, it will block the main thread until the job is done. The job itself is responsible for attaching the navgraph
to the navcontroller (and the inflation of the latter too)

For 16900: rebased upstream master

For 16900: Rebase on master

For https://github.com/mozilla-mobile/fenix/issues/16900: Fixed Async Navgraph navigation per review comments.

1)The Asynchronous method is now found in NavGraphProvider.kt. It creates a job on the IO dispatcher
2)The Job is tracked through a WeakHashMap from Controller --> NavGraph
3)The Coroutine scope doesn't use MainScope() anymore
4)The Coroutine is cancelled if the Activity is destroyed
5)The tests mockk the blockForNavGraphInflation method through the FenixReoboelectricTestApplication instead of calling the mock every setup()

For https://github.com/mozilla-mobile/fenix/issues/16900: inflateNavGraphAsync now takes navController

For https://github.com/mozilla-mobile/fenix/issues/16900: Pass lifecycleScope to NavGraphProvider

For https://github.com/mozilla-mobile/fenix/issues/16900: removed unused mock

For https://github.com/mozilla-mobile/fenix/issues/16900: Added linter rules for navigate calls

We need linting rules to make sure no one calls the NavController.navigate() methods

For https://github.com/mozilla-mobile/fenix/issues/16900: Added TestRule to help abstract the mocks in the code

For 16900: Fix linting problems

For https://github.com/mozilla-mobile/fenix/issues/16900: Cleaned duplicated code in tests

For https://github.com/mozilla-mobile/fenix/issues/16900: cleaned up NavGraphTestRule for finished test

For https://github.com/mozilla-mobile/fenix/issues/16900: had to revert an accidentally edited file

For https://github.com/mozilla-mobile/fenix/issues/16900: rebased master

* For https://github.com/mozilla-mobile/fenix/issues/16900: Review nits for async navgraph

This is composed of squash commits, the original messages can be found below:

-> DisableNavGraphProviderAssertionRule + kdoc.

Use test rule in RobolectricApplication.

Fix failing CrashReporterControllerTest

Fix blame by -> navigate in tests.

This commit was generated by the following commands only:
```
find app/src/test -type f -exec sed -i '' "/import org.mozilla.fenix.ext.navigateBlockingForAsyncNavGraph/d" {} \;
find app/src/test -type f -exec sed -i "" "s/navigateBlockingForAsyncNavGraph/navigate/g" {} \;
git checkout app/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker
```

Fix various blame

This is expected to be squashed into the first commit so, if so, it'd
fix the blame.

Move test rule to helpers pkg.

add missing license header

Add import change I missed

fix unused imports

Replace robolectricTestrunner with test rule.

Improve navGraphProvider docs

Remove unnecessary rule as defined by robolectric.

add clarifying comment to robolectric

remove unnecessary space

* For https://github.com/mozilla-mobile/fenix/issues/16900: nit fixes for MozillaNavigateCheck and lint fixes

3 squash commits:
 *Changed violation message and fixed the lint rule for MozillaNavigateCheck
 *Added suppression to NavController.kt
 *Fixed detekt violations

* For 16900: Fixed failing tests

Co-authored-by: Michael Comella <michael.l.comella@gmail.com>
3 years ago
Christian Sadilek 2256f29d23 [fenix] Closes https://github.com/mozilla-mobile/fenix/issues/16153: Intermittent failures of ShareControllerTest.handleShareToApp 4 years ago
Roger Yang f60df4a976 [fenix] For https://github.com/mozilla-mobile/fenix/issues/16268 - Allowing multiple task while sharing (https://github.com/mozilla-mobile/fenix/pull/16275) 4 years ago
Sebastian Kaspari 70dbf0d765 [fenix] Revert "For https://github.com/mozilla-mobile/fenix/issues/12565: Pass metrics to share controller" for debug test failures.
This reverts commit 5de145914e9fc10d3d647e6f2856c2df19dd9156.
4 years ago
Tiger Oakes 966e13c9aa [fenix] For https://github.com/mozilla-mobile/fenix/issues/12565: Pass metrics to share controller 4 years ago
mcarare 9d9d283dc7 [fenix] For https://github.com/mozilla-mobile/fenix/issues/15310: Also catch ActivityNotFoundException when sharing to app. 4 years ago
Mugurell 38ac83b87a [fenix] For https://github.com/mozilla-mobile/fenix/issues/12857 - Use Collection title when sharing tabs collection
Avoided passing the subject for sharing a collection of tabs in the ShareData
object since ShareData is part of a web standard.
4 years ago
Christian Sadilek 5cc0cbb26d [fenix] For https://github.com/mozilla-mobile/fenix/issues/11798: Allow sharing of reader view pages 4 years ago
person808 86b72dd42b [fenix] For https://github.com/mozilla-mobile/fenix/issues/10193 - Remove page title when sharing links 4 years ago
ekager b5f847467f [fenix] For https://github.com/mozilla-mobile/fenix/issues/6832 - Fix various fragment not attached to a context crashes 4 years ago
Jeff Boek 6308049167 [fenix] Cleans up nav_graph.xml (https://github.com/mozilla-mobile/fenix/pull/9829)
* For https://github.com/mozilla-mobile/fenix/issues/9751 - Cleans up homeFragment directions

* For https://github.com/mozilla-mobile/fenix/issues/9751 - Uses global actions for fragments not owned by homeFragment

* For https://github.com/mozilla-mobile/fenix/issues/9751 - Cleans up SearchFragment directions

* For https://github.com/mozilla-mobile/fenix/issues/9751 - Removes settings action from DeleteBrowsingDataFragment

* For https://github.com/mozilla-mobile/fenix/issues/9751 - Removes browser action from SettingsFragment

* For https://github.com/mozilla-mobile/fenix/issues/9751 - Adds ManagePhoneFeature global action

* For https://github.com/mozilla-mobile/fenix/issues/9751 - Clean up unused deletebrowsingfragment actions

* For https://github.com/mozilla-mobile/fenix/issues/9751 - Cleans Up HistoryFragment actions

* For https://github.com/mozilla-mobile/fenix/issues/9751 - Removes Home -> Search action

* For https://github.com/mozilla-mobile/fenix/issues/9751 - Removes the Bookmark -> Browser action

* For https://github.com/mozilla-mobile/fenix/issues/9751 - Cleans up bookmark fragment actions

* For https://github.com/mozilla-mobile/fenix/issues/9751 - Cleans up actions from ShareController

* For https://github.com/mozilla-mobile/fenix/issues/9751 - Removes defaultBrowserFragment to browserFragment action

* For https://github.com/mozilla-mobile/fenix/issues/9751 - Removes about -> browser action

* For https://github.com/mozilla-mobile/fenix/issues/9751 - Adds global action to TrackingProtectionFragment

* For https://github.com/mozilla-mobile/fenix/issues/9751 - Removes exception -> browser action

* For https://github.com/mozilla-mobile/fenix/issues/9751 - Removes login -> browser action

* For https://github.com/mozilla-mobile/fenix/issues/9751 - Fixes LoginFragment directions

* For https://github.com/mozilla-mobile/fenix/issues/9751 - Removes ExternalAppBrowser directions

* for https://github.com/mozilla-mobile/fenix/issues/9751 - Cleans up actions

* For https://github.com/mozilla-mobile/fenix/issues/9751 - Fixes unit tests

* For https://github.com/mozilla-mobile/fenix/issues/9751 - Addresses nits in PR
4 years ago
mcarare 5c4e1ecfd3 [fenix] For https://github.com/mozilla-mobile/fenix/issues/8759 Use activityName instead of packageName as app identification 4 years ago
mcarare 6a5c11c87e [fenix] For https://github.com/mozilla-mobile/fenix/issues/8975: Separate title from url with line break when sharing links 4 years ago
Mihai Branescu 4fe9033c0f [fenix] For https://github.com/mozilla-mobile/fenix/issues/4231
Added kapt plugin + dependencies in order to be able to use Room
Added recent apps to share fragment (top 6)
Extracted dimens of share_to_apps.xml in the dimens file
4 years ago
David Walsh 5141a25ab8 [fenix] Fix 4021 - Provide tab title during share 4 years ago
Mihai Adrian 354ea9b6ec [fenix] For https://github.com/mozilla-mobile/fenix/issues/7343: Handle sharing to multiple devices (https://github.com/mozilla-mobile/fenix/pull/7409)
* For https://github.com/mozilla-mobile/fenix/issues/7343 Do not allow multiple share to same device

* For https://github.com/mozilla-mobile/fenix/issues/7343 Check current destination before dismissing share
4 years ago
Sawyer Blatz b86face3d4 [fenix] For https://github.com/mozilla-mobile/fenix/issues/6413: Adds more snackbar positioning logic (https://github.com/mozilla-mobile/fenix/pull/7444)
* For https://github.com/mozilla-mobile/fenix/issues/6413: Adds more snackbar positioning logic

* Refactor
5 years ago
Sawyer Blatz 904a5c02d5 [fenix] For https://github.com/mozilla-mobile/fenix/issues/6413: Fixes snackbar positionining for bottom toolbar (https://github.com/mozilla-mobile/fenix/pull/7415)
* For https://github.com/mozilla-mobile/fenix/issues/6413: Fixes snackbar positionining for bottom toolbar

* For https://github.com/mozilla-mobile/fenix/issues/6413: Cleans up snackbar usage
5 years ago
Ryan Kelly b806b4c5fa [fenix] Use feature-accounts-push, which replaces feature-sendtab. 5 years ago
Tiger Oakes daf77820a4 [fenix] For https://github.com/mozilla-mobile/fenix/issues/5783 - Web Share with Fenix share sheet (https://github.com/mozilla-mobile/fenix/pull/6883) 5 years ago
Tiger Oakes 35bf8dfc58 [fenix] Use ShareData with ShareFragment (https://github.com/mozilla-mobile/fenix/pull/6698) 5 years ago
Tiger Oakes 037d35abd1 [fenix] Use ViewModel for share fragment 5 years ago
Tiger Oakes 47200b1308 [fenix] Fixes https://github.com/mozilla-mobile/fenix/issues/4528 - Prevent share menu from jumping
Plus a bunch of docs and refactoring
5 years ago
Mugurell a87ab2275c [fenix] For 5092 - Show a Snackbar with retry option if sharing to devices fails (https://github.com/mozilla-mobile/fenix/pull/5158)
* For https://github.com/mozilla-mobile/fenix/issues/5092 - Show a Snackbar with retry option if sharing to devices fails

ShareController will contain all the business logic for checking the result
status of the `share to device` operations. When this fails it will show a
snackbar which also offer the possibility to retry the just failed operation.
To allow this even in the event the user has closed the share fragment we'll
use a GlobalScope's coroutine.
Refactored out the TabsSharedCallback from ShareFragment because otherwise we
would have neede to sent through that the just failed operation. After the
refactor the ShareController is solely responsable for showing the right
snackbar and handling the retry actions.

* For https://github.com/mozilla-mobile/fenix/issues/5092 - Refactor ShareControllerTest

* For https://github.com/mozilla-mobile/fenix/issues/5092: Adds color theming of snackbars
5 years ago
Jeff Boek 5ecd6a1a9a [fenix] For https://github.com/mozilla-mobile/fenix/issues/3077 - Replaces connect another device dialog with a scree 5 years ago
Mihai Adrian 2f2d130ad6 [fenix] For https://github.com/mozilla-mobile/fenix/issues/3371: Show snackbar message when share fails with crash (https://github.com/mozilla-mobile/fenix/pull/5210) 5 years ago
Emily Kager 8eb6b616c8 [fenix] For https://github.com/mozilla-mobile/fenix/issues/2897 - Add Action States To Share Sheet 5 years ago
Sawyer Blatz 3c746c4b5c [fenix] For https://github.com/mozilla-mobile/fenix/issues/4908: Adds telemetry for send tab 5 years ago
Petru Lingurar 8c4f0ecc02 [fenix] For https://github.com/mozilla-mobile/fenix/issues/5067 - Refactor ShareControllerTest following the use of SendTabUseCases 5 years ago
Petru Lingurar 2f4392c064 [fenix] Fix https://github.com/mozilla-mobile/fenix/issues/5067 - Refactor ShareController to use SendTabUseCases
Navigation between app fragments uses ShareTab as arguments. The newly used
SendTabUseCases uses TabData which is not Parcelable.
For minimal changes we'll keep both data classes and ShareController will know
how to map between the two.
Removed the `sessionId` property of ShareTab as it isn't needed anymore.
5 years ago
Mugurell 23f1395585 [fenix] For 4007 - Add unit tests for the Share Interactor, Controller and list Adapters 5 years ago
Mugurell 00a0d8db5e [fenix] For https://github.com/mozilla-mobile/fenix/issues/4007 - Add ShareController for handling ShareFragment's business logic
`ShareController` defines a contract with all possible `ShareFragment`'s
behavior changes and comes with a default implementation -
`DefaultShareController`.
It is to be delegated by all `ShareFragment`s contained Views' Interactors
following any user interactions.
5 years ago