Commit Graph

161 Commits (d8cd5795fafdf2bf22df78a7f4093d75c0e5e5b2)

Author SHA1 Message Date
DreVla d8cd5795fa Bug 1861744 - Don't display pending to delete bookmarks when refresh
When deleting bookmarks, we do not instantly remove them due to
having the possibility of undoing the deletion. Because of this,
when the bookmarks are pending to delete, they can still be displayed
when pulling down to refresh and then acted on. This patch aims to
fix this issue by subtracting the pending to delete bookmarks
when they are refreshed by pulling down.

(cherry picked from commit b98eea7fdc7901b1df91dcf796635a25cbe22900)
4 months ago
Gabriel Luong 08be473cbf Bug 1849073 - Part 1: Remove the Bookmark Search Dialog 8 months ago
mike a 321dd0e532 Bug 1815637 - cherry picking 548379d, the original rtl commit 10 months ago
Noah Bond 49f1f258e4 Bug 1843350 - Fix Bookmarks -> Tabs Tray navigation bug 11 months ago
Arturo Mejia 2773bf7f30 Reverts "Bug 1815637 - Add rtl support." 11 months ago
rahulsainani b84c7d4010 Bug 1836447 - Make extension functions member functions of BookmarkNode 1 year ago
mike a 2e8080b4ff Bug 1815637 - Add rtl support 1 year ago
Alexandru2909 6f8dbbcc3c [fenix] For https://github.com/mozilla-mobile/fenix/issues/22770 - Use String.toShortUrl from A-C 2 years ago
Roger Yang d8776a4c8e [fenix] Close https://github.com/mozilla-mobile/fenix/issues/24613: Remove history improvement feature flag 2 years 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
mcarare 60226baaa1 [fenix] For https://github.com/mozilla-mobile/fenix/issues/25980: Replace deprecated setHasOptionsMenu with MenuProvider. 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 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 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
mcarare 969a5f0b0b [fenix] For https://github.com/mozilla-mobile/fenix/issues/21292: Remove unused MetricController parameters. 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
Arturo Mejia 2a181f2d19 [fenix] For https://github.com/mozilla-mobile/fenix/issues/20872: Prevent crash when updating pending Bookmarks to be deleted without a selected folder. 2 years ago
Mugurell d65dc2f178 [fenix] For https://github.com/mozilla-mobile/fenix/issues/11753 - Update compose to 1.1.1 and Kotlin to 1.6.10
The needed changes are around supporting exhaustive whens for sealed classes
as a new kotlin feature - https://kotlinlang.org/docs/whatsnew1530.html#exhaustive-when-statements-for-sealed-and-boolean-subjects

androidx_activity_compose was removed as a dependency since it isn't used.

Used 1.6.10 for Kotlin although 1.6.20 is available to prevent any issues with
Compose 1.1.1 reported as an error at compile time:
"e: This version (1.1.1) of the Compose Compiler requires Kotlin version 1.6.10
but you appear to be using Kotlin version 1.6.20 which is not known to be
compatible. Please fix your configuration (or
`suppressKotlinVersionCompatibilityCheck` but don't say I didn't warn you!)."
2 years ago
Alexandru2909 3f083beeb4 [fenix] For https://github.com/mozilla-mobile/fenix/issues/24214 - Move bookmark removal events to BookmarkController 2 years ago
Alexandru2909 6ae9599a2f [fenix] For https://github.com/mozilla-mobile/fenix/issues/24214 - Remove Event.wrapper for BookmarksManagement metrics 2 years ago
Roger Yang 2ca16e15cf [fenix] Close https://github.com/mozilla-mobile/fenix/issues/12717: Add bookmark search 2 years ago
Gabriel Luong 130fd3ec5f [fenix] For https://github.com/mozilla-mobile/fenix/issues/24252 - Rename destructive attribute to textWarning 2 years ago
Mugurell b9bec46eea [fenix] Revert "For https://github.com/mozilla-mobile/fenix/issues/23871 - Update compose to 1.1.0 and kotlin to 1.6.10"
This reverts commit 30cb395b04e583ea9457a987f19f047a33de2213.
2 years ago
Mugurell 6defb87864 [fenix] For https://github.com/mozilla-mobile/fenix/issues/23871 - Update compose to 1.1.0 and kotlin to 1.6.10 2 years ago
Arturo Mejia 1284096722 [fenix] For issue https://github.com/mozilla-mobile/fenix/issues/22537 crash: BookmarkFragment is attached to a context 3 years ago
Gabriel Luong 999f0ab3c1 [fenix] For https://github.com/mozilla-mobile/fenix/issues/21776 - Replace 'isEmpty' with 'ifEmpty' 3 years ago
Sebastian Kaspari 6f4c47613a [fenix] Update Kotlin and Jetpack Compose versions. 3 years ago
codrut.topliceanu 6c15482c9d [fenix] For https://github.com/mozilla-mobile/fenix/issues/17917: Use View binding in bookmarks screen 3 years ago
Sebastian Kaspari 6ea19d4b17 [fenix] Run ktlintFormat to adapt to latest formatting rules. 3 years ago
Sebastian Kaspari d9ca412bec [fenix] Update Kotlin to 1.5.10 (and Coroutines to 1.5.0). 3 years ago
Roger Yang 674dbafd94 [fenix] Issue https://github.com/mozilla-mobile/fenix/issues/20307: Clear sharedViewModel selectedFolder when backing out of bookmark fragment 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
ekager 5991d0996e [fenix] For https://github.com/mozilla-mobile/fenix/issues/4652 - Remove activityViewModels workarounds 4 years ago
Jocelyne 635e49092e [fenix] For https://github.com/mozilla-mobile/fenix/issues/15471: Show Delete button in red in multi-select overflow menu (https://github.com/mozilla-mobile/fenix/pull/15576) 4 years ago
Grisha Kruglov a41022554b [fenix] Closes https://github.com/mozilla-mobile/fenix/issues/15443: Use fragment's lifecycleScope for AlertDialog actions 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
ekager 1ced27bda6 [fenix] For https://github.com/mozilla-mobile/fenix/issues/10163 - Adds tab multiselect mode 4 years ago
Mihai Eduard Badea 130de798fb [fenix] For issue https://github.com/mozilla-mobile/fenix/issues/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 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
Tiger Oakes c3391dd74d [fenix] Add method to test fragments in roboletric (https://github.com/mozilla-mobile/fenix/pull/12261) 4 years ago
David Walsh 1083b6026a [fenix] For 11468 - Show tab tray after opening links from history and bookmarks 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
Hakkı Kaan Çalışkan adbe9c77fd [fenix] For https://github.com/mozilla-mobile/fenix/issues/8649: No bookmarks here strings are close to the top 4 years ago
ValentinTimisica 574e7436d9 [fenix] For https://github.com/mozilla-mobile/fenix/issues/10462: Removes back button from bookmarks and history fragments (https://github.com/mozilla-mobile/fenix/pull/11721) 4 years ago