Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Wait until a response from GV to animate the toolbar #10555

Closed
Mugurell opened this issue Jul 5, 2021 · 1 comment
Closed

Wait until a response from GV to animate the toolbar #10555

Mugurell opened this issue Jul 5, 2021 · 1 comment
Assignees
Labels
<toolbar> Components: browser-toolbar, concept-toolbar

Comments

@Mugurell
Copy link
Contributor

Mugurell commented Jul 5, 2021

Issues reported on Fenix - mozilla-mobile/fenix#16352

Seems to be a race between us handling a new touch here and GV informing us about how it handled the touch here.

If we are to win it based on the default InputResultDetail we would preemptively expand the toolbar.

Seems like we need another status than INPUT_UNHANDLED to know that we don't yet have a status from GeckoView about how it handled the touch.
I propose using a new INPUT_HANDLING_UNKNOWN as the default used in InputResultDetail based on which we can avoid any updates to the toolbar until we actually get INPUT_UNHANDLED / INPUT_HANDLED / INPUT_HANDLED_CONTENT.

┆Issue is synchronized with this Jira Task

@Mugurell Mugurell self-assigned this Jul 6, 2021
Mugurell added a commit to Mugurell/android-components that referenced this issue Jul 6, 2021
…of InputResultDetail

We need to wait until having a response from GeckoView on how it handled the
touch only after which we'll know whether to animate the toolbar or not.

The edgecase scenario of having pull to refresh enabled even before having a
response from GeckoView will still work because "canOverscrollTop()" only
checks for the touch to not be handled by the browser to pan the page.
Mugurell added a commit to Mugurell/android-components that referenced this issue Jul 6, 2021
The previous implementation was affected by the fact that the class has 3
integer properties, all with values [0..4] (-1 was added recently) and it
would just add those value to compute the hashcode.
Collisions were a given.

By using decimal places for each property the new implementation should avoid
collisions while allowing for all the other expected guarantees.
@Mugurell Mugurell added the <toolbar> Components: browser-toolbar, concept-toolbar label Jul 6, 2021
Mugurell added a commit to Mugurell/android-components that referenced this issue Jul 8, 2021
…of InputResultDetail

We need to wait until having a response from GeckoView on how it handled the
touch only after which we'll know whether to animate the toolbar or not.

The edgecase scenario of having pull to refresh enabled even before having a
response from GeckoView will still work because "canOverscrollTop()" only
checks for the touch to not be handled by the browser to pan the page.
Mugurell added a commit to Mugurell/android-components that referenced this issue Jul 8, 2021
The previous implementation was affected by the fact that the class has 3
integer properties, all with values [0..4] (-1 was added recently) and it
would just add those value to compute the hashcode.
Collisions were a given.

By using decimal places for each property the new implementation should avoid
collisions while allowing for all the other expected guarantees.
Mugurell added a commit to Mugurell/android-components that referenced this issue Jul 8, 2021
This commented method seems to be a leftover from the previous refactoring.
"behavior.forceExpand(..)" now calls "expandWithAnimation" for which we already
have a test at line 450.
Mugurell added a commit to Mugurell/android-components that referenced this issue Jul 12, 2021
…of InputResultDetail

We need to wait until having a response from GeckoView on how it handled the
touch only after which we'll know whether to animate the toolbar or not.

The edgecase scenario of having pull to refresh enabled even before having a
response from GeckoView will still work because "canOverscrollTop()" only
checks for the touch to not be handled by the browser to pan the page.
Mugurell added a commit to Mugurell/android-components that referenced this issue Jul 12, 2021
The previous implementation was affected by the fact that the class has 3
integer properties, all with values [0..4] (-1 was added recently) and it
would just add those value to compute the hashcode.
Collisions were a given.

By using decimal places for each property the new implementation should avoid
collisions while allowing for all the other expected guarantees.
Mugurell added a commit to Mugurell/android-components that referenced this issue Jul 12, 2021
This commented method seems to be a leftover from the previous refactoring.
"behavior.forceExpand(..)" now calls "expandWithAnimation" for which we already
have a test at line 450.
Mugurell added a commit to Mugurell/android-components that referenced this issue Jul 14, 2021
…of InputResultDetail

We need to wait until having a response from GeckoView on how it handled the
touch only after which we'll know whether to animate the toolbar or not.

The edgecase scenario of having pull to refresh enabled even before having a
response from GeckoView will still work because "canOverscrollTop()" only
checks for the touch to not be handled by the browser to pan the page.
Mugurell added a commit to Mugurell/android-components that referenced this issue Jul 14, 2021
The previous implementation was affected by the fact that the class has 3
integer properties, all with values [0..4] (-1 was added recently) and it
would just add those value to compute the hashcode.
Collisions were a given.

By using decimal places for each property the new implementation should avoid
collisions while allowing for all the other expected guarantees.
Mugurell added a commit to Mugurell/android-components that referenced this issue Jul 14, 2021
This commented method seems to be a leftover from the previous refactoring.
"behavior.forceExpand(..)" now calls "expandWithAnimation" for which we already
have a test at line 450.
Mugurell added a commit to Mugurell/android-components that referenced this issue Jul 16, 2021
…of InputResultDetail

We need to wait until having a response from GeckoView on how it handled the
touch only after which we'll know whether to animate the toolbar or not.

The edgecase scenario of having pull to refresh enabled even before having a
response from GeckoView will still work because "canOverscrollTop()" only
checks for the touch to not be handled by the browser to pan the page.
Mugurell added a commit to Mugurell/android-components that referenced this issue Jul 16, 2021
The previous implementation was affected by the fact that the class has 3
integer properties, all with values [0..4] (-1 was added recently) and it
would just add those value to compute the hashcode.
Collisions were a given.

By using decimal places for each property the new implementation should avoid
collisions while allowing for all the other expected guarantees.
Mugurell added a commit to Mugurell/android-components that referenced this issue Jul 16, 2021
This commented method seems to be a leftover from the previous refactoring.
"behavior.forceExpand(..)" now calls "expandWithAnimation" for which we already
have a test at line 450.
mergify bot pushed a commit that referenced this issue Jul 16, 2021
…Detail

We need to wait until having a response from GeckoView on how it handled the
touch only after which we'll know whether to animate the toolbar or not.

The edgecase scenario of having pull to refresh enabled even before having a
response from GeckoView will still work because "canOverscrollTop()" only
checks for the touch to not be handled by the browser to pan the page.
mergify bot pushed a commit that referenced this issue Jul 16, 2021
The previous implementation was affected by the fact that the class has 3
integer properties, all with values [0..4] (-1 was added recently) and it
would just add those value to compute the hashcode.
Collisions were a given.

By using decimal places for each property the new implementation should avoid
collisions while allowing for all the other expected guarantees.
mergify bot pushed a commit that referenced this issue Jul 16, 2021
This commented method seems to be a leftover from the previous refactoring.
"behavior.forceExpand(..)" now calls "expandWithAnimation" for which we already
have a test at line 450.
grigoryk pushed a commit to gabrielluong/android-components that referenced this issue Sep 11, 2021
…of InputResultDetail

We need to wait until having a response from GeckoView on how it handled the
touch only after which we'll know whether to animate the toolbar or not.

The edgecase scenario of having pull to refresh enabled even before having a
response from GeckoView will still work because "canOverscrollTop()" only
checks for the touch to not be handled by the browser to pan the page.
grigoryk pushed a commit to gabrielluong/android-components that referenced this issue Sep 11, 2021
The previous implementation was affected by the fact that the class has 3
integer properties, all with values [0..4] (-1 was added recently) and it
would just add those value to compute the hashcode.
Collisions were a given.

By using decimal places for each property the new implementation should avoid
collisions while allowing for all the other expected guarantees.
grigoryk pushed a commit to gabrielluong/android-components that referenced this issue Sep 11, 2021
This commented method seems to be a leftover from the previous refactoring.
"behavior.forceExpand(..)" now calls "expandWithAnimation" for which we already
have a test at line 450.
@Mugurell
Copy link
Contributor Author

Verified as fixed in Fenix - mozilla-mobile/fenix#16352 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
<toolbar> Components: browser-toolbar, concept-toolbar
Projects
None yet
Development

No branches or pull requests

1 participant