Hi Chris,
Would you please take a look at this bug fix?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
&BrowserAutofillManager::GenerateFooter, weak_ptr_factory_.GetWeakPtr(),I know this is nitpicky, but since I find the chain of suggestion generation functions (OnAskForValuesToFillImpl() --> phase 1 --> phase 2 --> phase 3 --> OnGenerateSuggestionsComplete()) intimidating, I wonder if one of the following would be an improvement:
- Option 1: Call GenerateFooter() from OnGenerateSuggestionsComplete().
I assume your reasoning behind making it a separate step is that the suggestions are not complete before the footer is added. That makes sense to me, but I wonder if the chain of suggestion generation functions is more digestible if we cheat and just do this in OnGenerateSuggestionsComplete().
- Option 2: OnGenerateSuggestionsComplete() currently calls ReorderWebauthnFallbackToFooter(). If we want to make GenerateFooter() a separate step in the chain, shouldn't that step include ReorderWebauthnFallbackToFooter()?
No strong preference between the two.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
&BrowserAutofillManager::GenerateFooter, weak_ptr_factory_.GetWeakPtr(),I know this is nitpicky, but since I find the chain of suggestion generation functions (OnAskForValuesToFillImpl() --> phase 1 --> phase 2 --> phase 3 --> OnGenerateSuggestionsComplete()) intimidating, I wonder if one of the following would be an improvement:
- Option 1: Call GenerateFooter() from OnGenerateSuggestionsComplete().
I assume your reasoning behind making it a separate step is that the suggestions are not complete before the footer is added. That makes sense to me, but I wonder if the chain of suggestion generation functions is more digestible if we cheat and just do this in OnGenerateSuggestionsComplete().
- Option 2: OnGenerateSuggestionsComplete() currently calls ReorderWebauthnFallbackToFooter(). If we want to make GenerateFooter() a separate step in the chain, shouldn't that step include ReorderWebauthnFallbackToFooter()?No strong preference between the two.
I technically agree with you. My first draft just added the Footer at the correct position with no reordering at all. The issue is that with kAutofillNewSuggestionGeneration, there isn't one but two ways to generate suggestions and this Footer is no exception:
```
(OnAskForValuesToFillImpl()
|
| <with kAutofillNewSuggestionGeneration>
|-------------------------------------------|
V |
GenerateSuggestionsAndMaybeShowUIPhase1 (uses PasskeySuggestionGenerator)
| |
V V
GenerateSuggestionsAndMaybeShowUIPhase2 OnSuggestionDataFetched
| |
V V
GenerateSuggestionsAndMaybeShowUIPhase3 OnIndividualSuggestionsGenerated
| |
V V
OnGenerateSuggestionsComplete())
```
And since kAutofillNewSuggestionGeneration is arguably the modern way and eventual default behavior, I don't think we can just cheat the option into OnGenerateSuggestionsComplete(). Instead, I'd expect to eventually move the ordering to OnIndividualSuggestionsGenerated where suggestions are merged. For now, adding the footer and placing it correctly need to be two (three) separate steps though.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
&BrowserAutofillManager::GenerateFooter, weak_ptr_factory_.GetWeakPtr(),Friedrich HauserI know this is nitpicky, but since I find the chain of suggestion generation functions (OnAskForValuesToFillImpl() --> phase 1 --> phase 2 --> phase 3 --> OnGenerateSuggestionsComplete()) intimidating, I wonder if one of the following would be an improvement:
- Option 1: Call GenerateFooter() from OnGenerateSuggestionsComplete().
I assume your reasoning behind making it a separate step is that the suggestions are not complete before the footer is added. That makes sense to me, but I wonder if the chain of suggestion generation functions is more digestible if we cheat and just do this in OnGenerateSuggestionsComplete().
- Option 2: OnGenerateSuggestionsComplete() currently calls ReorderWebauthnFallbackToFooter(). If we want to make GenerateFooter() a separate step in the chain, shouldn't that step include ReorderWebauthnFallbackToFooter()?No strong preference between the two.
I technically agree with you. My first draft just added the Footer at the correct position with no reordering at all. The issue is that with kAutofillNewSuggestionGeneration, there isn't one but two ways to generate suggestions and this Footer is no exception:
```
(OnAskForValuesToFillImpl()
|
| <with kAutofillNewSuggestionGeneration>
|-------------------------------------------|
V |
GenerateSuggestionsAndMaybeShowUIPhase1 (uses PasskeySuggestionGenerator)
| |
V V
GenerateSuggestionsAndMaybeShowUIPhase2 OnSuggestionDataFetched
| |
V V
GenerateSuggestionsAndMaybeShowUIPhase3 OnIndividualSuggestionsGenerated
| |
V V
OnGenerateSuggestionsComplete())
```And since kAutofillNewSuggestionGeneration is arguably the modern way and eventual default behavior, I don't think we can just cheat the option into OnGenerateSuggestionsComplete(). Instead, I'd expect to eventually move the ordering to OnIndividualSuggestionsGenerated where suggestions are merged. For now, adding the footer and placing it correctly need to be two (three) separate steps though.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +2 |
Thanks for the swift review!
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
[HybridInAutofill] Allow footer entry point for all dropdowns
Before this change, the new entry point would suppress suggestions that
require no other suggestions to be present, most notably: Autocomplete.
This change ensures the footer is always added in a last step which
allows to show Autocomplete suggestions again even if the hybrid entry
point must be shown.
Tested with and without kAutofillNewSuggestionGeneration enabled.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |