[iOS][SK] Add face pile config properties
Adds properties allowing us to hide the face pile and customize the
size of the avatar icons.
Bug: 379285053
Change-Id: I04c3b4aa3bb870ecf833bf393c983ce12cd75f3b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6049750
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Auto-Submit: Ewann Pellé <ewannpv@chromium.org>
Reviewed-by: Gauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1388701}
diff --git a/ios/chrome/browser/share_kit/model/share_kit_face_pile_configuration.h b/ios/chrome/browser/share_kit/model/share_kit_face_pile_configuration.h
index 5bcc428..23fb6ad7 100644
--- a/ios/chrome/browser/share_kit/model/share_kit_face_pile_configuration.h
+++ b/ios/chrome/browser/share_kit/model/share_kit_face_pile_configuration.h
@@ -12,12 +12,13 @@
// Shared group ID.
@property(nonatomic, copy) NSString* collabID;
-// The completion block to be called when the share button is tapped. CollabID
-// is the ID of the group that the user is invited to. IsSignedIn is YES if the
-// user is signed in.
-// TODO(crbug.com/6035036) : Remove it once cleaned downstream.
-@property(nonatomic, copy) void (^completionBlock)
- (NSString* collabID, BOOL isSignedIn);
+
+// Whether the face pile should be visible when the group is empty (not shared
+// or shared with no members).
+@property(nonatomic, assign) BOOL showsEmptyState;
+
+// The preferred size in points for the avatar icons.
+@property(nonatomic, assign) CGFloat avatarSize;
@end
diff --git a/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_group_mediator.mm b/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_group_mediator.mm
index dcd8f20..0fc78f7 100644
--- a/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_group_mediator.mm
+++ b/ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/tab_group_mediator.mm
@@ -44,6 +44,11 @@
base::ScopedObservation<tab_groups::TabGroupSyncService,
tab_groups::TabGroupSyncService::Observer>;
+namespace {
+// The preferred size in points for the avatar icons.
+constexpr CGFloat kFacePileAvatarSize = 24;
+} // namespace
+
@implementation TabGroupMediator {
// The service to observe.
raw_ptr<tab_groups::TabGroupSyncService> _tabGroupSyncService;
@@ -527,6 +532,8 @@
ShareKitFacePileConfiguration* config =
[[ShareKitFacePileConfiguration alloc] init];
config.collabID = savedCollabID;
+ config.showsEmptyState = YES;
+ config.avatarSize = kFacePileAvatarSize;
[_groupConsumer setFacePileViewController:_shareKitService->FacePile(config)];
}