Commit Graph

17 Commits

Author SHA1 Message Date
Gabriel Luong 9654b4dfb1 For #27667 - Remove import-ordering from the list of disabled ktlint rules 2022-11-03 23:27:03 +00:00
Roger Yang 489548b0de For #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>
2022-10-26 14:17:28 +00:00
Roger Yang bc1cfb88e8 Revert "For #11404 - Create open all function"
This reverts commit 9cf42cb7d9.
2022-09-21 23:11:23 +00:00
Roger Yang dff4c31606 Revert "For #11404 - Add 'Open all in private tabs' option as requested."
This reverts commit fe16a81c1d.
2022-09-21 23:11:23 +00:00
Pg fe16a81c1d For #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.
2022-09-19 14:25:16 -04:00
Pg 9cf42cb7d9 For #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.
2022-09-19 14:25:16 -04:00
mcarare ffcef5ff2e For #26844: Fix ktlint issues and remove them from baseline. 2022-09-09 16:52:09 +00:00
TasosB 05e6ba40b4 For #21483 - Remove light theme tinting of folder icon in the Bookmark view 2021-12-28 18:56:36 +00:00
Sijan Rijal 70908307fc
For #15497: Hide and remove the three dot menu from the Desktop Bookmarks folder (#15649)
For #15497: Remove and disable the three dot menu button
2020-10-09 14:39:03 +03:00
Tiger Oakes b927b688c9 Merge bookmark item and folder view holders 2020-09-17 15:59:42 -07:00
Tiger Oakes a04b91ee3c
FNX-14513 ⁃ For #12862: Use concept-menu in library (#13332) 2020-08-14 16:44:09 -07:00
Kainalu Hagiwara 6d8cfe1a50 For #13156, #13280 - Use payloads to bind bookmark viewholders.
Change the DiffUtil callback for bookmarks to use the generated equals()
method instead of only checking the title and url fields. This prevents
the BookmarkNode in our state from getting out of sync with the
BookmarkNode the viewholder is bound to.
2020-08-14 13:03:08 -07:00
ankur dd5bb94f8c For #13301, #13038: hide overflow menu for all bookmark items in selected mode 2020-08-06 09:51:56 -07:00
Kainalu Hagiwara cd2532349d For #12551 - Implement swipe to delete for bookmarks. 2020-07-20 14:54:20 -07:00
Mugurell 645674c9bd Closes #4396 - Add a Bookmarks Controller (#4593)
* For #4396 - Rename BookmarkInteractor methods

Following the naming model used in other Interactors this too will use reactive
method names in the form of "on..." instead of the previous imperative model.

Kept the imperative naming model for the methods from `SelectionInteractor` as
they are a new addition and I'm not sure about the future direction.

* For #4396 - Add a BookmarkController

It abstracts the Fragment behavior in a contract through which various
Interactors can inform about the specific View changes and can ask for
modifications in their container Fragment.

This contract and it's implementation - `DefaultBookmarkController` are the
result of extracting the container Fragment's business logic from
`BookmarkFragmentInteractor` in it's own standalone component.

* For #4396 - Refactored Bookmark related tests

Added a new `BookmarkControllerTest` tests class which complements the new
`BookmarkController` to ensure that it properly operates on `BookmarkFragment`

Also refactored the existing `BookmarkFragmentInteractorTest` to accommodate
`BookmarkFragmentInteractor`'s now more specialized behavior.
2019-08-19 08:34:57 -07:00
Tiger Oakes 3c1ce90f6f Fixes #2379 - Generic library selection 2019-08-06 11:10:50 -07:00
Tiger Oakes 6e2ea0750e Issue #2379 - Use LibrarySiteItemView in history 2019-08-02 17:15:41 -07:00