[SetupList] Integrate Two-Cell Layout Logic (2/2) [chromium/src : main]

0 views
Skip to first unread message

Xi Han (Gerrit)

unread,
1:58 PM (9 hours ago) 1:58 PM
to Gazal Agarwal, Xinyi Ji, Joel Tan-Aristy, Chromium LUCI CQ, chromium...@chromium.org
Attention needed from Gazal Agarwal

Xi Han added 4 comments

Patchset-level comments
File-level comment, Patchset 4 (Latest):
Xi Han . resolved

Mostly nits.

File chrome/browser/magic_stack/android/junit/src/org/chromium/chrome/browser/magic_stack/HomeModulesCoordinatorUnitTest.java
Line 322, Patchset 4 (Latest): .onModuleConfigChanged(ModuleType.SETUP_LIST_TWO_CELL_CONTAINER, true);
Xi Han . unresolved

Nit: Maybe change it to be false and update the expected results?

File chrome/browser/magic_stack/android/junit/src/org/chromium/chrome/browser/magic_stack/HomeModulesMediatorUnitTest.java
Line 819, Patchset 4 (Latest): public void testCreateInputContextForRanking_WithTwoCell() {
Xi Han . unresolved

See comment of the test below.

Line 932, Patchset 4 (Latest): public void testGetCombinedRankedModules_WithTwoCell() {
Xi Han . unresolved

This test looks very similar to testGetCombinedRankedModules but giving a different set of manual ordering modules. Is it necessary?

Open in Gerrit

Related details

Attention is currently required from:
  • Gazal Agarwal
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: I475977dcc8d0385b74609318baeb25172544b0f9
Gerrit-Change-Number: 7468081
Gerrit-PatchSet: 4
Gerrit-Owner: Gazal Agarwal <aga...@google.com>
Gerrit-Reviewer: Gazal Agarwal <aga...@google.com>
Gerrit-Reviewer: Xi Han <ha...@chromium.org>
Gerrit-CC: Joel Tan-Aristy <jtana...@google.com>
Gerrit-CC: Xinyi Ji <xin...@chromium.org>
Gerrit-Attention: Gazal Agarwal <aga...@google.com>
Gerrit-Comment-Date: Wed, 14 Jan 2026 18:58:45 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Gazal Agarwal (Gerrit)

unread,
5:07 PM (6 hours ago) 5:07 PM
to Xi Han, Xinyi Ji, Joel Tan-Aristy, Chromium LUCI CQ, chromium...@chromium.org
Attention needed from Xi Han

Gazal Agarwal added 4 comments

Patchset-level comments
Xi Han . resolved

Mostly nits.

Gazal Agarwal

Thanks for reviewing! Addressed the comments.

File chrome/browser/magic_stack/android/junit/src/org/chromium/chrome/browser/magic_stack/HomeModulesCoordinatorUnitTest.java
Line 322, Patchset 4: .onModuleConfigChanged(ModuleType.SETUP_LIST_TWO_CELL_CONTAINER, true);
Xi Han . resolved

Nit: Maybe change it to be false and update the expected results?

Gazal Agarwal

Updated.

File chrome/browser/magic_stack/android/junit/src/org/chromium/chrome/browser/magic_stack/HomeModulesMediatorUnitTest.java
Line 819, Patchset 4: public void testCreateInputContextForRanking_WithTwoCell() {
Xi Han . resolved

See comment of the test below.

Gazal Agarwal

Addressed below

Line 932, Patchset 4: public void testGetCombinedRankedModules_WithTwoCell() {
Xi Han . resolved

This test looks very similar to testGetCombinedRankedModules but giving a different set of manual ordering modules. Is it necessary?

Gazal Agarwal
IMO, both are necessary.
`testCreateInputContextForRanking_WithTwoCell` primarily tests the logic within the `createInputContextForRankingAndUpdateManuallyRankedModuleList()` and ensures the two-cell container isn't sent for ranking.

`testGetCombinedRankedModules_WithTwoCell` tests the logic within the `getCombinedRankedModules()` method and ensures the two-cell container is placed correctly at the top of the display list.
Open in Gerrit

Related details

Attention is currently required from:
  • Xi Han
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • 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: I475977dcc8d0385b74609318baeb25172544b0f9
    Gerrit-Change-Number: 7468081
    Gerrit-PatchSet: 5
    Gerrit-Owner: Gazal Agarwal <aga...@google.com>
    Gerrit-Reviewer: Gazal Agarwal <aga...@google.com>
    Gerrit-Reviewer: Xi Han <ha...@chromium.org>
    Gerrit-CC: Joel Tan-Aristy <jtana...@google.com>
    Gerrit-CC: Xinyi Ji <xin...@chromium.org>
    Gerrit-Attention: Xi Han <ha...@chromium.org>
    Gerrit-Comment-Date: Wed, 14 Jan 2026 22:07:08 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Xi Han <ha...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Xi Han (Gerrit)

    unread,
    5:33 PM (6 hours ago) 5:33 PM
    to Gazal Agarwal, Xinyi Ji, Joel Tan-Aristy, Chromium LUCI CQ, chromium...@chromium.org
    Attention needed from Gazal Agarwal

    Xi Han added 2 comments

    Patchset-level comments
    File-level comment, Patchset 5 (Latest):
    Xi Han . resolved

    Just one question.

    File chrome/browser/magic_stack/android/junit/src/org/chromium/chrome/browser/magic_stack/HomeModulesMediatorUnitTest.java
    Line 932, Patchset 4: public void testGetCombinedRankedModules_WithTwoCell() {
    Xi Han . unresolved

    This test looks very similar to testGetCombinedRankedModules but giving a different set of manual ordering modules. Is it necessary?

    Gazal Agarwal
    IMO, both are necessary.
    `testCreateInputContextForRanking_WithTwoCell` primarily tests the logic within the `createInputContextForRankingAndUpdateManuallyRankedModuleList()` and ensures the two-cell container isn't sent for ranking.

    `testGetCombinedRankedModules_WithTwoCell` tests the logic within the `getCombinedRankedModules()` method and ensures the two-cell container is placed correctly at the top of the display list.
    Xi Han

    My point is: createInputContextForRankingAndUpdateManuallyRankedModuleList () only cares about the value of the build#hasManualOrdering(). Thus, it doesn't matter whether the module is SETUP_LIST_TWO_CELL_CONTAINER or ADDRESS_BAR_PLACEMENT_PROMO. This looks like a duplication of tests. Same as getCombinedRankedModules(). Unless it handles SETUP_LIST_TWO_CELL_CONTAINER differently, otherwise, we can remove this test or adding SETUP_LIST_TWO_CELL_CONTAINER to the other tests. Does it make sense to you?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Gazal Agarwal
    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: I475977dcc8d0385b74609318baeb25172544b0f9
      Gerrit-Change-Number: 7468081
      Gerrit-PatchSet: 5
      Gerrit-Owner: Gazal Agarwal <aga...@google.com>
      Gerrit-Reviewer: Gazal Agarwal <aga...@google.com>
      Gerrit-Reviewer: Xi Han <ha...@chromium.org>
      Gerrit-CC: Joel Tan-Aristy <jtana...@google.com>
      Gerrit-CC: Xinyi Ji <xin...@chromium.org>
      Gerrit-Attention: Gazal Agarwal <aga...@google.com>
      Gerrit-Comment-Date: Wed, 14 Jan 2026 22:33:10 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Gazal Agarwal <aga...@google.com>
      Comment-In-Reply-To: Xi Han <ha...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Gazal Agarwal (Gerrit)

      unread,
      5:50 PM (5 hours ago) 5:50 PM
      to Xi Han, Xinyi Ji, Joel Tan-Aristy, Chromium LUCI CQ, chromium...@chromium.org
      Attention needed from Xi Han

      Gazal Agarwal added 1 comment

      File chrome/browser/magic_stack/android/junit/src/org/chromium/chrome/browser/magic_stack/HomeModulesMediatorUnitTest.java
      Line 932, Patchset 4: public void testGetCombinedRankedModules_WithTwoCell() {
      Xi Han . resolved

      This test looks very similar to testGetCombinedRankedModules but giving a different set of manual ordering modules. Is it necessary?

      Gazal Agarwal
      IMO, both are necessary.
      `testCreateInputContextForRanking_WithTwoCell` primarily tests the logic within the `createInputContextForRankingAndUpdateManuallyRankedModuleList()` and ensures the two-cell container isn't sent for ranking.

      `testGetCombinedRankedModules_WithTwoCell` tests the logic within the `getCombinedRankedModules()` method and ensures the two-cell container is placed correctly at the top of the display list.
      Xi Han

      My point is: createInputContextForRankingAndUpdateManuallyRankedModuleList () only cares about the value of the build#hasManualOrdering(). Thus, it doesn't matter whether the module is SETUP_LIST_TWO_CELL_CONTAINER or ADDRESS_BAR_PLACEMENT_PROMO. This looks like a duplication of tests. Same as getCombinedRankedModules(). Unless it handles SETUP_LIST_TWO_CELL_CONTAINER differently, otherwise, we can remove this test or adding SETUP_LIST_TWO_CELL_CONTAINER to the other tests. Does it make sense to you?

      Gazal Agarwal

      Oh I see what you mean. I mistakenly thought you meant `testCreateInputContextForRanking_WithTwoCell` and `testGetCombinedRankedModules_WithTwoCell` both aren't needed (hence my previous explanation).

      This test looks very similar to testGetCombinedRankedModules but giving a different set of manual ordering modules. Is it necessary?

      You're right, the module doesn't really matter. Removed `testGetCombinedRankedModules_WithTwoCell`.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Xi Han
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • 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: I475977dcc8d0385b74609318baeb25172544b0f9
        Gerrit-Change-Number: 7468081
        Gerrit-PatchSet: 6
        Gerrit-Owner: Gazal Agarwal <aga...@google.com>
        Gerrit-Reviewer: Gazal Agarwal <aga...@google.com>
        Gerrit-Reviewer: Xi Han <ha...@chromium.org>
        Gerrit-CC: Joel Tan-Aristy <jtana...@google.com>
        Gerrit-CC: Xinyi Ji <xin...@chromium.org>
        Gerrit-Attention: Xi Han <ha...@chromium.org>
        Gerrit-Comment-Date: Wed, 14 Jan 2026 22:50:05 +0000
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Xi Han (Gerrit)

        unread,
        7:37 PM (4 hours ago) 7:37 PM
        to Gazal Agarwal, Xinyi Ji, Joel Tan-Aristy, Chromium LUCI CQ, chromium...@chromium.org
        Attention needed from Gazal Agarwal

        Xi Han voted and added 2 comments

        Votes added by Xi Han

        Code-Review+1

        2 comments

        Patchset-level comments
        File-level comment, Patchset 7 (Latest):
        Xi Han . resolved

        LGTM with nit.

        File chrome/browser/magic_stack/android/junit/src/org/chromium/chrome/browser/magic_stack/HomeModulesMediatorUnitTest.java
        Line 819, Patchset 7 (Latest): public void testCreateInputContextForRanking_WithTwoCell() {
        Xi Han . unresolved

        Nit: this looks like a duplicate of testCreateInputContextForRanking:) It's up to you whether to keep it or not.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Gazal Agarwal
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement 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: I475977dcc8d0385b74609318baeb25172544b0f9
        Gerrit-Change-Number: 7468081
        Gerrit-PatchSet: 7
        Gerrit-Owner: Gazal Agarwal <aga...@google.com>
        Gerrit-Reviewer: Gazal Agarwal <aga...@google.com>
        Gerrit-Reviewer: Xi Han <ha...@chromium.org>
        Gerrit-CC: Joel Tan-Aristy <jtana...@google.com>
        Gerrit-CC: Xinyi Ji <xin...@chromium.org>
        Gerrit-Attention: Gazal Agarwal <aga...@google.com>
        Gerrit-Comment-Date: Thu, 15 Jan 2026 00:37:10 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Gazal Agarwal (Gerrit)

        unread,
        7:54 PM (3 hours ago) 7:54 PM
        to Xi Han, Xinyi Ji, Joel Tan-Aristy, Chromium LUCI CQ, chromium...@chromium.org

        Gazal Agarwal voted and added 1 comment

        Votes added by Gazal Agarwal

        Auto-Submit+1

        1 comment

        File chrome/browser/magic_stack/android/junit/src/org/chromium/chrome/browser/magic_stack/HomeModulesMediatorUnitTest.java
        Line 819, Patchset 7 (Latest): public void testCreateInputContextForRanking_WithTwoCell() {
        Xi Han . resolved

        Nit: this looks like a duplicate of testCreateInputContextForRanking:) It's up to you whether to keep it or not.

        Gazal Agarwal

        Yeah I see what you mean. I feel that we should have some test case to check the rank of SETUP_LIST_TWO_CELL_CONTAINER. I've made a note to see if I can have a single parameterized test for the use case.

        Open in Gerrit

        Related details

        Attention set is empty
        Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement satisfiedCode-Owners
          • requirement satisfiedCode-Review
          • requirement 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: I475977dcc8d0385b74609318baeb25172544b0f9
          Gerrit-Change-Number: 7468081
          Gerrit-PatchSet: 7
          Gerrit-Owner: Gazal Agarwal <aga...@google.com>
          Gerrit-Reviewer: Gazal Agarwal <aga...@google.com>
          Gerrit-Reviewer: Xi Han <ha...@chromium.org>
          Gerrit-CC: Joel Tan-Aristy <jtana...@google.com>
          Gerrit-CC: Xinyi Ji <xin...@chromium.org>
          Gerrit-Comment-Date: Thu, 15 Jan 2026 00:54:22 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: Yes
          Comment-In-Reply-To: Xi Han <ha...@chromium.org>
          satisfied_requirement
          open
          diffy

          Gazal Agarwal (Gerrit)

          unread,
          7:54 PM (3 hours ago) 7:54 PM
          to Xi Han, Xinyi Ji, Joel Tan-Aristy, Chromium LUCI CQ, chromium...@chromium.org

          Gazal Agarwal voted Commit-Queue+2

          Commit-Queue+2
          Open in Gerrit

          Related details

          Attention set is empty
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement satisfiedCode-Owners
          • requirement satisfiedCode-Review
          • requirement 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: I475977dcc8d0385b74609318baeb25172544b0f9
          Gerrit-Change-Number: 7468081
          Gerrit-PatchSet: 7
          Gerrit-Owner: Gazal Agarwal <aga...@google.com>
          Gerrit-Reviewer: Gazal Agarwal <aga...@google.com>
          Gerrit-Reviewer: Xi Han <ha...@chromium.org>
          Gerrit-CC: Joel Tan-Aristy <jtana...@google.com>
          Gerrit-CC: Xinyi Ji <xin...@chromium.org>
          Gerrit-Comment-Date: Thu, 15 Jan 2026 00:54:28 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: Yes
          satisfied_requirement
          open
          diffy

          Chromium LUCI CQ (Gerrit)

          unread,
          7:57 PM (3 hours ago) 7:57 PM
          to Gazal Agarwal, Xi Han, Xinyi Ji, Joel Tan-Aristy, chromium...@chromium.org

          Chromium LUCI CQ submitted the change

          Change information

          Commit message:
          [SetupList] Integrate Two-Cell Layout Logic (2/2)

          This change integrates the conditional logic for displaying the Setup
          List using the new two-cell container UI. The layout choice is based on
          the time elapsed since the Setup List was first shown to the user. This
          completes the implementation of the time-based two-cell layout for the
          Setup List.
          Bug: 469425754, 469430637
          Change-Id: I475977dcc8d0385b74609318baeb25172544b0f9
          Commit-Queue: Gazal Agarwal <aga...@google.com>
          Reviewed-by: Xi Han <ha...@chromium.org>
          Auto-Submit: Gazal Agarwal <aga...@google.com>
          Cr-Commit-Position: refs/heads/main@{#1569443}
          Files:
          • M chrome/browser/educational_tip/java/res/layout/educational_tip_module_two_cell_layout.xml
          • M chrome/browser/educational_tip/java/src/org/chromium/chrome/browser/educational_tip/HomeTipsModulesProvider.java
          • M chrome/browser/educational_tip/java/src/org/chromium/chrome/browser/setup_list/SetupListManager.java
          • M chrome/browser/educational_tip/java/src/org/chromium/chrome/browser/setup_list/SetupListModuleUtils.java
          • M chrome/browser/educational_tip/junit/src/org/chromium/chrome/browser/educational_tip/HomeTipsModulesProviderUnitTest.java
          • M chrome/browser/educational_tip/junit/src/org/chromium/chrome/browser/setup_list/SetupListManagerUnitTest.java
          • M chrome/browser/magic_stack/android/junit/src/org/chromium/chrome/browser/magic_stack/HomeModulesCoordinatorUnitTest.java
          • M chrome/browser/magic_stack/android/junit/src/org/chromium/chrome/browser/magic_stack/HomeModulesMediatorUnitTest.java
          Change size: L
          Delta: 8 files changed, 236 insertions(+), 17 deletions(-)
          Branch: refs/heads/main
          Submit Requirements:
          • requirement satisfiedCode-Review: +1 by Xi Han
          Open in Gerrit
          Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
          Gerrit-MessageType: merged
          Gerrit-Project: chromium/src
          Gerrit-Branch: main
          Gerrit-Change-Id: I475977dcc8d0385b74609318baeb25172544b0f9
          Gerrit-Change-Number: 7468081
          Gerrit-PatchSet: 8
          Gerrit-Owner: Gazal Agarwal <aga...@google.com>
          Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
          Gerrit-Reviewer: Gazal Agarwal <aga...@google.com>
          Gerrit-Reviewer: Xi Han <ha...@chromium.org>
          open
          diffy
          satisfied_requirement
          Reply all
          Reply to author
          Forward
          0 new messages