Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ios] Add single module Magic Stack layout
This change ensures that a module's width is the same wide width as the Magic Stack itself if it is the only module in the Magic Stack. This will allow it to be the same width as the MVT module, giving a consistent layout. (cherry picked from commit 2e13eb2) Bug: 1432252, 1449339 Change-Id: Ic7800aedb7048e89c7107f94e3e3758f95bf92c0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4568589 Reviewed-by: Scott Yoder <scottyoder@google.com> Commit-Queue: Chris Lu <thegreenfrog@chromium.org> Cr-Original-Commit-Position: refs/heads/main@{#1149906} Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4582091 Auto-Submit: Chris Lu <thegreenfrog@chromium.org> Commit-Queue: Scott Yoder <scottyoder@google.com> Cr-Commit-Position: refs/branch-heads/5790@{#266} Cr-Branched-From: 1d71a33-refs/heads/main@{#1148114}
- Loading branch information
Chris Lu
authored and
Chromium LUCI CQ
committed
Jun 2, 2023
1 parent
85c13d6
commit 423d7f0
Showing
5 changed files
with
86 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
ios/chrome/browser/ui/content_suggestions/cells/magic_stack_module_container_delegate.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright 2023 The Chromium Authors | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CELLS_MAGIC_STACK_MODULE_CONTAINER_DELEGATE_H_ | ||
#define IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CELLS_MAGIC_STACK_MODULE_CONTAINER_DELEGATE_H_ | ||
|
||
enum class ContentSuggestionsModuleType; | ||
|
||
// Protocol asking the receiver for more contextual information about modules. | ||
@protocol MagicStackModuleContainerDelegate | ||
|
||
// YES if the module of `type` is the only module being shown in the Magic | ||
// Stack. | ||
- (BOOL)doesMagicStackShowOnlyOneModule:(ContentSuggestionsModuleType)type; | ||
|
||
@end | ||
|
||
#endif // IOS_CHROME_BROWSER_UI_CONTENT_SUGGESTIONS_CELLS_MAGIC_STACK_MODULE_CONTAINER_DELEGATE_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters