Commit Graph

105 Commits (990bfa7e6dd5894d61473a41da6129e6947974e2)

Author SHA1 Message Date
MarcLeclair 990bfa7e6d
16900 make navgraph inflation asynchronous (#18889)
* For #16900: implement async navgraph inflation

For #16900: removed nav graph from xml

For #16900: inflate navGraph programatically

For #16900: Made NavGraph inflation asynchronous

For #16900: Changed to block with runBlocking

For #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 #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 #16900: inflateNavGraphAsync now takes navController

For #16900: Pass lifecycleScope to NavGraphProvider

For #16900: removed unused mock

For #16900: Added linter rules for navigate calls

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

For #16900: Added TestRule to help abstract the mocks in the code

For 16900: Fix linting problems

For #16900: Cleaned duplicated code in tests

For #16900: cleaned up NavGraphTestRule for finished test

For #16900: had to revert an accidentally edited file

For #16900: rebased master

* For #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 #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
Roger Yang 9049513017
Closes #18178: Rework History Telemetry (#18261) 3 years ago
Mihai Adrian Carare 3bb074b133
For #13522: Also remove history entries from tab history. (#17392)
* For #13522: Also remove history entries from tab history.

* For #13522: Test that deleting history also removes it from tab history.
3 years ago
mcarare d233229ce4 For #15366: Add recently closed tabs metrics from history fragment. 3 years ago
Shen 45e3f7805b For #13168 - Removed the close button from history navigation bar 4 years ago
Jocelyne e74a12b442
For #15471: Show Delete button in red in multi-select overflow menu (#15576) 4 years ago
Grisha Kruglov 51dab196c4 Closes #15443: Use fragment's lifecycleScope for AlertDialog actions 4 years ago
Grisha Kruglov 71b51146cb Update breaking changes in the FxA/Sync integration 4 years ago
ekager 09fbb43f80 For #2486 - Adds Recently Closed Tabs 4 years ago
ekager 46511d6f8e For #10163 - Adds tab multiselect mode 4 years ago
Mihai Eduard Badea c3041bcb64 For issue #12387 - Display tab tray using .show
Replaced the global navigation action used for displaying the tab tray with the .show() function.
4 years ago
Mihai-Eduard Badea 1823fdb66d
For issue #9949 - Bookmarks/History deletion inconsistencies (#12630)
- Added the undo action for deleting individual history items by creating a new field to the history state containing the id's of the history items that are pending for deletion; This field is used inside the update function from the view to show/hide the items.

 - Added a new check inside the "deleteMulti" method from BookmarkFragment that calls the showRemoveFoldersDialog to prevent the user from being able to delete one or more bookmark folders without being asked for confirmation, as in #8648.

Co-authored-by: Mihai Eduard Badea <mihai.badea@softvision.ro>
4 years ago
Elise Richards 023a4983fa
For #10173: login duplicates and save (#11208)
* Extract controller into it's own class. Implement find dupes and filter based on username.

Create edit login controller. Add text watchers and check for duplicates.

Edit controller test

* Find duplicates and save to store

* Retrieve duplicates from AC and check list on username text changed

Move duplicates logic into the controller

* Add glean pings for delete and edit. Move logic for login manipulation into the datastore.

* Use correct threads in controller. Enable save button when applicable.

Save enabled in datastore.

Move login data to datastore

Rebase with password error states

Update metrics to be more specific for edit

* Create logins controller for AC calls

* Interactor and controller methods for edit login. Add edit view to separate out some layout manipulation.

Inflate view in edit fragment. Double layout showing up.

Edit view

Controller tests

Controller tests passing

Interactor tests

Lint and detekt cleanup

* Remove datastore and use storage controller for all logins calls to password storage.

Addressed comments

Lint
:

Rebase - 1
4 years ago
David Walsh c4a4beb6b9 For 11468 - Show tab tray after opening links from history and bookmarks 4 years ago
ValentinTimisica c75ab3f720
For #10462: Removes back button from bookmarks and history fragments (#11721) 4 years ago
Emily Kager 44ff29bdc0 Revert "For issue #9949 - Bookmarks/History deletion inconsistencies"
This reverts commit 3feab90b19.
4 years ago
David Walsh 3feab90b19 For issue #9949 - Bookmarks/History deletion inconsistencies
- Added the undo action for deleting individual history items by creating a new field to the history state containing the id's of the history items that are pending for deletion; This field is used inside the update function from the view to show/hide the items.

 - Added a new check inside the "deleteMulti" method from BookmarkFragment that calls the showRemoveFoldersDialog to prevent the user from being able to delete one or more bookmark folders without being asked for confirmation, as in #8648.
4 years ago
person808 d14b39a56e For #2165 - Implement pull-to-refresh gesture to sync history. 4 years ago
Simon Chae a851b76ea3
Update Android Components version to 41.0.20200506130132 (#10443) 4 years ago
Mihai Eduard Badea 02bd0cc203 For issue #8648 4 years ago
ekager c4e83367f6 For #6832 - Fix various fragment not attached to a context crashes 4 years ago
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
4 years ago
ekager b8fba63be4 For #9890 - Do not display full screen snackbar with toolbar padding 4 years ago
Sawyer Blatz e3ed7ed268
Issue #9128 & #9222 & #9499: Refactors snackbar creation and fixes placement (#9628) 4 years ago
Mugurell a1cdd31f0c Fix #8651 - Add new menu actions for a history item
We'll now also support:
- Copy url
- Share to another FXA device
- Open in new tab
- Open in private tab
4 years ago
Jeff Boek 541bcf072a Reverts all BrowsingModeManager changes 4 years ago
Simon Chae 2c01022c4b For #8153: Allow web-ext to open new tabs in correct browsing mode 4 years ago
Sebastian Kaspari f0af6d6f6e Update Mozilla Android Components to 32.0.0-SNAPSHOT. 4 years ago
Michael Comella 4bab493487 No issue: remove useless @MenuRes annotation in History Fragment.
This annotation was not applied correctly and lint was unable to ensure
it was used properly: it declared an error in lint saying so but that
error was ignored. I did not know how to apply the annotation - and I
felt it had limited utility - so I removed it entirely in order to
permit the lint baseline file to be removed (it was the only error).
4 years ago
Jeff Boek 1b1f9348dc No Issue - Fixes warnings / compiler errors with A-C update 5 years ago
Tiger Oakes 422faaf7c0 Add toolbar helpers (#6531) 5 years ago
Tiger Oakes 7e8f079269
Use ShareData with ShareFragment (#6698) 5 years ago
Tiger Oakes 0a86676563 For #6523 - Remove close button in library 5 years ago
shldhll 8e17ac05b1 Optimized imports. Closes #5876 5 years ago
shldhll f907ec52f0 Removed ObsoleteCoroutinesApi in tests. Closes #5876 5 years ago
Tiger Oakes d028c97112 For #5213 - Use support library attributes 5 years ago
Colin Lee de93b05cac For #2754 Add tab cards to share sheet (#5493)
* For #2754 Add tab cards to share sheet

* For #2754: Fix background near rounded corners and ShareButtonAppearanceTest

* Add license to share_tab_item
5 years ago
Sawyer Blatz e247870b9f
For #5277: Updates string for delete browsing data (#5309) 5 years ago
Sebastian Kaspari 2723a55b03 Rename HistoryStore/State/Action to HistoryFragmentStore/State/Action. 5 years ago
Emily Kager a65f220b39 For #4921 - Adds WindowFeature to BaseBrowserFragment 5 years ago
Sourabh 091778a4b9 For #4398 - add HistoryController (#4837) 5 years ago
Tiger Oakes c475bc87cf Move classes out of top-level package 5 years ago
Tiger Oakes 52542708aa Consodilate private browsing code 5 years ago
Sawyer Blatz da06b0fb15
For #4508: Treats warnings as errors (#4543) 5 years ago
Emily Kager 0604e9858d Closes #3939 - Adds strings for delete browsing history 5 years ago
Tiger Oakes 3c1ce90f6f Fixes #2379 - Generic library selection 5 years ago
Nikit Bhandari 671727c3e8 For #4341 use camelCase for views referenced from code 5 years ago
Tiger Oakes ccae66c08a Issue #2379 - Use LibraryPageView in history 5 years ago
Jeff Boek af449c84d5 For #4137 - Fixes HistoryInteractorTest 5 years ago
ekager 4494e40dbc For #4137 - Adds pagination to the history view 5 years ago