if (is_onboarding || prevent_daisy_chain) {This is bypassing daisy chaining entirely, but it seems like we actually just want to prevent show. Daisy chaining the binding is important to the user experience. We should do that instead. Note the branch below on line 290 where we call BindTab instead of show.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
This is bypassing daisy chaining entirely, but it seems like we actually just want to prevent show. Daisy chaining the binding is important to the user experience. We should do that instead. Note the branch below on line 290 where we call BindTab instead of show.
Done. Good catch!
Updated Patchset 4 so that when `prevent_daisy_chain` is true, we call `BindTab()` instead of `Show()`.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
if (prevent_daisy_chain ||This would need to be renamed to show_side_panel and default to true.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
This would need to be renamed to show_side_panel and default to true.
| 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. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
7 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: chrome/browser/glic/service/glic_instance_impl.cc
Insertions: 8, Deletions: 6.
@@ -682,12 +682,14 @@
return;
}
- // If the floating UI is active and the feature flag is enabled, or if
- // showing the side panel is not requested, we only bind the tab instead of
- // showing it.
- if (!show_side_panel || (base::FeatureList::IsEnabled(
- kGlicBindOnlyForDaisyChainingFromFloatingUi) &&
- IsDetached())) {
+ // If showing the side panel is not requested, we only bind the tab.
+ if (!show_side_panel) {
+ BindTab(created_tab, GlicPinTrigger::kDaisyChain, /*pin_on_bind=*/true);
+ } else if (base::FeatureList::IsEnabled(
+ kGlicBindOnlyForDaisyChainingFromFloatingUi) &&
+ IsDetached()) {
+ // If the floating UI is active and the feature flag is enabled, bind the
+ // tab and keep focus on the floating UI.
BindTab(created_tab, GlicPinTrigger::kDaisyChain, /*pin_on_bind=*/true);
if (embedder_has_focus) {
GetActiveEmbedder()->Focus();
```
[Glic] Prevent daisy-chaining side panel in ActivateTabWithUrl
When ActivateTabWithUrl does not match an existing tab and falls back to
calling CreateTab(), CreateTab() previously defaulted to calling Show()
and daisy-chaining the Glic side panel onto the newly created tab.
This CL prevents unwanted showing of the Glic side panel when returning
to or activating the Gemini Spark website tab by:
* Passing `show_side_panel = false` when GlicPageHandler::ActivateTabWithUrl falls back to creating a new tab.
* Adding an optional `show_side_panel = true` parameter to Host::InstanceDelegate::CreateTab() and GlicInstanceImpl::CreateTab().
* Calling BindTab() instead of Show() in GlicInstanceImpl::CreateTab() when `show_side_panel` is false, keeping the side panel hidden on the target tab while preserving Glic instance binding continuity.
Result:http://shortn/_R4usYfG84S
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |