Commit Graph

283 Commits

Author SHA1 Message Date
Mozilla L10n Automation Bot
35c8de4ab5 [components] Import l10n. 2020-10-05 00:29:08 +00:00
Mozilla L10n Automation Bot
51662a3fe3 [components] Import l10n. 2020-10-04 00:25:33 +00:00
Mugurell
dd07185cce [components] For https://github.com/mozilla-mobile/android-components/issues/8356 - Null check down event in BrowserGestureDetector
Last ditch effort to prevent against crashes caused by ACTION_DOWN event being
null in GestureDetector.SimpleOnGestureListener#onScroll.

We can use the fact that the parameters are platform types and so can consider
the first parameter (that should be the ACTION_DOWN MotionEvent) being null so
that we won't automatically crash in such situations.
This will result in the toolbar not being animated as a result of a scroll
gesture by the user.

More investigations about why the ACTION_DOWN event is null are to be done in
android-components/issues/8552.
2020-10-02 06:05:35 +00:00
Mozilla L10n Automation Bot
b427b25d68 [components] Import l10n. 2020-09-25 00:22:10 +00:00
MozLando
3527f33d35 [components] Merge https://github.com/mozilla-mobile/android-components/pull/8307
8307: For https://github.com/mozilla-mobile/android-components/issues/8305 - Initialize browserToolbar in onLayoutChild r=Amejia481 a=Mugurell

Speculative fix that moves the initialization to another method that should
also be called before the user can interact with the toolbar.




Co-authored-by: Mugurell <Mugurell@users.noreply.github.com>
2020-09-11 13:41:56 +00:00
MozLando
4826505072 [components] Merge https://github.com/mozilla-mobile/android-components/pull/8357
8357: For https://github.com/mozilla-mobile/android-components/issues/8356 - Speculative fix for BrowserGestureDetector IAE r=pocmo a=Mugurell

Try to resolve a situation in which system's GestureDetector calls us as a
callback with null parameters, so triggering an IllegalArgumentException.
A possible explanation could be that not all MotionEvents are passed to the
GestureDetector, situation which this patch tries to fix.




Co-authored-by: Mugurell <Mugurell@users.noreply.github.com>
2020-09-11 10:08:37 +00:00
Mugurell
a2aa2df239 [components] For https://github.com/mozilla-mobile/android-components/issues/8356 - Speculative fix for BrowserGestureDetector IAE
Try to resolve a situation in which system's GestureDetector calls us as a
callback with null parameters, so triggering an IllegalArgumentException.
A possible explanation could be that not all MotionEvents are passed to the
GestureDetector, situation which this patch tries to fix.
2020-09-09 12:49:00 +03:00
Mozilla L10n Automation Bot
f67c8d27e1 [components] Import l10n. 2020-09-09 00:05:30 +00:00
Mugurell
3f2dd9d77f [components] For https://github.com/mozilla-mobile/android-components/issues/8305 - Initialize browserToolbar in onLayoutChild
Speculative fix that moves the initialization to another method that should
also be called before the user can interact with the toolbar.
2020-09-01 15:38:25 +03:00
Tiger Oakes
296a5007f7 [components] Fix failing toolbar menu test 2020-08-24 08:49:47 -07:00
Kirill Rakhman
5e13b69faf [components] Closes https://github.com/mozilla-mobile/android-components/issues/6813 Awesomebar: Add ability to accept suggestion from search completion without submitting 2020-07-31 18:29:40 +02:00
Tiger Oakes
a2dda76fac [components] Add nested menu functionality 2020-07-24 09:32:40 -07:00
Tiger Oakes
e83cf8b1d2 [components] Create new menu2 component
browser-menu v2: A new browser menu designed to work with lib-state.

This introduces a new API using immutable data classes to represent
options. Stateful functionality like the two-state button is replaced
with swapping out data classes and submitting a new list of options.

Internally this uses a recycler view and the view holders intentionally
do not map 1:1 to data classes. This way we can use different views
based on properties instead of introducing all new classes for every
combination of properties.
2020-07-24 09:31:23 -07:00
Mozilla L10n Automation Bot
44e2a0b045 [components] Import l10n. 2020-07-20 00:14:05 +00:00
MozLando
3b64c2ae40 [components] Merge https://github.com/mozilla-mobile/android-components/pull/7610
7610: Format mozac_browser_toolbar_displaytoolbar.xml r=pocmo a=gabrielluong

This fixes an unneeded indentation in `mozac_browser_toolbar_displaytoolbar.xml`



Co-authored-by: Gabriel Luong <gabriel.luong@gmail.com>
2020-07-15 15:00:45 +00:00
Mozilla L10n Automation Bot
05be1fe837 [components] Import l10n. 2020-07-10 00:29:50 +00:00
Mozilla L10n Automation Bot
b35c3c0b85 [components] Import l10n. 2020-07-09 13:47:36 +00:00
Gabriel Luong
79d609d314 [components] Format mozac_browser_toolbar_displaytoolbar.xml 2020-07-03 00:36:13 -04:00
Mozilla L10n Automation Bot
31b74100ff [components] Import l10n. 2020-06-23 00:07:59 +00:00
Mozilla L10n Automation Bot
df1ccae04d [components] Import l10n. 2020-06-17 00:05:05 +00:00
Sawyer Blatz
bc0c478dfd [components] For https://github.com/mozilla-mobile/android-components/pull/7301: Fix drawable ripple issues on BrowserToolbar
Co-authored-by: pocmo <skaspari@mozilla.com>
2020-06-11 10:38:08 -07:00
MozLando
d4e84f3966 [components] Merge https://github.com/mozilla-mobile/android-components/pull/7289
7289: Closes https://github.com/mozilla-mobile/android-components/issues/7288 - Only scroll the bottom toolbar if onStartNestedScroll … r=Mugurell a=miDeb

…was invoked first




Co-authored-by: Michael <michael.debertol@gmail.com>
2020-06-09 15:44:13 +00:00
Mozilla L10n Automation Bot
ef5a17643e [components] Import l10n. 2020-06-09 00:12:05 +00:00
Mozilla L10n Automation Bot
00d8f2d02f [components] Import l10n. 2020-06-08 00:04:09 +00:00
Michael
89ad435b50 [components] Closes https://github.com/mozilla-mobile/android-components/issues/7288 - Only scroll the bottom toolbar if onStartNestedScroll was invoked first 2020-06-07 22:16:41 +02:00
Mozilla L10n Automation Bot
dcefc358fc [components] Import l10n. 2020-06-04 00:07:24 +00:00
Mozilla L10n Automation Bot
2f593e567c [components] Import l10n. 2020-06-03 00:04:53 +00:00
MozLando
9d7c807693 [components] Merge https://github.com/mozilla-mobile/android-components/pull/7102
7102: Make sure the bottom toolbar is never stuck invisible r=Mugurell a=miDeb

Closes https://github.com/mozilla-mobile/android-components/issues/7101. This is my attempt to solve this issue. Essentially, if the user is scrolling upwards, but the toolbar is not being scrolled and not already showing or animating up, just forceExpand it.



Co-authored-by: Michael <michael.debertol@gmail.com>
2020-05-29 15:47:52 +00:00
Mozilla L10n Automation Bot
f01eb9f0b5 [components] Import l10n. 2020-05-27 00:04:26 +00:00
Michael
00fea49b54 [components] Make sure the bottom toolbar is never stuck invisible 2020-05-25 22:42:58 +02:00
Christian Sadilek
87f9565d97 [components] Closes https://github.com/mozilla-mobile/android-components/issues/5249: Long URI in the address bar will hang the UI 2020-05-19 17:57:01 -04:00
Sawyer Blatz
97b786528c [components] Makes updateUrl on EditToolbar public 2020-05-14 13:15:46 -07:00
Mugurell
fef084561d [components] For https://github.com/mozilla-mobile/android-components/issues/6978 - Catch reflection exceptions in BrowserGestureDetector
Although the fields BrowserGestureDetector want to modify through reflection
should be a stable part of the Android framework it was seen that on some
devices they do not exist.
Nothing more we can do in these cases than just prevent the reflection
exceptions bubbling up and potentially crash client apps.
2020-05-14 16:08:20 +03:00
Mugurell
70e4282ec9 [components] For https://github.com/mozilla-mobile/android-components/issues/2930 - Different BrowserToolbar behaviors depending on gestures
We'll now have a more in-depth understanding of user's gestures based on which
we can trigger different BrowserToolbar behaviors depending on if the user is
scrolling or zooming.

The ConstraintLayout parent will still inform us about when the scroll begins
and when the scroll ends but then actually incrementally updating the toolbar's
translation will be done in response to GestureDetector callbacks.
This also allows us to easily differentiate between horizontal and vertical
scrolls and only react for the latter.

If the user's gestures as inferred as zoom gestures (multi-finger scale or
quick-scale) the toolbar should not be animated.
This scenario is though affected by the fact that normally scroll gestures have
a much higher sensitivity (a 1 pixel movement is enough for a gesture to be
considered a scroll gesture) and so it is possible that even in the case of a
desired zoom gesture the scroll callbacks will be fired first.
When the gesture is identified as a zoom gesture we will immediately snap the
toolbar up/down but there might be a minor visual glitch because of this.
In an effort to reduce such races between scroll and zoom gestures I've lowered
the sensitivity of the ScaleDetector, this having the other effect that
multi-finger scrolls must now be more precise. Pinching while zooming will now
more often mean a zoom gesture and not animate the toolbar.
2020-05-12 13:34:17 +03:00
MozLando
6d2dac8df1 [components] Merge https://github.com/mozilla-mobile/android-components/pull/6860
6860: For https://github.com/mozilla-mobile/android-components/issues/6859 - Fix Clear button not showing when entering Search fragment r=rocketsroger a=codrut-topliceanu



Co-authored-by: codrut.topliceanu <codrut.topliceanu@softvision.ro>
2020-05-05 14:26:51 +00:00
codrut.topliceanu
4151ec662e [components] For https://github.com/mozilla-mobile/android-components/issues/6859 - Fix Clear button not showing when entering Search fragment 2020-05-05 11:48:38 +03:00
Mozilla L10n Automation Bot
57a8dc1ee4 [components] Import l10n. 2020-05-05 00:05:21 +00:00
Mozilla L10n Automation Bot
aaf0da526d [components] Import l10n. 2020-05-01 00:00:49 +00:00
Jonathan Almeida
b86fa6dfb5 [components] Close https://github.com/mozilla-mobile/android-components/issues/6601: Update targetSdkVersion to 29 2020-04-28 03:16:54 -04:00
codrut.topliceanu
515737581b [components] For https://github.com/mozilla-mobile/android-components/issues/6751 - Disable autocompleting URLs when entering editmode in BrowserToolbar 2020-04-23 13:39:24 +03:00
Sawyer Blatz
3c5621643d [components] For https://github.com/mozilla-mobile/android-components/issues/6548: Fixes forceExpand animation being canceled 2020-04-13 08:41:28 -07:00
Sawyer Blatz
d7aa10c166 [components] For https://github.com/mozilla-mobile/android-components/issues/6548: Force expand toolbar if touch unhandled 2020-04-07 11:21:48 -07:00
MozLando
c3efd8521d [components] Merge https://github.com/mozilla-mobile/android-components/pull/6476
6476: Import strings from android-l10n. r=psymoon a=mozilla-l10n-automation-bot

n/t

Co-authored-by: Mozilla L10n Automation Bot <release+l10n-automation-bot@mozilla.com>
2020-04-02 14:39:51 +00:00
Mozilla L10n Automation Bot
0d62c16636 [components] Import l10n. 2020-04-02 00:03:31 +00:00
Mugurell
28fa5298dd [components] For https://github.com/mozilla-mobile/android-components/issues/3182 - Separate behaviours depending on user's MotionEvents
There are currently 3 Views interested in handling user's MotionEvents:
- GeckoView which renders web content
- SwipeRefreshLayout which handles pull down to refresh
- BrowserToolbar which can be dynamically hidden

Each of them have different behaviours based on different conditions so I
- removed the coupling of BrowserToolbar and Geckoview from `NestedGeckoView`.
It's `onTouchEventForResult` will now only set behaviour for GeckoView.
- created a new EngineView enum to expose the `PanZoomController` possible
result of how a specific user touch was handled to any components that have a
reference to an instance of EngineView without the need to have
`concept-engine` as a dependency.
- implemented specific behaviour in `SwipeRefreshFeature` for the pull down to
refresh functionality and in the `BrowserToolbarBottomBehavior` for the dynamic
navigation bar functionality.

Mapped PanZoomController's INPUT_RESULT to a new enum in order to not enforce
the need of including geckoview as a dependency in all components interested in
how a user's `MotionEvent` was handled and also because webview doesn't expose
such values so we needed a wrapper for it's handled or not boolean return.
2020-04-01 17:39:24 +03:00
Mozilla L10n Automation Bot
5e0b6ae930 [components] Import l10n. 2020-03-31 00:01:20 +00:00
Sawyer Blatz
08d9934e58 [components] For https://github.com/mozilla-mobile/android-components/issues/6048: Adds forceExpand to BottomBrowserToolbarBehavior 2020-03-27 15:14:05 -07:00
Mozilla L10n Automation Bot
0eacbeb754 [components] Import l10n. 2020-03-23 00:05:11 +00:00
MozLando
512990519f [components] Merge https://github.com/mozilla-mobile/android-components/pull/6232
6232: For https://github.com/mozilla-mobile/android-components/issues/6324 Allow customization of display url in toolbar r=csadilek a=kglazko



Co-authored-by: Kate Glazko <katglazko@gmail.com>
2020-03-19 22:27:05 +00:00
Kate Glazko
ff29354b85 [components] For https://github.com/mozilla-mobile/android-components/issues/6324 Allow customization of display url in toolbar 2020-03-19 15:18:40 -07:00