Commit Graph

53 Commits (08be473cbf8223183d37483b0ce69f003703f861)

Author SHA1 Message Date
Gabriel Luong 08be473cbf Bug 1849073 - Part 1: Remove the Bookmark Search Dialog 9 months ago
Noah Bond 49f1f258e4 Bug 1843350 - Fix Bookmarks -> Tabs Tray navigation bug 11 months ago
Roger Yang c61875b081 [fenix] For https://github.com/mozilla-mobile/fenix/issues/11404 - Add 'Open all' options in bookmarks
* Add "Open all in new tabs" options in bookmarks
* Add "Open all in private tabs" options in bookmarks
* Add metrics tracking if the usage of "Open all in..." in bookmarks

Co-authored-by: Pg <pg.developper.fr@gmail.com>
2 years ago
Roger Yang d2f30aebe8 [fenix] Revert "For https://github.com/mozilla-mobile/fenix/issues/11404 - Create open all function"
This reverts commit ea926e80173a310687f81df757c8b011aca84c5e.
2 years ago
Roger Yang b78bfb94cb [fenix] Revert "For https://github.com/mozilla-mobile/fenix/issues/11404 - Add 'Open all in private tabs' option as requested."
This reverts commit 83ed1abdc0846e726e2fcb46d0fcb7539f1ff9c3.
2 years ago
Roger Yang 680be9cf6d [fenix] Revert "For https://github.com/mozilla-mobile/fenix/issues/11404 - Create alert message when a lot of tabs are to be opened."
This reverts commit 8517fea003842f6216e8b02a92abc61837384ca0.
2 years ago
Pg 3b412f7dc8 [fenix] For https://github.com/mozilla-mobile/fenix/issues/11404 - Create alert message when a lot of tabs are to be opened.
Current threshold is 15.
2 years ago
Pg ef15f5154c [fenix] For https://github.com/mozilla-mobile/fenix/issues/11404 - Add 'Open all in private tabs' option as requested.
https://github.com/mozilla-mobile/fenix/pull/21212#discussion_r739172674

- Add option is tree dot menu
- Edit folder opening to be aware of browsing mode
- Add metrics
- Add unit tests for 'Open all in private tabs'
- Add Android tests for open all in private.
2 years ago
Pg 871604943d [fenix] For https://github.com/mozilla-mobile/fenix/issues/11404 - Create open all function
- Create element to be displayed

- Update the interface and bind in the view holder
Set the filter to limit this action to FOLDER.

- Create core function
Main logic is done on the controller (has it should be done). The whole
process is done in one coroutine to be non-blocking as many
(sub)folders & links can be present. If folder is empty, a toast is
displayed. Else iterate on items. When item is:
- a FOLDER -> restart process (without toast) on the folder
- a ITEM -> open it
- a SEPARATOR -> do nothing
Once finished, show the tabs tray.

Toast message is defined in fragment to have access to context.

- Create androidTest for openAllInTabs
- Create tests for handleBookmarkFolderOpening
- Display 'open all' options only if folder has at least on child:
A coroutine and suspended functions have to be used, since `getTree`
is async.
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
Roger Yang 56d367f4fd [fenix] Issue https://github.com/mozilla-mobile/fenix/issues/24740: Use unified search bar in bookmark search 2 years ago
Mugurell c6bb6c247e [fenix] For https://github.com/mozilla-mobile/fenix/issues/23876 - Update kotlinx-coroutines to 1.6.1. Refactor runBlocking in tests.
After the update `TestCoroutineDispatcher`, `TestCoroutineScope` and
`runBlockingTest` are deprecated.
Instead of these new `TestDispatcher`, `TestScope` and `runTest` APIs are used.

Took the oportunity to also replace most of the `runBlocking` calls with the
new `runTest` specially designed for running coroutines in tests API.
2 years ago
mike a caa53eb6e9 [fenix] Closes https://github.com/mozilla-mobile/fenix/issues/24513: add undo snackbar to history group screen 2 years ago
mavduevskiy 7387644bac [fenix] For https://github.com/mozilla-mobile/fenix/issues/23665 - Make the undo snackbar for the library screens work globally (https://github.com/mozilla-mobile/fenix/pull/24398)
* Closes https://github.com/mozilla-mobile/fenix/issues/23665: make snackbar work after leaving the fragment it was initiated from

* Closes https://github.com/mozilla-mobile/fenix/issues/23665: bring back the removed bookmark navigation test, sort imports alphabetically

Co-authored-by: mike a <mavduevskiy@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2 years ago
Alexandru2909 3f083beeb4 [fenix] For https://github.com/mozilla-mobile/fenix/issues/24214 - Move bookmark removal events to BookmarkController 2 years ago
Roger Yang 2ca16e15cf [fenix] Close https://github.com/mozilla-mobile/fenix/issues/12717: Add bookmark search 2 years ago
Roger Yang ba3bf788e3 [fenix] Close https://github.com/mozilla-mobile/fenix/issues/13336: Open bookmark in current tab if browsing mode is not private or previous fragment is not home 2 years ago
Roger Yang d1a94de89e [fenix] Revert "For https://github.com/mozilla-mobile/fenix/issues/13336: Open bookmarks in current tab (https://github.com/mozilla-mobile/fenix/pull/23169)"
This reverts commit 52157add58e5ed6accc64e1e4fae69e655432d91.
2 years ago
Lucius C d2e016eac9 [fenix] For https://github.com/mozilla-mobile/fenix/issues/13336: Open bookmarks in current tab (https://github.com/mozilla-mobile/fenix/pull/23169)
* For https://github.com/mozilla-mobile/fenix/issues/13336: Open bookmarks in current tab

* For https://github.com/mozilla-mobile/fenix/issues/13336: Fix tests to verify bookmark opening in current tab

* Change test name for handleBookmarkTapped
2 years ago
Grigory Kruglov abcf8f0fb1 [fenix] Account for Int->UInt changes in bookmarks API 2 years ago
Arturo Mejia 4cc4e1c67d [fenix] Improve loading URLs 3 years ago
Sebastian Kaspari 6f4c47613a [fenix] Update Kotlin and Jetpack Compose versions. 3 years ago
Sebastian Kaspari 6ea19d4b17 [fenix] Run ktlintFormat to adapt to latest formatting rules. 3 years ago
Christian Sadilek ddd3964fb7 [fenix] Fix intermittent test failures in BookmarkControllerTest 3 years ago
mcarare 9348be6526 [fenix] For https://github.com/mozilla-mobile/fenix/issues/20425: Update AC version 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
Sebastian Kaspari e25cfcdc48 [fenix] Complete browser-state migration and remove browser-session dependency.
Co-authored-by: Christian Sadilek <christian.sadilek@gmail.com>
3 years ago
Roger Yang 0884711ab1 [fenix] Closes https://github.com/mozilla-mobile/fenix/issues/18253: Bookmark and History open new tabs in the background (https://github.com/mozilla-mobile/fenix/pull/19275) 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
Philipp Klein 7d2fb5c3b1 [fenix] For https://github.com/mozilla-mobile/fenix/issues/15362: Remove swipe to delete for bookmarks (https://github.com/mozilla-mobile/fenix/pull/16646)
Removed now obsolete feature flag and tests.
Removed obsolete swipe refresh state from BookmarkFragmentState
Also adapted tests and remove obsolete ones.
4 years ago
Sebastian Kaspari 9b598b33d8 [fenix] Revert "For https://github.com/mozilla-mobile/fenix/issues/12565: Pass bookmark storage to controller" for debug test failures.
This reverts commit 9825a5d2dfb0f6d3c0235fdf0032e510c34bf20a.
4 years ago
Tiger Oakes b55c4af6fb [fenix] For https://github.com/mozilla-mobile/fenix/issues/12565: Pass bookmark storage to controller 4 years ago
Kainalu Hagiwara 87fdd035c0 [fenix] For https://github.com/mozilla-mobile/fenix/issues/12831 - Disable SwipeRefreshLayout while swiping a bookmark. 4 years ago
Mihai-Eduard Badea 65c98d6c16 [fenix] For issue https://github.com/mozilla-mobile/fenix/issues/9949 - Bookmarks/History deletion inconsistencies (https://github.com/mozilla-mobile/fenix/pull/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 https://github.com/mozilla-mobile/fenix/issues/8648.

Co-authored-by: Mihai Eduard Badea <mihai.badea@softvision.ro>
4 years ago
Tiger Oakes e69b1e06f1 [fenix] Fixes https://github.com/mozilla-mobile/fenix/issues/9832 - Change targetSdkVersion to Android 10 (https://github.com/mozilla-mobile/fenix/pull/11014) 4 years ago
person808 3e5d1f66cb [fenix] For https://github.com/mozilla-mobile/fenix/issues/2165 - Add swipe to refresh gesture to bookmarks view. 4 years ago
Emily Kager b7af130eb7 [fenix] Revert "For issue https://github.com/mozilla-mobile/fenix/issues/9949 - Bookmarks/History deletion inconsistencies"
This reverts commit fc8365728f1f9bd02766e5931aa990c91c59c03b.
4 years ago
David Walsh db28b7df4e [fenix] For issue https://github.com/mozilla-mobile/fenix/issues/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 https://github.com/mozilla-mobile/fenix/issues/8648.
4 years ago
Mihai Eduard Badea fa9a791c81 [fenix] For issue https://github.com/mozilla-mobile/fenix/issues/8648 4 years ago
ekager 5c0d300938 [fenix] Don't use ProcessLifecycleOwner for view-tied consume 4 years ago
Grisha Kruglov 567d0ba9b9 [fenix] Closes https://github.com/mozilla-mobile/fenix/issues/4046: Always display 'Desktop' bookmarks folder
See https://github.com/mozilla-mobile/fenix/issues/4046 for a detailed discussion of this.

In short, this patch removes code that would conditionally hide desktop bookmarks depending
on the signed-in state of the browser.
4 years ago
Jeff Boek 9ccf1386ef [fenix] For https://github.com/mozilla-mobile/fenix/issues/8153 - Allow web-extensions to open tabs in correct browsing mode 4 years ago
Jeff Boek dba1d8166d [fenix] Reverts all BrowsingModeManager changes 4 years ago
Emily Kager 6ac485f730 [fenix] For https://github.com/mozilla-mobile/fenix/issues/8470 - Fix Unit Tests MockKExceptions (https://github.com/mozilla-mobile/fenix/pull/8471) 4 years ago
Simon Chae 0e13878eb2 [fenix] For https://github.com/mozilla-mobile/fenix/issues/8153: Allow web-ext to open new tabs in correct browsing mode 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
Suraj Shah 320b5a0d05 [fenix] For https://github.com/mozilla-mobile/fenix/issues/7041 - Respect current mode when opening library items (https://github.com/mozilla-mobile/fenix/pull/7311)
* Fixes https://github.com/mozilla-mobile/fenix/issues/7041
Consumes `browserMode` from home activity for tap method of bookmark

* Fixes spaces

* Cleaning tests

* Cleaning tests
5 years ago
Tiger Oakes a752ecd79b [fenix] Split out CustomTabToolbarIntegration (https://github.com/mozilla-mobile/fenix/pull/7107) 5 years ago
Colin Lee 28d64cdd9e [fenix] For https://github.com/mozilla-mobile/fenix/issues/2754 Add tab cards to share sheet (https://github.com/mozilla-mobile/fenix/pull/5493)
* For https://github.com/mozilla-mobile/fenix/issues/2754 Add tab cards to share sheet

* For https://github.com/mozilla-mobile/fenix/issues/2754: Fix background near rounded corners and ShareButtonAppearanceTest

* Add license to share_tab_item
5 years ago