[iOS] Add footer section in page action menu [chromium/src : main]

0 views
Skip to first unread message

Francis Beauchamp (Gerrit)

unread,
Mar 19, 2026, 3:51:17 PMMar 19
to Chromium LUCI CQ, chromium...@chromium.org, christia...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, srahim...@chromium.org

Francis Beauchamp added 2 comments

File ios/chrome/browser/intelligence/page_action_menu/ui/page_action_menu_view_controller.mm
Line 53, Patchset 9 (Latest):// Paddings and spacing
Francis Beauchamp . unresolved

Note to the reviewer: consolidated the ui spacing values here. I believe these kind of values should be in a much higher level of abstraction than here, but I wasn't able to find a centralized place responsible for consistent UI spacing.

Line 1454, Patchset 9 (Latest):- (UILabel*)primaryLabel {
Francis Beauchamp . unresolved

Note to the reviewer: while these are not directly linked to my CL, I believe it is better to centralize the creation of identical elements and have moved forward with this.

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I98bf78abbe04442bd84715c1247372b0b40e8ee8
Gerrit-Change-Number: 7676060
Gerrit-PatchSet: 9
Gerrit-Owner: Francis Beauchamp <fbeau...@google.com>
Gerrit-Reviewer: Francis Beauchamp <fbeau...@google.com>
Gerrit-Comment-Date: Thu, 19 Mar 2026 19:51:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Francis Beauchamp (Gerrit)

unread,
Mar 27, 2026, 10:18:38 AM (9 days ago) Mar 27
to Ibrahim Kanouche, Chromium LUCI CQ, chromium...@chromium.org, christia...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, srahim...@chromium.org
Attention needed from Ibrahim Kanouche

Francis Beauchamp added 3 comments

Patchset-level comments
File-level comment, Patchset 14 (Latest):
Francis Beauchamp . resolved

Sending this your way Ibrahim so you can do a quick first pass of the review. More particularly for the question I've sent your way. Can also pitch in with the comment about symbols.

File ios/chrome/browser/intelligence/page_action_menu/coordinator/page_action_menu_mediator.mm
Line 166, Patchset 14 (Latest): UIImage* icon =
Francis Beauchamp . unresolved

Here, an alternative would be to give the raw symbol name (i.e. `kEnterpriseSymbol`) instead of the UIImage and let the view controller configure with the proper sizing. Wondering if that is something we'd want? Not a big deal, but I think it can be a little more idiomatic (typically, a class like this handles the ordering and what gets presented, not how it is presented).

File ios/chrome/browser/location_bar/ui_bundled/location_bar_mediator.mm
Line 283, Patchset 14 (Latest): return IsPageToolsFeatureUnavailabilityEnabled()
Francis Beauchamp . unresolved

@kano...@google.com I think you were changing this, I'm not sure if your changes got in yet?

Open in Gerrit

Related details

Attention is currently required from:
  • Ibrahim Kanouche
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I98bf78abbe04442bd84715c1247372b0b40e8ee8
Gerrit-Change-Number: 7676060
Gerrit-PatchSet: 14
Gerrit-Owner: Francis Beauchamp <fbeau...@google.com>
Gerrit-Reviewer: Francis Beauchamp <fbeau...@google.com>
Gerrit-Reviewer: Ibrahim Kanouche <kano...@google.com>
Gerrit-Attention: Ibrahim Kanouche <kano...@google.com>
Gerrit-Comment-Date: Fri, 27 Mar 2026 14:18:33 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Francis Beauchamp (Gerrit)

unread,
Mar 27, 2026, 3:03:25 PM (9 days ago) Mar 27
to Ibrahim Kanouche, Chromium LUCI CQ, chromium...@chromium.org, christia...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, srahim...@chromium.org
Attention needed from Ibrahim Kanouche

Francis Beauchamp added 1 comment

File ios/chrome/browser/intelligence/page_action_menu/coordinator/page_action_menu_mediator.mm
Line 166, Patchset 14: UIImage* icon =
Francis Beauchamp . unresolved

Here, an alternative would be to give the raw symbol name (i.e. `kEnterpriseSymbol`) instead of the UIImage and let the view controller configure with the proper sizing. Wondering if that is something we'd want? Not a big deal, but I think it can be a little more idiomatic (typically, a class like this handles the ordering and what gets presented, not how it is presented).

Francis Beauchamp

I will move all of these into the page_action_menu_content_entry_point file which lives in the UI. I think this will be cleaner and remove some of the noise from this file which should really only have "business" logic.

Open in Gerrit

Related details

Attention is currently required from:
  • Ibrahim Kanouche
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I98bf78abbe04442bd84715c1247372b0b40e8ee8
Gerrit-Change-Number: 7676060
Gerrit-PatchSet: 15
Gerrit-Owner: Francis Beauchamp <fbeau...@google.com>
Gerrit-Reviewer: Francis Beauchamp <fbeau...@google.com>
Gerrit-Reviewer: Ibrahim Kanouche <kano...@google.com>
Gerrit-Attention: Ibrahim Kanouche <kano...@google.com>
Gerrit-Comment-Date: Fri, 27 Mar 2026 19:03:20 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Francis Beauchamp <fbeau...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Ibrahim Kanouche (Gerrit)

unread,
Mar 30, 2026, 1:22:26 PM (6 days ago) Mar 30
to Francis Beauchamp, Chromium LUCI CQ, chromium...@chromium.org, christia...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, srahim...@chromium.org
Attention needed from Francis Beauchamp

Ibrahim Kanouche added 8 comments

File ios/chrome/browser/intelligence/page_action_menu/coordinator/page_action_menu_mediator.mm
Line 166, Patchset 14: UIImage* icon =
Francis Beauchamp . unresolved

Here, an alternative would be to give the raw symbol name (i.e. `kEnterpriseSymbol`) instead of the UIImage and let the view controller configure with the proper sizing. Wondering if that is something we'd want? Not a big deal, but I think it can be a little more idiomatic (typically, a class like this handles the ordering and what gets presented, not how it is presented).

Ibrahim Kanouche

I agree. It would be more idiomatic for the Mediator to pass the symbol name (e.g., kEnterpriseSymbol) rather than a pre-configured UIImage.

By moving CustomSymbolWithPointSize(...) into the VC (or the view's configuration logic), we can keep layout-specific constants like kFeatureRowIconSize out of the Coordinator/Mediator layer. And this will makes the data item more reusable and the Mediator easier to test.

File ios/chrome/browser/intelligence/page_action_menu/ui/page_action_menu_view_controller.mm
Line 53, Patchset 9:// Paddings and spacing
Francis Beauchamp . unresolved

Note to the reviewer: consolidated the ui spacing values here. I believe these kind of values should be in a much higher level of abstraction than here, but I wasn't able to find a centralized place responsible for consistent UI spacing.

Ibrahim Kanouche

I'd prefer we keep the original semantically named constants (kMenuSidePadding, kFeatureRowHorizontalPadding, etc.). The values being equal today is coincidental but they describe different visual elements and could diverge independently if UX updates the spec. Collapsing them into generic kSpacingSmall/Medium/Large tokens couples unrelated layout decisions together, and that makes future per-element adjustments harder.

Line 157, Patchset 14: }
Ibrahim Kanouche . unresolved

I think the calculation here is missing the `kSpacingMedium` (12pt) gap between `_contentStackView` and `_footerStackView`.

Currently: `navBar + contentHeight + 8 (top) + bottomPadding + footerHeight`.
Should be: `navBar + 8 (top) + contentHeight + 12 (gap) + footerHeight + bottomPadding`.

Without this, the sheet might be 12pt too short, potentially clipping the bottom of the footer.

Line 798, Patchset 14: _geminiButton = [self createBWGButton];
Ibrahim Kanouche . unresolved

To match the rename of `_BWGButton` to `_geminiButton`, you might want to rename this method to `createGeminiButton` and the handler to `handleGeminiTapped:`.

Line 869, Patchset 14: constant:-kSpacingMedium],
Ibrahim Kanouche . unresolved

This constraint is redundant with the one defined on lines 884-886. Since `contentBottomAnchor` is `_footerStackView.topAnchor`, this line effectively sets the same 12pt spacing. It's cleaner to keep the logic in the `if (IsPageToolsFeatureUnavailabilityEnabled())` block below.

Line 1445, Patchset 14: [attributedText addAttributes:linkAttributes range:parsedString.ranges[0]];
Ibrahim Kanouche . unresolved

Accessing `ranges[0]` without checking `parsedString.ranges.count` is unsafe. If `action` is provided but the string doesn't contain the `<ph>` tags, this will crash.

Even though current callers pass `nil` for the action when no tags are present, it's safer to check the count here.

Line 1454, Patchset 9:- (UILabel*)primaryLabel {
Francis Beauchamp . unresolved

Note to the reviewer: while these are not directly linked to my CL, I believe it is better to centralize the creation of identical elements and have moved forward with this.

Ibrahim Kanouche

can we do this on a separate CL? so we are not mixing up refactoring with feature work.

File ios/chrome/browser/location_bar/ui_bundled/location_bar_mediator.mm
Line 283, Patchset 14: return IsPageToolsFeatureUnavailabilityEnabled()
Francis Beauchamp . unresolved

@kano...@google.com I think you were changing this, I'm not sure if your changes got in yet?

Open in Gerrit

Related details

Attention is currently required from:
  • Francis Beauchamp
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I98bf78abbe04442bd84715c1247372b0b40e8ee8
Gerrit-Change-Number: 7676060
Gerrit-PatchSet: 16
Gerrit-Owner: Francis Beauchamp <fbeau...@google.com>
Gerrit-Reviewer: Francis Beauchamp <fbeau...@google.com>
Gerrit-Reviewer: Ibrahim Kanouche <kano...@google.com>
Gerrit-Attention: Francis Beauchamp <fbeau...@google.com>
Gerrit-Comment-Date: Mon, 30 Mar 2026 17:22:21 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Francis Beauchamp (Gerrit)

unread,
Mar 30, 2026, 3:36:34 PM (6 days ago) Mar 30
to Ibrahim Kanouche, Chromium LUCI CQ, chromium...@chromium.org, christia...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, srahim...@chromium.org
Attention needed from Ibrahim Kanouche

Francis Beauchamp added 8 comments

Patchset-level comments
File-level comment, Patchset 16 (Latest):
Francis Beauchamp . resolved

Thanks for the review Ibrahim! I've laid out some comments that could lead to interesting conversations.

File ios/chrome/browser/intelligence/page_action_menu/ui/page_action_menu_view_controller.mm
Line 53, Patchset 9:// Paddings and spacing
Francis Beauchamp . unresolved

Note to the reviewer: consolidated the ui spacing values here. I believe these kind of values should be in a much higher level of abstraction than here, but I wasn't able to find a centralized place responsible for consistent UI spacing.

Ibrahim Kanouche

I'd prefer we keep the original semantically named constants (kMenuSidePadding, kFeatureRowHorizontalPadding, etc.). The values being equal today is coincidental but they describe different visual elements and could diverge independently if UX updates the spec. Collapsing them into generic kSpacingSmall/Medium/Large tokens couples unrelated layout decisions together, and that makes future per-element adjustments harder.

Francis Beauchamp

I'll try to explain why I think we should aim to unify spacing constants (and not just here; everywhere).

Without unified values, we end up with situations like the co-presence bubble not being aligned with the Gemini overlay. I expect an app of this size to use standardized spacing values and for the UX updates to align on those values; not the other way around. Defining your own custom value should be an exception, not the norm!

When we decide to specify custom values for everything like we have here, features easily become inconsistent. Flows start feeling disconnected. The polished look & feel that we would expect from the best iOS browser starts showing some cracks through this inconsistency.

I'd be curious to hear your thoughts on this and see if there are rooms for improvements in aligning and streamlining our UI work.

Ibrahim Kanouche . unresolved

I think the calculation here is missing the `kSpacingMedium` (12pt) gap between `_contentStackView` and `_footerStackView`.

Currently: `navBar + contentHeight + 8 (top) + bottomPadding + footerHeight`.
Should be: `navBar + 8 (top) + contentHeight + 12 (gap) + footerHeight + bottomPadding`.

Without this, the sheet might be 12pt too short, potentially clipping the bottom of the footer.

Francis Beauchamp

I think you speak the truth. I'll add the missing padding (gap in your example?) to the `IsPageToolsFeatureUnavailabilityEnabled` branch.

Line 798, Patchset 14: _geminiButton = [self createBWGButton];
Ibrahim Kanouche . unresolved

To match the rename of `_BWGButton` to `_geminiButton`, you might want to rename this method to `createGeminiButton` and the handler to `handleGeminiTapped:`.

Francis Beauchamp

Agreed 🎉

Line 869, Patchset 14: constant:-kSpacingMedium],
Ibrahim Kanouche . unresolved

This constraint is redundant with the one defined on lines 884-886. Since `contentBottomAnchor` is `_footerStackView.topAnchor`, this line effectively sets the same 12pt spacing. It's cleaner to keep the logic in the `if (IsPageToolsFeatureUnavailabilityEnabled())` block below.

Francis Beauchamp

I agree and I'll double check; I meant to be very explicit with the constraints but chances are that just the one constraint won't create any ambiguity for the layout engine.

Line 1445, Patchset 14: [attributedText addAttributes:linkAttributes range:parsedString.ranges[0]];
Ibrahim Kanouche . unresolved

Accessing `ranges[0]` without checking `parsedString.ranges.count` is unsafe. If `action` is provided but the string doesn't contain the `<ph>` tags, this will crash.

Even though current callers pass `nil` for the action when no tags are present, it's safer to check the count here.

Francis Beauchamp

I guess you're right. I'm quite displeased with how verbose and tedious creating a label with links currently is and I have a proposal in the making to transform all of this into low level plumbing a one liner.

For our case here, I'll add the condition as `if (action && parsedString.ranges.count > 0)`.

Line 1454, Patchset 9:- (UILabel*)primaryLabel {
Francis Beauchamp . unresolved

Note to the reviewer: while these are not directly linked to my CL, I believe it is better to centralize the creation of identical elements and have moved forward with this.

Ibrahim Kanouche

can we do this on a separate CL? so we are not mixing up refactoring with feature work.

Francis Beauchamp

I get why you're suggesting this and I'm not entirely opposed to splitting the CL. This being said, I believe that improving the code we touch within our CLs has several tangible benefits.

First, it ensures that landing CLs consistently lowers tech debt over time. I think this is something that benefits not just us, but all of Chrome.

Second, it creates a culture of continuously delivered improvement; the alternative of pushing this "in the next cl" which often never comes is detrimental to quality.

I think this can be an interesting conversation to have with the rest of the team. I'm particularly interested in developing healthy habits and finding ways to improve the way we work together!

File ios/chrome/browser/location_bar/ui_bundled/location_bar_mediator.mm
Line 283, Patchset 14: return IsPageToolsFeatureUnavailabilityEnabled()
Francis Beauchamp . unresolved

@kano...@google.com I think you were changing this, I'm not sure if your changes got in yet?

Ibrahim Kanouche

Yes this already landed: https://chromium-review.googlesource.com/c/chromium/src/+/7697138

Francis Beauchamp

Sounds good; then it's fair to assume I can remove this change and revert to just returning `return geminiService->IsProfileEligibleForGemini()`? I'm wondering if I should add `IsPageToolsFeatureUnavailabilityEnabled` somewhere around your changes ? It's a bit unclear how the two of them are working together and whether they will be rolled out at the same time.

Open in Gerrit

Related details

Attention is currently required from:
  • Ibrahim Kanouche
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I98bf78abbe04442bd84715c1247372b0b40e8ee8
Gerrit-Change-Number: 7676060
Gerrit-PatchSet: 16
Gerrit-Owner: Francis Beauchamp <fbeau...@google.com>
Gerrit-Reviewer: Francis Beauchamp <fbeau...@google.com>
Gerrit-Reviewer: Ibrahim Kanouche <kano...@google.com>
Gerrit-Attention: Ibrahim Kanouche <kano...@google.com>
Gerrit-Comment-Date: Mon, 30 Mar 2026 19:36:30 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Ibrahim Kanouche <kano...@google.com>
Comment-In-Reply-To: Francis Beauchamp <fbeau...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Francis Beauchamp (Gerrit)

unread,
Mar 31, 2026, 1:20:28 PM (5 days ago) Mar 31
to Ibrahim Kanouche, Chromium LUCI CQ, chromium...@chromium.org, christia...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, srahim...@chromium.org

Francis Beauchamp added 8 comments

Patchset-level comments
File-level comment, Patchset 18 (Latest):
Francis Beauchamp . resolved

Addressed main comments from the review.

File ios/chrome/browser/intelligence/page_action_menu/coordinator/page_action_menu_mediator.mm
Line 166, Patchset 14: UIImage* icon =
Francis Beauchamp . resolved

Here, an alternative would be to give the raw symbol name (i.e. `kEnterpriseSymbol`) instead of the UIImage and let the view controller configure with the proper sizing. Wondering if that is something we'd want? Not a big deal, but I think it can be a little more idiomatic (typically, a class like this handles the ordering and what gets presented, not how it is presented).

Ibrahim Kanouche

I agree. It would be more idiomatic for the Mediator to pass the symbol name (e.g., kEnterpriseSymbol) rather than a pre-configured UIImage.

By moving CustomSymbolWithPointSize(...) into the VC (or the view's configuration logic), we can keep layout-specific constants like kFeatureRowIconSize out of the Coordinator/Mediator layer. And this will makes the data item more reusable and the Mediator easier to test.

Francis Beauchamp

Done

File ios/chrome/browser/intelligence/page_action_menu/ui/page_action_menu_view_controller.mm
Line 157, Patchset 14: }
Ibrahim Kanouche . resolved

I think the calculation here is missing the `kSpacingMedium` (12pt) gap between `_contentStackView` and `_footerStackView`.

Currently: `navBar + contentHeight + 8 (top) + bottomPadding + footerHeight`.
Should be: `navBar + 8 (top) + contentHeight + 12 (gap) + footerHeight + bottomPadding`.

Without this, the sheet might be 12pt too short, potentially clipping the bottom of the footer.

Francis Beauchamp

I think you speak the truth. I'll add the missing padding (gap in your example?) to the `IsPageToolsFeatureUnavailabilityEnabled` branch.

Francis Beauchamp

Done

Line 798, Patchset 14: _geminiButton = [self createBWGButton];
Ibrahim Kanouche . resolved

To match the rename of `_BWGButton` to `_geminiButton`, you might want to rename this method to `createGeminiButton` and the handler to `handleGeminiTapped:`.

Francis Beauchamp

Agreed 🎉

Francis Beauchamp

Done

Line 798, Patchset 14: _geminiButton = [self createBWGButton];
Ibrahim Kanouche . resolved

To match the rename of `_BWGButton` to `_geminiButton`, you might want to rename this method to `createGeminiButton` and the handler to `handleGeminiTapped:`.

Francis Beauchamp

Agreed 🎉

Francis Beauchamp

Done

Line 869, Patchset 14: constant:-kSpacingMedium],
Ibrahim Kanouche . resolved

This constraint is redundant with the one defined on lines 884-886. Since `contentBottomAnchor` is `_footerStackView.topAnchor`, this line effectively sets the same 12pt spacing. It's cleaner to keep the logic in the `if (IsPageToolsFeatureUnavailabilityEnabled())` block below.

Francis Beauchamp

I agree and I'll double check; I meant to be very explicit with the constraints but chances are that just the one constraint won't create any ambiguity for the layout engine.

Francis Beauchamp

I've double tested and the conditional anchor is necessary. The fact that the content stack view bottom anchor attaches to the scrollview bottom anchor means that there is an ambiguity between the anchoring of the content and the footer. The result is a cropped footer, regardless of the footer view top anchoring.

What I can do though, is remove this part below:

```
[_footerStackView.topAnchor
constraintEqualToAnchor:_contentStackView.bottomAnchor
constant:kSpacingMedium],
```

And keep the conditional anchoring.

Line 1445, Patchset 14: [attributedText addAttributes:linkAttributes range:parsedString.ranges[0]];
Ibrahim Kanouche . resolved

Accessing `ranges[0]` without checking `parsedString.ranges.count` is unsafe. If `action` is provided but the string doesn't contain the `<ph>` tags, this will crash.

Even though current callers pass `nil` for the action when no tags are present, it's safer to check the count here.

Francis Beauchamp

I guess you're right. I'm quite displeased with how verbose and tedious creating a label with links currently is and I have a proposal in the making to transform all of this into low level plumbing a one liner.

For our case here, I'll add the condition as `if (action && parsedString.ranges.count > 0)`.

Francis Beauchamp

Done

File ios/chrome/browser/location_bar/ui_bundled/location_bar_mediator.mm
Line 283, Patchset 14: return IsPageToolsFeatureUnavailabilityEnabled()
Francis Beauchamp . resolved

@kano...@google.com I think you were changing this, I'm not sure if your changes got in yet?

Ibrahim Kanouche

Yes this already landed: https://chromium-review.googlesource.com/c/chromium/src/+/7697138

Francis Beauchamp

Sounds good; then it's fair to assume I can remove this change and revert to just returning `return geminiService->IsProfileEligibleForGemini()`? I'm wondering if I should add `IsPageToolsFeatureUnavailabilityEnabled` somewhere around your changes ? It's a bit unclear how the two of them are working together and whether they will be rolled out at the same time.

Francis Beauchamp

Discussed offline; I will rely on `IsPageActionMenuAuthFlowEnabled` for my tests.

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I98bf78abbe04442bd84715c1247372b0b40e8ee8
Gerrit-Change-Number: 7676060
Gerrit-PatchSet: 18
Gerrit-Owner: Francis Beauchamp <fbeau...@google.com>
Gerrit-Reviewer: Francis Beauchamp <fbeau...@google.com>
Gerrit-Reviewer: Ibrahim Kanouche <kano...@google.com>
Gerrit-Comment-Date: Tue, 31 Mar 2026 17:20:20 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Francis Beauchamp (Gerrit)

unread,
Mar 31, 2026, 2:03:09 PM (5 days ago) Mar 31
to Adam Arcaro, Ibrahim Kanouche, Chromium LUCI CQ, chromium...@chromium.org, christia...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, srahim...@chromium.org
Attention needed from Adam Arcaro

Francis Beauchamp added 1 comment

Patchset-level comments
Francis Beauchamp . resolved

Looping you in to double check your thoughts on the entry point approach.

Open in Gerrit

Related details

Attention is currently required from:
  • Adam Arcaro
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I98bf78abbe04442bd84715c1247372b0b40e8ee8
Gerrit-Change-Number: 7676060
Gerrit-PatchSet: 18
Gerrit-Owner: Francis Beauchamp <fbeau...@google.com>
Gerrit-Reviewer: Adam Arcaro <ada...@google.com>
Gerrit-Reviewer: Francis Beauchamp <fbeau...@google.com>
Gerrit-Reviewer: Ibrahim Kanouche <kano...@google.com>
Gerrit-Attention: Adam Arcaro <ada...@google.com>
Gerrit-Comment-Date: Tue, 31 Mar 2026 18:03:01 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Adam Arcaro (Gerrit)

unread,
Apr 1, 2026, 6:07:22 PM (4 days ago) Apr 1
to Francis Beauchamp, Ibrahim Kanouche, Chromium LUCI CQ, chromium...@chromium.org, christia...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, srahim...@chromium.org
Attention needed from Francis Beauchamp

Adam Arcaro added 1 comment

File ios/chrome/browser/intelligence/page_action_menu/ui/page_action_menu_view_controller.mm
Line 53, Patchset 9:// Paddings and spacing
Francis Beauchamp . unresolved

Note to the reviewer: consolidated the ui spacing values here. I believe these kind of values should be in a much higher level of abstraction than here, but I wasn't able to find a centralized place responsible for consistent UI spacing.

Ibrahim Kanouche

I'd prefer we keep the original semantically named constants (kMenuSidePadding, kFeatureRowHorizontalPadding, etc.). The values being equal today is coincidental but they describe different visual elements and could diverge independently if UX updates the spec. Collapsing them into generic kSpacingSmall/Medium/Large tokens couples unrelated layout decisions together, and that makes future per-element adjustments harder.

Francis Beauchamp

I'll try to explain why I think we should aim to unify spacing constants (and not just here; everywhere).

Without unified values, we end up with situations like the co-presence bubble not being aligned with the Gemini overlay. I expect an app of this size to use standardized spacing values and for the UX updates to align on those values; not the other way around. Defining your own custom value should be an exception, not the norm!

When we decide to specify custom values for everything like we have here, features easily become inconsistent. Flows start feeling disconnected. The polished look & feel that we would expect from the best iOS browser starts showing some cracks through this inconsistency.

I'd be curious to hear your thoughts on this and see if there are rooms for improvements in aligning and streamlining our UI work.

Adam Arcaro

I think this change is good, and we can always extract new constants if we need to adjust a specific element. This view controller has grown significantly and it's best to ensure consistency with spacing

Ideally we'd have more consistency at an app level, but that's a far bigger conversation!

Open in Gerrit

Related details

Attention is currently required from:
  • Francis Beauchamp
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I98bf78abbe04442bd84715c1247372b0b40e8ee8
Gerrit-Change-Number: 7676060
Gerrit-PatchSet: 19
Gerrit-Owner: Francis Beauchamp <fbeau...@google.com>
Gerrit-Reviewer: Adam Arcaro <ada...@google.com>
Gerrit-Reviewer: Francis Beauchamp <fbeau...@google.com>
Gerrit-Reviewer: Ibrahim Kanouche <kano...@google.com>
Gerrit-Attention: Francis Beauchamp <fbeau...@google.com>
Gerrit-Comment-Date: Wed, 01 Apr 2026 22:07:17 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Ibrahim Kanouche (Gerrit)

unread,
Apr 3, 2026, 2:07:20 PM (2 days ago) Apr 3
to Francis Beauchamp, Adam Arcaro, Chromium LUCI CQ, chromium...@chromium.org, christia...@chromium.org, feature-me...@chromium.org, ios-revie...@chromium.org, ios-r...@chromium.org, marq+...@chromium.org, srahim...@chromium.org
Attention needed from Francis Beauchamp

Ibrahim Kanouche added 5 comments

File ios/chrome/browser/intelligence/page_action_menu/ui/page_action_menu_view_controller.mm
Line 471, Patchset 19 (Latest): action:@selector(handleBWGTapped:)
Ibrahim Kanouche . unresolved

Since `_BWGButton` was renamed to `_geminiButton`, consider renaming `handleBWGTapped:` to `handleGeminiTapped:` for consistency.

Line 724, Patchset 19 (Latest): [self updateFooterContent];
Ibrahim Kanouche . unresolved

Since `updateFooterContent` can add or remove items from the footer and change its total height, you should call `[self.sheetPresentationController invalidateDetents]` after updating to ensure the sheet resizes to fit the new content. (The same applies to `updateGeminiAvailability` below).

Line 869, Patchset 19 (Latest): [_contentStackView.bottomAnchor constraintEqualToAnchor:contentBottomAnchor
Ibrahim Kanouche . unresolved

If `IsPageToolsFeatureUnavailabilityEnabled()` is disabled, this constraint pins the bottom of the content stack to `_scrollView.bottomAnchor - kSpacingMedium`. However, this extra 12pt of content size is not accounted for in `resolveDetentValueForSheetPresentation:`, which will make the sheet slightly scrollable.

Also, if the feature is enabled but there are no unavailability items, this constraint unconditionally adds 12 points of empty space at the bottom of the menu.

To simplify the layout and fix both issues, we should make `_footerStackView` an arranged subview of `_contentStackView`. If you hide the footer when it's empty (`_footerStackView.hidden = items.count == 0;`), Auto Layout and `systemLayoutSizeFittingSize:` will automatically handle the heights and spacing perfectly without needing custom detent calculation logic.

Line 1406, Patchset 19 (Latest): stackView.alignment = UIStackViewAlignmentFill;
Ibrahim Kanouche . unresolved

With `UIStackViewAlignmentFill` and `UIViewContentModeScaleAspectFit`, the icon will be vertically centered relative to the multiline text. If the UX guidance expects the icon to be top-aligned with the first line of text, you should use `UIStackViewAlignmentTop`.

Line 1454, Patchset 9:- (UILabel*)primaryLabel {
Francis Beauchamp . resolved

Note to the reviewer: while these are not directly linked to my CL, I believe it is better to centralize the creation of identical elements and have moved forward with this.

Ibrahim Kanouche

can we do this on a separate CL? so we are not mixing up refactoring with feature work.

Francis Beauchamp

I get why you're suggesting this and I'm not entirely opposed to splitting the CL. This being said, I believe that improving the code we touch within our CLs has several tangible benefits.

First, it ensures that landing CLs consistently lowers tech debt over time. I think this is something that benefits not just us, but all of Chrome.

Second, it creates a culture of continuously delivered improvement; the alternative of pushing this "in the next cl" which often never comes is detrimental to quality.

I think this can be an interesting conversation to have with the rest of the team. I'm particularly interested in developing healthy habits and finding ways to improve the way we work together!

Ibrahim Kanouche

Acknowledged

Gerrit-Comment-Date: Fri, 03 Apr 2026 18:07:12 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages