Commit Graph

978 Commits (990bfa7e6dd5894d61473a41da6129e6947974e2)

Author SHA1 Message Date
MarcLeclair 990bfa7e6d
16900 make navgraph inflation asynchronous (#18889)
* For #16900: implement async navgraph inflation

For #16900: removed nav graph from xml

For #16900: inflate navGraph programatically

For #16900: Made NavGraph inflation asynchronous

For #16900: Changed to block with runBlocking

For #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 #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 #16900: inflateNavGraphAsync now takes navController

For #16900: Pass lifecycleScope to NavGraphProvider

For #16900: removed unused mock

For #16900: Added linter rules for navigate calls

We need linting rules to make sure no one calls the NavController.navigate() methods

For #16900: Added TestRule to help abstract the mocks in the code

For 16900: Fix linting problems

For #16900: Cleaned duplicated code in tests

For #16900: cleaned up NavGraphTestRule for finished test

For #16900: had to revert an accidentally edited file

For #16900: rebased master

* For #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 #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
mcarare ba218e638b For #18375: Add experiment for set default browser New Tab card. 3 years ago
Jonathan Almeida 38a7921913 Close #18973: Fix references to info banner 3 years ago
Roger Yang bc90e193a2 Closes #18522: Re-add call to action in tabs tray 3 years ago
Roger Yang b3f5e557cc
Closes #18899: Update content description string for synced tabs icon (#18963) 3 years ago
Gabriel Luong 37b6079d83
For #18268, #18269 - [Saved cards] Display a list of Saved cards fetched from the credit card storage (#18808) 3 years ago
Gabriel Luong c31d507e19
For #18743 - Change the top sites label colour and size (#18752) 3 years ago
VaishnaviShri 3260cbd986 For #8545: Fix unnecessary scroll in home screen
Changed the height of the recycler view inside the home fragment
to ‘wrap_content’ to avoid scrolling if the viewport is not filled
with elements.

Closes #8545
3 years ago
Gabriel Luong 1f320fd2ad
No issue - Remove generic strings for more specificity (#18769) 3 years ago
mcarare 2687092f90 For #18717: Use normal theme color for tab tray synced tabs. 3 years ago
Roger Yang caf8ac8207
Closes #18514: Re-add tab counter in tabs tray (#18659) 3 years ago
Jonathan Almeida d167bc7b67 Issue #14117: Add Synced Tabs as a page in the tabs tray 3 years ago
Gabriel Luong 46a267a494 For #18243 - Add a credit card editor screen 3 years ago
yichiehc 7c46f5e74f
For #16830: Increase the Show in private sessions option in Search Preferences Settings (#18689)
* For #18242 - Wire up "Sync cards across devices" preference with SyncPreferenceView (#18605)

* For #16830: Increase the Show in private sessions option in Search Preferences Settings

Co-authored-by: Gabriel Luong <gabriel.luong@gmail.com>
3 years ago
Arturo Mejia 869c99afaa For #15372 Optimize the order and messages of onboarding cards 3 years ago
Gabriel Luong 578d6b5205
For #18240 - Add a Credit Card preference screen (#18410)
- Removes an unused preference key "pref_key_credit_cards_addresses"
3 years ago
Jonathan Almeida 05aa948dc7 Issue #17822: Create a tabs tray layout and fragment
Co-authored-by: Kate Glazko <kglazko@Kates-MacBook-Pro.local>
3 years ago
Arturo Mejia ec52c56ed9 For issue #18132 remove icons from Settings screen 3 years ago
mcarare 62bd3b4f95 For #18009: Correctly report items in adapter for a11y services. 3 years ago
Mugurell 8bf1cae2ca For #10686 - Use the AC custom behavior for both the top and bottom toolbars
This comes to unify the experience (with improvements but also specific issues)
for the url toolbar irrespective of it being placed at the bottom or at the top
Going further this will ease development and ensure the best UX for users.
3 years ago
mcarare 994ec4d55a For #17364: Make hint scrollable and do not overlap other elements. 3 years ago
rxu be0382fca7 Pop out privacy notice in first launch in MozillaOnline builds
Add privacy notice related strings

Pop out privacy notice with onboarding

Using embeded geckoview to display details about privacy

Present or hide privacy pop window according to isMozillaOnline

Add activity_privacy_content_display.xml into layoutNotToTest due to EngineView
3 years ago
fevziomurtekin ddd49170d6 For issue: #16394 Fix UI for consider increasing some elements from ETP-Exceptions page 3 years ago
Kate Glazko ae528e5ab2 For #15181: Remove All Downloads From Settings 3 years ago
mcarare af1af358a3 For #14011: Remove new line character and spaces from string. 3 years ago
Arturo Mejia b9bdc288cb For issue: #16846 Add ui for controlling exceptions for auto play 3 years ago
Mugurell d8dc1c4803
For #16519: Add space above Delete History button (#17492)
add space above Delete History button

Co-authored-by: Jocelyne Abi Haidar <jocelyne.ah1@gmail.com>
3 years ago
Arturo Mejia 00d971e9d3 For #16847: Allow autoplay to controlled via the toolbar. 3 years ago
Suraj Shah 15f3743ca0
For #16271 - Fixes ripple being cut-off in Saved logins sort toolbar (#16741) 3 years ago
Marcello Galhardo 381f22449b
Closes #17118: Fix font spacing when long pressing a URL (#17164) 3 years ago
mcarare 251d652833 For #16027: Allow elements to be selected separately by a11y services. 3 years ago
Elise Richards 6dadecacc2
For #15703 and #17133: allow ETP redirect trackers setting to be customized (#17137)
* Remove ETP redirect trackers feature flag. Add category to ETP panel view.

* Add redirect tracker category to ETP custom settings
3 years ago
mcarare 4b2dc28d57 For #16992: Align clipboard link and text with scan button. 4 years ago
ekager 2796a7ff18 For #16675 For #16398 - Fix button styling 4 years ago
Elise Richards 813693f1d3
Remove hidden fab in tabs tray (#16972) 4 years ago
Codrut Topliceanu 556fea5591
For #15636 - Focus a11y collection on snackbar view tap (#16853)
With accessibility enabled, when adding a site to a collection and tapping "View" on the snackbar, we send a request for focus and an `AccessibilityEvent.TYPE_VIEW_FOCUSED` to the specified collection.
4 years ago
Kate Glazko ef01cdcefe For #16541: Download UX Updates 4 years ago
Emilio Cobos Álvarez 9d5afd501e Add support for EME permission.
This accompanies the changes in mozilla-mobile/android-components#9121.

Closes #1175
4 years ago
ekager e428694a51 For #16397 - Fixes SignOutFragment crash and invisible button 4 years ago
Elise Richards 77f061c362 Closes #8791: Use A-C tab counter and upgrades to A-C 69.0.20201203202830
Upgrades to A-C 69.0.20201203202830 and addresses breaking changes:
- Upgrades androidx workmanager to 2.4.0 in line with A-C.
- RecordingDevicesNotificationFeature was removed
- SearchUseCases accept parent session ID instead of session itself
4 years ago
Mihai Adrian Carare b2b558fe39
For #16745 - Allow preference layout to increase height if needed. (#16752) 4 years ago
ekager b9737bde95 For #16351 - Add divider lines for search dialog 4 years ago
mcarare 519885da43 For #15788: Remove nested constraint layout in tabs tray. 4 years ago
mcarare cf162c69d1 For #15788: Remove nested layouts in search dialog layout. 4 years ago
Bryan Kok 92b93081e5
Replace lingering occurence of ic_hollow_share with ic_share_filled (#16548) 4 years ago
LeoMaldonado 2d8fe7a9ad Closes #16345: Update share icon shape
updating share icon to a filled shape, like default toolbar menu across all app
4 years ago
Mugurell c3179512de
For #16500 - Ensure CardView clips ImageView on lower APIs (#16507)
ImageViews are normally not clipped but extend to cover the entire width and
height set.
CardViews as a parent can help with that but on lower APIS they still need a
shapeAppearance which is a property already in the added style.
4 years ago
mcarare c427ebf8d5 For #16416: Remove save to collection button from tab a11y list. 4 years ago
ekager a8db85fc22 For #16132 - Revise multiselect mode UI 4 years ago
mcarare 928d320836 For #16426: Allow multiselect title to be selected by a11y services. 4 years ago