Commit Graph

334 Commits (48ea10cd9d62ae924757a528656265f5805019f1)

Author SHA1 Message Date
ekager f801f32027 No issue: Fix leaks in BookmarkFragment 4 years ago
Grisha Kruglov 853a0acab4 Closes #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 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
Michael Comella 4437ddd536 No issue: Move Do and OpenClass to utils pkg.
They were both in their packages by themselves, which feels unnecessary.
Unfortunately, a utils pkg is discouraged by kotlin but we don't have a
better place for them right now. Maybe an annotations/ pkg for the
latter?
4 years ago
Sawyer Blatz e3ed7ed268
Issue #9128 & #9222 & #9499: Refactors snackbar creation and fixes placement (#9628) 4 years ago
David Walsh 26137f63a2
Prevent favicons from flashing when items are selected in History (#9233) 4 years ago
ekager fd60270da8 For #9533 - Switch to using enum for Library Item Selected Telemetry 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
Mihai Branescu a23bcebb5d For #8972 Replaced purple colors to match the rest of the app 4 years ago
Mihai Branescu ab04155222 For #8653 - changed menu strings 4 years ago
David Walsh 681d6cf8a1 For #8652 - Allow sharing multiple bookmarks 4 years ago
Sawyer Blatz cc8f34b68b
For #8773: Fixes issue with snackbar placement on ContextMenu (#8942) 4 years ago
Harshal Lele e318cd7d15 fix #8135 - remove getColorFromAttr 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
Tiger Oakes c0d7bc5bd5 Use navArgs helper in fragments 4 years ago
Emma Malysz 5e9b753acb For #7473, delay inflation of toolbar
Improve performance of HomeActivity.onCreate by delaying this inflation.
We use a ViewStub and inflate the first time the actionbar is accessed.
4 years ago
Kaaira Gupta e291c6905c For #3813 - Create a save button for bookmark editing 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
Mihai Branescu ea2411a88b Feature/#220 language menu (#7070)
* For #220
- Added advanced header + locale settings item in the settings fragment

* For #220
- Added locale selection page with lib state + handling of locale changes

* For #220
- Removed registering for locale changes in the manifest, allow system
to restart activity in that scenario

* For #220
- Added unit tests for locale settings page

* For #220: fixed an outdated unit test
ga-a

Co-authored-by: Severin Rudie <Baron-Severin@users.noreply.github.com>
4 years ago
Severin Rudie 9cbc3f7a4a
7410 remove rxjava (#7426)
* For #7410: rewrite updateBookmarkFromObservableInput with coroutines

* For 7410: remove RxJava from project. :(

* For 7410: converted updateBookmarkFromTextChanges to Flow per review
4 years ago
Sawyer Blatz c7c4ad051a
For #6413: Adds more snackbar positioning logic (#7444)
* For #6413: Adds more snackbar positioning logic

* Refactor
4 years ago
Sawyer Blatz 3fb060f682
For #6413: Fixes snackbar positionining for bottom toolbar (#7415)
* For #6413: Fixes snackbar positionining for bottom toolbar

* For #6413: Cleans up snackbar usage
4 years ago
Suraj Shah 6344a8892d For #7041 - Respect current mode when opening library items (#7311)
* Fixes #7041
Consumes `browserMode` from home activity for tap method of bookmark

* Fixes spaces

* Cleaning tests

* Cleaning tests
5 years ago
Josh Vocal 43354489a1 For #7253 - Replace anko setters 5 years ago
David Walsh e727ae5d7e Fix 5366 - Use VectorDrawableCompat for all imagery (#7221)
* Fix 5366 - Use VectorDrawableCompat for all imagery

* Fix detekt lint issues

* Restore previous comment contents
5 years ago
Afzal Najam b9656a978e Hide add folder option when in Desktop Bookmarks folder 5 years ago
cesar 4422e3ed39 Closes #6731 - fixed BookmarkNode minus operator and deleteOperation 5 years ago
Jeff Boek 1b1f9348dc No Issue - Fixes warnings / compiler errors with A-C update 5 years ago
Mihai Adrian 4fd3aa8649
For #2570: Hide 3-dots menu for all library items when in select mode. (#6736)
notifyDataSetChanged to avoid not displayed but created items not being redrawn
5 years ago
Tiger Oakes 422faaf7c0 Add toolbar helpers (#6531) 5 years ago
Tiger Oakes 7e8f079269
Use ShareData with ShareFragment (#6698) 5 years ago
Daphne Liu 4cfbaf2dc4 Switched to AC string extensions (#6258)
* Switched to AC string extensions

* Clean up imports
5 years ago
Tiger Oakes 0a86676563 For #6523 - Remove close button in library 5 years ago
cesar 560fa7a5b5 For #6594 - Trigger keyboard automatically when creating a bookmark folder 5 years ago
cesar 063115b215 For #6593 - Hide keyboard when quitting add bookmark folder flow 5 years ago
Mihai Adrian 55a200907a For #2570: Hide 3-dots menu for all library items when in select mode. (#6321)
Used notifyItemRangeChanged to redraw already drawn items.
5 years ago
Severin Rudie 8d68317388
4844 fix url elision (#6588)
* For #4844: add test cases for url elision

* For 4844: implement toShortUrl to pass test cases

* For 4844: update plumbing to use toShortUrl

* For 4844: adds/handles suggested url elision test case
5 years ago
mcarare f6a66562dd For #4487 Set activity title only once in Bookmark fragment
Removed label from nav_graph that caused label to be set for each navigation
Removed title setting in onCreate() called for each navigation
Changed logic for checking current root when setting UI for normal mode
5 years ago
mcarare 13637c59a2 For #6543 Hide keyboard when saving a new bookmarks folder 5 years ago
ValentinTimisica e1f3611fdd Fixes #6408: Pop stack to homeFragment when opening bookmarks from homeFragment
When bookmark fragment is opened from homeFragment, libraryFragment does not
exists so the popBackStack(R.id.libraryFragment, true) would have failed. So
the solution for this was to pop back stack to homeFragment when the
bookmarks/history fragments are opened from homeFragment.
5 years ago
Mihai Branescu 432d5fbff4 For #5848 Wrong toolbar colour - edit bookmark fragment (#6047)
- Moved toolbar coloring to extension method
- Refactored classes using it
- Removed selection mode colouring for EditBookmarkFragment toolbar,
making it only black and white (normal mode)
5 years ago
Pawel Obarzanek 40cda1d758 Closes #2435 Change edit icon to share icon on the book… (#6137)
* Closes mozilla-mobile#2435 Change edit icon to share icon on the bookmark toolbar

* Closes mozilla-mobile#2435 Changed raw string to string resources

* Pass bookmark arguments to share fragment

* Closes mozilla-mobile#2435 add orEmpty
5 years ago
Tiger Oakes 4e3a3665d6 For #3366 - Use one layout for edit/add bookmark (#5900) 5 years ago
MozLando 8e4d7248ac Merge #5908
5908: Closes #5876: Removed @ObsoleteCoroutinesApi in tests r=sblatz a=shldhll


### Pull Request checklist
<!-- Before submitting the PR, please address each item -->
- [x] **Quality**: This PR builds and passes detekt/ktlint checks (A pre-push hook is recommended)
- [ ] **Tests**: This PR includes thorough tests or an explanation of why it does not
- [ ] **Screenshots**: This PR includes screenshots or GIFs of the changes made or an explanation of why it does not
- [ ] **Accessibility**: The code in this PR follows [accessibility best practices](https://github.com/mozilla-mobile/shared-docs/blob/master/android/accessibility_guide.md) or does not include any user facing features

### After merge
- [ ] **Milestone**: Make sure issues finished by this pull request are added to the [milestone](https://github.com/mozilla-mobile/fenix/milestones) of the version currently in development.

### To download an APK when reviewing a PR:
1. click on Show All Checks,
2. click Details next to "Taskcluster (pull_request)" after it appears and then finishes with a green checkmark,
3. click on the "Fenix - assemble" task, then click "Run Artifacts".
4. the APK links should be on the left side of the screen, named for each CPU architecture

Co-authored-by: shldhll <iam.shldhll@gmail.com>
5 years ago
Mihai Adrian 167c6dca93 For #2570: Hide 3-dots menu for all library items when in select mode (#5699)
Removed items from RecyclerView cache to allow setting the new visibility
Disabled hidden buttons, otherwise they could still be clicked
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 d5c3433041 Use the new fragment constructor 5 years ago
Denys M e55eda30fb For #3563. Use `ListAdapter` for Bookmark folder selection list. 5 years ago
Tiger Oakes d028c97112 For #5213 - Use support library attributes 5 years ago
Tiger Oakes ee1f040e53 No issue: Move signedIn tracking to BookmarksSharedViewModel (#4755) 5 years ago
Emily Kager 3f41a4e9c6 No issue: Update navigation library 5 years ago
Mihai Adrian 62ae025d65 For #4991:Ensured deleteSelectedBookmarks deletes all selected bookmarks (#5559)
Moved the deletion to a CoroutineScope(IO) to decouple from fragment lifecycle
Used local val tempStorage to keep reference to bookmarkStorage of outside class
Ran deletions with awaitAll to avoid concurrency issues on storage
5 years ago
Severin Rudie dffa61bf16 Closes #4513: fixes bookmark tests broken by loading change
Note that BookmarkFragmentStoreTest changes preserve existing behavior, which in many cases is more expansive than the test name implies
5 years ago
Severin Rudie fd7f1b2665 Closes #4513: adds tests for bookmark loading state 5 years ago
Severin Rudie fbdd537bc7 Closes #4513: show progress bar when loading bookmarks 5 years ago
Severin Rudie ca6c324f29 Issue #4513: added isLoading to bookmark state
This was added to the state object as a top level param because it could reasonably coexist with any value of `tree` or `mode`. Even if we don't now, we may someday want to display a loading indicator while also showing cached bookmarks.

For now, we set isLoading to false whenever we receive any bookmarks
5 years ago
Severin Rudie 96472a533a Issue #4513: fix mismatched bookmark listener lifecycles
The mismatch here was creating potentially inconsistent states. When first put into a CREATED or STARTED state, the listener would not be active, however after going through onResume it would then stay active until destroyed.

We should only be navigating to bookmarks when in a RESUMED state, so this change should be safe. I tried it a few times to verify. But I've been wrong before!
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
Tiger Oakes e3c60faf24 Move BookmarkNode extensions to helper class (#4752) 5 years ago
Tiger Oakes 05a4faec78 Add tryGetHostFromUrl and update ExceptionDomains 5 years ago
Tiger Oakes 284cbab9ea Use .orEmpty() 5 years ago
Sawyer Blatz e247870b9f
For #5277: Updates string for delete browsing data (#5309) 5 years ago
Mihai Adrian c8bc144114 For #2570: Hide 3-dots menu when in select mode for bookmarks and history (#5173)
Show or hide overflow menu for entire list is triggered when mode is changed
For bookmarks, due to implementation of selection and diffUtil,
additional check is necessary for current item (last selected) that is redrawn
5 years ago
Tiger Oakes 4acf48e817 Fixes #5212 - Change tint in onCreateOptionsMenu
Also fixes #5213
5 years ago
Tiger Oakes d0ef2d40c2 Move bookmark navigation listener to separate file 5 years ago
Sawyer Blatz cd533854e6
No issue: Only use iconTint in XML for bookmark menus (#5145) 5 years ago
Grisha Kruglov 231924f5eb Fix breaking services APIs changes 5 years ago
Sebastian Kaspari ba05d21657 Fix ktlint MaxLineLength issues. 5 years ago
Sebastian Kaspari 38d97fda8b Stores: Reduce visibility of reducer functions. 5 years ago
Sebastian Kaspari 2723a55b03 Rename HistoryStore/State/Action to HistoryFragmentStore/State/Action. 5 years ago
Sebastian Kaspari 76063e307a Rename BookmarkStore/State/Action to BookmarkFragmentStore/State/Action. 5 years ago
Colin Lee 709588572a
For #5055: Crash when opening bookmarks (#5058) 5 years ago
Suraj Shah 66a8c04967 Fixes #4488: Shows snackbar on bookmark deletion from edit fragment (#4792)
* Fixes #4488
Updates changelog

* Removes wildcard imports.

* Removes custom label in use, replaces with let
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
ekager ffbbe119f3 For #3967 - Invoke pending deletion on back pressed 5 years ago
Tiger Oakes c475bc87cf Move classes out of top-level package 5 years ago
Jeff Boek 68f5d211d3 For #4326 - Updates codebase to support latest version of detekt 5 years ago
Emily Kager c1b1c2f332 For #3967 - Invokes pending deletion with more bookmark actions (#4522) 5 years ago
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.
5 years ago
Grisha Kruglov b38b94ed79 Closes #4671: Fix a potential NPE in BookmarkFragment 5 years ago
Grisha Kruglov 634ee184a6 No issue: add some BookmarkFragmentInteractor tests 5 years ago
Grisha Kruglov f323105163 No issue: reduce code duplication in BookmarkFragmentInteractor 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 8194e0778e For #4026 - Update BookmarkDiffUtil to update on Title or URL change 5 years ago
Emily Kager 0604e9858d Closes #3939 - Adds strings for delete browsing history 5 years ago
ValentinTimisica 71aedc79fe Fixes #3922: Added accessibility announcement for history empty state.
Sent an announcement when the list becomes empty in order to tell the user
that there is no history.
5 years ago
Emily Kager 23bc8f4320 Fro #4563 - Update delete button alpha when history mode changes 5 years ago
Tiger Oakes 3c1ce90f6f Fixes #2379 - Generic library selection 5 years ago
Emily Kager 6f7ae227a8 Closes #4540 - Set correct tint for select bookmark folder icon (#4541) 5 years ago
Emily Kager a526e0fad3 For #4455 - Rename history headers by hours and days (#4478) 5 years ago
Sören Hentzschel bfd4849064 For #1427 - enter multi select mode with single click on favicon in library 5 years ago
Nikit Bhandari 671727c3e8 For #4341 use camelCase for views referenced from code 5 years ago
Tiger Oakes 6e2ea0750e Issue #2379 - Use LibrarySiteItemView in history 5 years ago
mihai-adrian bac2e40eb2 fixes #4435 - changed title of menuitem for delete and added content description
setting menu title should also set content description. I added the setContentDescription programmatically in order to ensure that the content description is being set. If content description matches title it won't be read twice
5 years ago