Commit Graph

348 Commits (8b1abfbbf084c4199ffa6fde0e01b4181b2cc7a1)

Author SHA1 Message Date
Arturo Mejia 0b43eb879e For #19970 [Crash] IllegalStateException when navigating to TP panel 3 years ago
Gabriel Luong 0f861236c1 Add history metadata feature to the settings menu 3 years ago
mcarare b2a5723bad For #20292: Use tint for home button icon. 3 years ago
Gabriel Luong 7aea29d57b For #19951 - Use Proton icon for new home button 3 years ago
Roger Yang 74c1cc82fb Closes #19921: Update appcompat and fragment dependencies to 1.3.x 3 years ago
Christian Sadilek ba19960b7e Issue FNX-22435: Introduce History metadata
Co-authored-by: Grisha Kruglov <gkruglov@mozilla.com>
3 years ago
Arturo Mejia 2f879f8e9d Fix site permissions breaking changes 3 years ago
Gabriel Luong ace835d1e8 For #19876 - Part 3: Add a FeatureFlag to keep the Home screen button in Nightly 3 years ago
Gabriel Luong 044c9a5b40 For #19876 - Part 2: Add a Home screen button to the browser toolbar 3 years ago
Gabriel Luong 86a9c56782 For #19876 - Part 1: Refactor BrowserToolbarInteractor
- Renames `BrowserInteractor` to `DefaultBrowserTolbarInteractor`
- Renames `BrowserTooolbarViewInteractor` to `BrowserToolbarInteractor`
- Refactors `BrowserToolbarViewInteractor` interface from `BrowserToolbarView.kt` to  `BrowserToolbarInteractor` as `BrowserToolbarInteractor`
3 years ago
Arturo Mejia f0bb70e354 For #19789 Start on Home after some amount of time 3 years ago
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
Christian Sadilek 2d87307144 Remove remaining usages of Session[Manager] in BrowserFragment 3 years ago
Mugurell 3311e68d14 For #17686 - Use a custom behavior to scroll InfoBanner with the top toolbar
Previously when the toolbar was on top the banner was inflated in the toolbar's parent - an AppBarLayout.
After migrating to use a custom behavior for scrolling the toolbar and not use
anymore the AppbarLayout for this we needed a new solution.
Using a new behavior to keep this banner in sync with the y translation of the
toolbar gives us most of the old behavior back.
3 years ago
Christian Sadilek 45c0ac85ec Remove SessionManager from BrowserFragment/ToolbarGestureHandler 3 years ago
Sebastian Kaspari 023ddcc131 Refactor ExternalAppBrowserActivity and ExternalAppBrowserFragment to not use Session(Manager). 3 years ago
Sebastian Kaspari 051988ecff Migrate some "selected tab" reads from SessionManager to BrowserStore. 3 years ago
Christian Sadilek 978b555387 Closes #17443: IllegalStateException in startPostponedEnterTransition on HomeFragment 3 years ago
Christian Sadilek 53f77e422b Closes #17441: NPE when invalidating toolbar in response to reader changes 3 years ago
Arturo Mejia 00d971e9d3 For #16847: Allow autoplay to controlled via the toolbar. 3 years ago
Arturo Mejia 0aa44c93cd Closes issue #16945 Refactor TrackingProtectionOverlay to observe session via store. 3 years ago
Hakkı Kaan Çalışkan e41cc5a414 For #17303: Move ext fun runIfFragmentIsAttached to utils
move to ext
3 years ago
Christian Sadilek 0b99669753 Closes #16949: Refactor OpenInAppOnboardingObserver to use browser store 3 years ago
Sebastian Kaspari d2b8decaeb Switch to new feature-tab-collections API. 3 years ago
Christian Sadilek d8f3127e08 Closes #16946: Refactor PwaOnboardingObserver to use browser store 3 years ago
Christian Sadilek f0078097f8 Prepare for A-C Session[Manager] observable deprecation 3 years ago
Codrut Topliceanu 79d1c08402
For #16629 - Fix for collection snackbar View button (#16679) 3 years ago
ekager 9b2162fca2 For #16199 - Don't pass BrowserToolbarView in onStart when we just need parent 4 years ago
Juan C. Goncalves eb0712d9b4
For #11397 - Add lint rule for AppCompatResources instead of ContextCompat (#16011) 4 years ago
Michael Comella f19c9920f9 For #13959: move resetAfter into StrictModeManager.
In a followup PR, we need to add state to strictModeManager (the
number of suppressions). This is much simpler to do when this is defined
as a class rather than an object. However, when this is defined as a
class, `resetAfter` needs access to the strictModeManager. Instead of
passing it in as an argument, it made sense to move this function onto
the strictModeManager instead.

Since folks are used to calling:
```
StrictMode.ThreadPolicy.allowThreadDiskReads().resetAfter
```

We're going to have to add a lint check to prevent them from doing that.
4 years ago
ekager 24983af94e For #15291 - Limit current CFRs to show max one every 3 days 4 years ago
Mugurell a6a50d78e0 For #14903 - Prevent BrowserFragment's view leak 4 years ago
Mugurell d8d896c500 For #10240 - New preferences to control gesture based features
Three new settings and one for which this patch just pre-lands the strings.
The behavior for the "Swipe toolbar up to open tabs" is to be added as part of
a later ticket.
4 years ago
mcarare c350a5f3b9 For #9506: Add session observer to check conditions for displaying banner. 4 years ago
Tiger Oakes 0b333fe48a For #9056: Search from custom tab 4 years ago
Jonathan Almeida f3b870d356 For #11918: Take a screenshot when clicking the tab tray
We looked into taking a screenshot right before leaving the
BrowserFragment, however this call will always fail since it's
non-blocking (we never want it to be blocking too), and we will never
receive a screenshot when a session is detached from an EngineView
before the callback is complete.

In Fenix, we can nicely evade this by taking a screenshot when click
the tabs tray icon, which is where you would want to see the most
up-to-date thumbnail of the tab and also does not leave the
BrowserFragment as well.
4 years ago
Kainalu Hagiwara d49ca515f4 For #13330 - Remove feature flag for swipe to switch tabs. 4 years ago
Kainalu Hagiwara 2bdcbe5db9 For #11935 - Move BrowserThumbnails to BrowserFragment. 4 years ago
Kainalu Hagiwara bef98698cb For #12904 - Conditionally inflate SwipeGestureLayout in BaseBrowserFragment.
Changing the root view of BaseBrowserFragment from a CoordinatorLayout
to a SwipeGestureLayout has caused some regressions, particularly in
snackbar behavior. Lets prevent those regressions from occuring in
builds where the feature flag for gestures is off by only adding the
SwipeGestureLayout when the feature flag is on.
4 years ago
Kainalu Hagiwara 58ccc64386 Fix UI tests.
We need to pass a CoordinatorLayout instead of a SwipeGestureLayout to
FenixSnackbar.make() in BaseBrowserFragment to prevent UI tests from
breaking. We also need to remove a few view IDs from the tab preview.
4 years ago
Kainalu Hagiwara e7dc5580b2 For #3481 - Implement swipe on toolbar to switch tabs. 4 years ago
Tiger Oakes e809df0858 Pass settings and metrics to CFR 4 years ago
ekager e358f95eed For #12364 - Only show PWA prompt the third time a user visits installable site 4 years ago
ekager 0add94e353 For #11324 - Adds trash icon to swipe to delete 4 years ago
David Walsh 85cebf8796 For 11889 - Fix snackbar for collection creation in browser fragment 4 years ago
MickeyMoz da39a7e671 Update Android Components version to 49.0.20200705130154. 4 years ago
ekager 60069395eb Update AC to 48.0.20200627130132 and fix breaking changes 4 years ago
Tiger Oakes ed334788e8 For #11903: Enforce private theme in custom tabs 4 years ago
Sachin 9269a53b21
for #11615 allowed strictMode disk read for violations made by the OS. (#11658) 4 years ago
Tiger Oakes 704fc6f983 Use updated webapphidetoolbarfeature 4 years ago