1
0
Fork 0
Commit Graph

331 Commits (69a9aeebae193107ba122bf60e5b60386666d85b)

Author SHA1 Message Date
ekager b8fba63be4 For #9890 - Do not display full screen snackbar with toolbar padding 2020-04-13 14:56:51 -07:00
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?
2020-04-08 12:39:22 -07:00
Sawyer Blatz e3ed7ed268
Issue #9128 & #9222 & #9499: Refactors snackbar creation and fixes placement (#9628) 2020-04-02 12:30:13 -07:00
David Walsh 26137f63a2
Prevent favicons from flashing when items are selected in History (#9233) 2020-04-01 15:43:21 -07:00
ekager fd60270da8 For #9533 - Switch to using enum for Library Item Selected Telemetry 2020-04-01 15:29:08 -07:00
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
2020-03-27 15:53:31 -07:00
Mihai Branescu a23bcebb5d For #8972 Replaced purple colors to match the rest of the app 2020-03-25 00:13:59 +02:00
Mihai Branescu ab04155222 For #8653 - changed menu strings 2020-03-22 00:03:26 +02:00
David Walsh 681d6cf8a1 For #8652 - Allow sharing multiple bookmarks 2020-03-20 20:28:36 -07:00
Sawyer Blatz cc8f34b68b
For #8773: Fixes issue with snackbar placement on ContextMenu (#8942) 2020-03-12 09:54:13 -07:00
Harshal Lele e318cd7d15 fix #8135 - remove getColorFromAttr 2020-03-02 15:48:33 -07:00
Jeff Boek 541bcf072a Reverts all BrowsingModeManager changes 2020-02-24 00:24:07 -08:00
Simon Chae 2c01022c4b For #8153: Allow web-ext to open new tabs in correct browsing mode 2020-02-12 13:41:16 -08:00
Sebastian Kaspari f0af6d6f6e Update Mozilla Android Components to 32.0.0-SNAPSHOT. 2020-02-10 17:13:58 +01:00
Tiger Oakes c0d7bc5bd5 Use navArgs helper in fragments 2020-02-05 16:37:45 -08:00
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.
2020-01-24 15:21:42 -08:00
Kaaira Gupta e291c6905c For #3813 - Create a save button for bookmark editing 2020-01-21 16:03:33 -08:00
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).
2020-01-06 18:27:51 +02:00
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>
2020-01-03 18:15:35 -08:00
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
2020-01-03 14:37:12 -08:00
Sawyer Blatz c7c4ad051a
For #6413: Adds more snackbar positioning logic (#7444)
* For #6413: Adds more snackbar positioning logic

* Refactor
2020-01-02 14:31:52 -08:00
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
2019-12-30 14:43:15 -08:00
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
2019-12-23 12:26:47 -05:00
Josh Vocal 43354489a1 For #7253 - Replace anko setters 2019-12-19 13:42:50 -08:00
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
2019-12-16 20:35:36 -08:00
Afzal Najam b9656a978e Hide add folder option when in Desktop Bookmarks folder 2019-12-13 17:51:15 -08:00
cesar 4422e3ed39 Closes #6731 - fixed BookmarkNode minus operator and deleteOperation 2019-12-02 16:18:48 +00:00
Jeff Boek 1b1f9348dc No Issue - Fixes warnings / compiler errors with A-C update 2019-11-28 12:45:45 +01:00
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
2019-11-27 10:40:38 +02:00
Tiger Oakes 422faaf7c0 Add toolbar helpers (#6531) 2019-11-25 15:36:47 -05:00
Tiger Oakes 7e8f079269
Use ShareData with ShareFragment (#6698) 2019-11-25 11:07:21 -08:00
Daphne Liu 4cfbaf2dc4 Switched to AC string extensions (#6258)
* Switched to AC string extensions

* Clean up imports
2019-11-22 23:15:51 -08:00
Tiger Oakes 0a86676563 For #6523 - Remove close button in library 2019-11-21 15:27:18 -08:00
cesar 560fa7a5b5 For #6594 - Trigger keyboard automatically when creating a bookmark folder 2019-11-18 20:07:22 -08:00
cesar 063115b215 For #6593 - Hide keyboard when quitting add bookmark folder flow 2019-11-18 20:07:22 -08:00
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.
2019-11-15 15:48:48 -08:00
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
2019-11-15 14:25:50 -08:00
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
2019-11-12 08:21:53 -08:00
mcarare 13637c59a2 For #6543 Hide keyboard when saving a new bookmarks folder 2019-11-12 08:09:55 -08:00
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.
2019-11-07 16:00:48 -08:00
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)
2019-10-25 21:41:48 -07:00
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
2019-10-22 14:34:05 -07:00
Tiger Oakes 4e3a3665d6 For #3366 - Use one layout for edit/add bookmark (#5900) 2019-10-21 10:06:08 -07:00
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>
2019-10-14 16:52:22 +00:00
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
2019-10-10 23:02:22 -07:00
shldhll 8e17ac05b1 Optimized imports. Closes #5876 2019-10-10 04:17:43 +05:30
shldhll f907ec52f0 Removed ObsoleteCoroutinesApi in tests. Closes #5876 2019-10-10 04:04:51 +05:30
Tiger Oakes d5c3433041 Use the new fragment constructor 2019-10-07 11:07:48 -07:00
Denys M e55eda30fb For #3563. Use `ListAdapter` for Bookmark folder selection list. 2019-10-07 10:40:55 -07:00
Tiger Oakes d028c97112 For #5213 - Use support library attributes 2019-10-06 16:17:00 -07:00
Tiger Oakes ee1f040e53 No issue: Move signedIn tracking to BookmarksSharedViewModel (#4755) 2019-09-27 08:57:38 -07:00
Emily Kager 3f41a4e9c6 No issue: Update navigation library 2019-09-26 17:01:13 -07:00
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
2019-09-26 16:52:59 -07:00
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
2019-09-26 16:29:14 -07:00
Severin Rudie fd7f1b2665 Closes #4513: adds tests for bookmark loading state 2019-09-26 16:29:14 -07:00
Severin Rudie fbdd537bc7 Closes #4513: show progress bar when loading bookmarks 2019-09-26 16:29:14 -07:00
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
2019-09-26 16:29:14 -07:00
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!
2019-09-26 16:29:14 -07:00
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
2019-09-26 14:25:34 -07:00
Tiger Oakes e3c60faf24 Move BookmarkNode extensions to helper class (#4752) 2019-09-24 09:17:29 -07:00
Tiger Oakes 05a4faec78 Add tryGetHostFromUrl and update ExceptionDomains 2019-09-19 22:40:35 -04:00
Tiger Oakes 284cbab9ea Use .orEmpty() 2019-09-17 11:09:21 -07:00
Sawyer Blatz e247870b9f
For #5277: Updates string for delete browsing data (#5309) 2019-09-13 10:18:25 -07:00
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
2019-09-12 13:56:39 -07:00
Tiger Oakes 4acf48e817 Fixes #5212 - Change tint in onCreateOptionsMenu
Also fixes #5213
2019-09-12 10:30:49 -07:00
Tiger Oakes d0ef2d40c2 Move bookmark navigation listener to separate file 2019-09-10 16:53:09 -07:00
Sawyer Blatz cd533854e6
No issue: Only use iconTint in XML for bookmark menus (#5145) 2019-09-10 09:04:05 -07:00
Grisha Kruglov 231924f5eb Fix breaking services APIs changes 2019-09-05 13:38:15 +02:00
Sebastian Kaspari ba05d21657 Fix ktlint MaxLineLength issues. 2019-09-03 10:09:06 -07:00
Sebastian Kaspari 38d97fda8b Stores: Reduce visibility of reducer functions. 2019-09-03 10:09:06 -07:00
Sebastian Kaspari 2723a55b03 Rename HistoryStore/State/Action to HistoryFragmentStore/State/Action. 2019-09-03 10:09:06 -07:00
Sebastian Kaspari 76063e307a Rename BookmarkStore/State/Action to BookmarkFragmentStore/State/Action. 2019-09-03 10:09:06 -07:00
Colin Lee 709588572a
For #5055: Crash when opening bookmarks (#5058) 2019-08-31 17:41:50 -05:00
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
2019-08-28 10:12:39 -07:00
Emily Kager a65f220b39 For #4921 - Adds WindowFeature to BaseBrowserFragment 2019-08-27 15:33:59 -04:00
Sourabh 091778a4b9 For #4398 - add HistoryController (#4837) 2019-08-27 10:33:40 -07:00
ekager ffbbe119f3 For #3967 - Invoke pending deletion on back pressed 2019-08-23 15:32:27 -04:00
Tiger Oakes c475bc87cf Move classes out of top-level package 2019-08-21 13:52:30 -07:00
Jeff Boek 68f5d211d3 For #4326 - Updates codebase to support latest version of detekt 2019-08-21 13:50:51 -07:00
Emily Kager c1b1c2f332 For #3967 - Invokes pending deletion with more bookmark actions (#4522) 2019-08-21 08:36:41 -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
Grisha Kruglov b38b94ed79 Closes #4671: Fix a potential NPE in BookmarkFragment 2019-08-12 11:16:28 -04:00
Grisha Kruglov 634ee184a6 No issue: add some BookmarkFragmentInteractor tests 2019-08-09 17:27:58 -07:00
Grisha Kruglov f323105163 No issue: reduce code duplication in BookmarkFragmentInteractor 2019-08-09 17:27:58 -07:00
Tiger Oakes 52542708aa Consodilate private browsing code 2019-08-09 11:00:41 -07:00
Sawyer Blatz da06b0fb15
For #4508: Treats warnings as errors (#4543) 2019-08-07 14:00:53 -07:00
Emily Kager 8194e0778e For #4026 - Update BookmarkDiffUtil to update on Title or URL change 2019-08-07 00:37:16 -04:00
Emily Kager 0604e9858d Closes #3939 - Adds strings for delete browsing history 2019-08-06 16:06:56 -07:00
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.
2019-08-06 12:32:59 -07:00
Emily Kager 23bc8f4320 Fro #4563 - Update delete button alpha when history mode changes 2019-08-06 12:26:25 -07:00
Tiger Oakes 3c1ce90f6f Fixes #2379 - Generic library selection 2019-08-06 11:10:50 -07:00
Emily Kager 6f7ae227a8 Closes #4540 - Set correct tint for select bookmark folder icon (#4541) 2019-08-05 14:54:39 -07:00
Emily Kager a526e0fad3 For #4455 - Rename history headers by hours and days (#4478) 2019-08-05 11:12:22 -05:00
Sören Hentzschel bfd4849064 For #1427 - enter multi select mode with single click on favicon in library 2019-08-03 16:43:51 -07:00
Nikit Bhandari 671727c3e8 For #4341 use camelCase for views referenced from code 2019-08-03 09:25:55 -07:00
Tiger Oakes 6e2ea0750e Issue #2379 - Use LibrarySiteItemView in history 2019-08-02 17:15:41 -07:00
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
2019-08-02 17:09:24 -07:00
Jonathan Almeida ec96d134ff No issue: Fix breaking AccountObserver API 2019-08-02 13:40:50 -04:00
Colin Lee 33e881ca8a For #1539: Only allow delete when folders multi-selected (#4062) 2019-08-02 10:11:21 -07:00
Tiger Oakes c342a680d8 Fix crash for bookmarks 2019-08-01 18:57:35 -04:00