Skip to content
This repository was archived by the owner on Dec 11, 2025. It is now read-only.

Commit 037551f

Browse files
author
Ian Gordon
committed
Merge branch 'release-candidate'
2 parents 55afa3a + 54c5ad7 commit 037551f

File tree

344 files changed

+14134
-3875
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

344 files changed

+14134
-3875
lines changed

.arcconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"phabricator.uri" : "http://codereview.cc/",
1010
"repository.callsign" : "MDC",
1111
"arc.land.onto.default" : "develop",
12+
"arc.feature.start.default": "origin/develop",
1213
"git.default-relative-commit" : "origin/develop",
1314
"unit.xcode": {
1415
"build": {

CHANGELOG.md

Lines changed: 288 additions & 0 deletions
Large diffs are not rendered by default.

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ considerations as a basis for minimizing dependencies:
121121
- dependency-less components are much easier to drop in and, most importantly, to remove from a
122122
project.
123123

124-
[Reach out to the team directly](community/#questions) for advice or questions on this matter.
124+
[Reach out to the team directly](contributing/#questions) for advice or questions on this matter.
125125

126126
Recommendations:
127127

MaterialComponents.podspec

Lines changed: 39 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ load 'scripts/generated/icons.rb'
22

33
Pod::Spec.new do |s|
44
s.name = "MaterialComponents"
5-
s.version = "4.0.1"
5+
s.version = "5.0.0"
66
s.authors = { 'Apple platform engineering at Google' => 'appleplatforms@google.com' }
77
s.summary = "A collection of stand-alone production-ready UI libraries focused on design details."
88
s.homepage = "https://github.com/google/material-components-ios"
@@ -75,6 +75,44 @@ Pod::Spec.new do |s|
7575
ss.dependency "MaterialComponents/Buttons"
7676
end
7777

78+
s.subspec "CollectionCells" do |ss|
79+
ss.public_header_files = "components/#{ss.base_name}/src/*.h"
80+
ss.source_files = "components/#{ss.base_name}/src/*.{h,m}", "components/#{ss.base_name}/src/private/*.{h,m}"
81+
ss.header_mappings_dir = "components/#{ss.base_name}/src/*"
82+
83+
ss.dependency "MaterialComponents/CollectionLayoutAttributes"
84+
ss.dependency "MaterialComponents/Ink"
85+
ss.dependency "MaterialComponents/Typography"
86+
ss.dependency "MaterialComponents/private/Icons/ic_check"
87+
ss.dependency "MaterialComponents/private/Icons/ic_check_circle"
88+
ss.dependency "MaterialComponents/private/Icons/ic_chevron_right"
89+
ss.dependency "MaterialComponents/private/Icons/ic_info"
90+
ss.dependency "MaterialComponents/private/Icons/ic_radio_button_unchecked"
91+
ss.dependency "MaterialComponents/private/Icons/ic_reorder"
92+
end
93+
94+
s.subspec "CollectionLayoutAttributes" do |ss|
95+
ss.public_header_files = "components/#{ss.base_name}/src/*.h"
96+
ss.source_files = "components/#{ss.base_name}/src/*.{h,m}"
97+
ss.header_mappings_dir = "components/#{ss.base_name}/src/*"
98+
end
99+
100+
s.subspec "Collections" do |ss|
101+
ss.public_header_files = "components/#{ss.base_name}/src/*.h"
102+
ss.source_files = "components/#{ss.base_name}/src/*.{h,m}", "components/#{ss.base_name}/src/private/*.{h,m}"
103+
ss.header_mappings_dir = "components/#{ss.base_name}/src/*"
104+
ss.resource_bundles = {
105+
"Material#{ss.base_name}" => ["components/#{ss.base_name}/src/Material#{ss.base_name}.bundle/*"]
106+
}
107+
108+
ss.dependency "MaterialComponents/CollectionCells"
109+
ss.dependency "MaterialComponents/CollectionLayoutAttributes"
110+
ss.dependency "MaterialComponents/Ink"
111+
ss.dependency "MaterialComponents/ShadowElevations"
112+
ss.dependency "MaterialComponents/ShadowLayer"
113+
ss.dependency "MaterialComponents/Typography"
114+
end
115+
78116
s.subspec "FlexibleHeader" do |ss|
79117
ss.public_header_files = "components/#{ss.base_name}/src/*.h"
80118
ss.source_files = "components/#{ss.base_name}/src/*.{h,m}", "components/#{ss.base_name}/src/private/*.{h,m}"
@@ -133,12 +171,6 @@ Pod::Spec.new do |s|
133171
ss.dependency "MaterialComponents/Typography"
134172
end
135173

136-
s.subspec "ScrollViewDelegateMultiplexer" do |ss|
137-
ss.public_header_files = "components/#{ss.base_name}/src/*.h"
138-
ss.source_files = "components/#{ss.base_name}/src/*.{h,m}"
139-
ss.header_mappings_dir = "components/#{ss.base_name}/src/*"
140-
end
141-
142174
s.subspec "ShadowElevations" do |ss|
143175
ss.public_header_files = "components/#{ss.base_name}/src/*.h"
144176
ss.source_files = "components/#{ss.base_name}/src/*.{h,m}"

MaterialComponentsCatalog.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "MaterialComponentsCatalog"
3-
s.version = "4.0.1"
3+
s.version = "5.0.0"
44
s.authors = { 'Apple platform engineering at Google' => 'appleplatforms@google.com' }
55
s.summary = "A collection of stand-alone production-ready UI libraries focused on design details."
66
s.homepage = "https://github.com/google/material-components-ios"

MaterialComponentsUnitTests.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "MaterialComponentsUnitTests"
3-
s.version = "4.0.1"
3+
s.version = "5.0.0"
44
s.authors = { 'Apple platform engineering at Google' => 'appleplatforms@google.com' }
55
s.summary = "A collection of stand-alone production-ready UI libraries focused on design details."
66
s.homepage = "https://github.com/google/material-components-ios"

catalog/CatalogByConvention/src/CBCCatalogExample.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@
2626
/** Return a list of breadcrumbs defining the navigation path taken to reach this example. */
2727
+ (nonnull NSArray<NSString *> *)catalogBreadcrumbs;
2828

29+
/**
30+
Return a BOOL stating whether this example should be treated as the main "Demo" in the Catalog
31+
for this component
32+
*/
33+
+ (BOOL)catalogIsPrimaryDemo;
34+
2935
@optional
3036

3137
/**

catalog/CatalogByConvention/src/CBCNodeViewController.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,15 @@
2222
An instance of CBCNodeListViewController is able to represent a non-example CBCNode instance as a
2323
UITableView.
2424
*/
25-
@interface CBCNodeListViewController : UITableViewController
25+
@interface CBCNodeListViewController : UIViewController <UITableViewDataSource, UITableViewDelegate>
2626

2727
/** Initializes a CBCNodeViewController instance with a non-example node. */
2828
- (nonnull instancetype)initWithNode:(nonnull CBCNode *)node;
2929

3030
- (nonnull instancetype)initWithStyle:(UITableViewStyle)style NS_UNAVAILABLE;
3131

32+
@property(nonatomic, strong, nonnull) UITableView *tableView;
33+
3234
/** The node that this view controller must represent. */
3335
@property(nonatomic, strong, nonnull, readonly) CBCNode *node;
3436

@@ -65,6 +67,9 @@ FOUNDATION_EXTERN CBCNode *__nonnull CBCCreateNavigationTree(void);
6567
/** The children of this node. */
6668
@property(nonatomic, strong, nonnull) NSArray<CBCNode *> *children;
6769

70+
/** Is this the most important or default demo for this component? */
71+
- (BOOL)isPrimaryDemo;
72+
6873
/** Returns YES if this is an example node. */
6974
- (BOOL)isExample;
7075

catalog/CatalogByConvention/src/CBCNodeViewController.m

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ - (NSString *)createExampleDescription {
7777
return CBCDescriptionFromClass(_exampleClass);
7878
}
7979

80+
- (BOOL)isPrimaryDemo {
81+
return CBCCatalogIsPrimaryDemoFromClass(_exampleClass);
82+
}
83+
8084
@end
8185

8286
@implementation CBCNodeListViewController
@@ -85,7 +89,7 @@ - (instancetype)initWithNode:(CBCNode *)node {
8589
NSAssert(!_node.isExample,
8690
@"%@ cannot represent example nodes.", NSStringFromClass([self class]));
8791

88-
self = [super initWithStyle:UITableViewStyleGrouped];
92+
self = [super initWithNibName:nil bundle:nil];
8993
if (self) {
9094
_node = node;
9195

@@ -99,6 +103,41 @@ - (instancetype)initWithStyle:(UITableViewStyle)style {
99103
return nil;
100104
}
101105

106+
- (void)viewDidLoad {
107+
[super viewDidLoad];
108+
109+
self.tableView = [[UITableView alloc] initWithFrame:self.view.bounds
110+
style:UITableViewStyleGrouped];
111+
self.tableView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);
112+
self.tableView.delegate = self;
113+
self.tableView.dataSource = self;
114+
[self.view addSubview:self.tableView];
115+
}
116+
117+
- (void)viewWillAppear:(BOOL)animated {
118+
[super viewWillAppear:animated];
119+
120+
NSIndexPath *selectedRow = self.tableView.indexPathForSelectedRow;
121+
if (selectedRow) {
122+
[[self transitionCoordinator] animateAlongsideTransition:^(id context) {
123+
[self.tableView deselectRowAtIndexPath:selectedRow animated:YES];
124+
}
125+
completion:^(id<UIViewControllerTransitionCoordinatorContext> context) {
126+
if ([context isCancelled]) {
127+
[self.tableView selectRowAtIndexPath:selectedRow
128+
animated:NO
129+
scrollPosition:UITableViewScrollPositionNone];
130+
}
131+
}];
132+
}
133+
}
134+
135+
- (void)viewDidAppear:(BOOL)animated {
136+
[super viewDidAppear:animated];
137+
138+
[self.tableView flashScrollIndicators];
139+
}
140+
102141
#pragma mark - UITableViewDataSource
103142

104143
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {

catalog/CatalogByConvention/src/private/CBCRuntime.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
/** Invokes +catalogBreadcrumbs on the class and returns the corresponding array of strings. */
2323
FOUNDATION_EXTERN NSArray<NSString *> *CBCCatalogBreadcrumbsFromClass(Class aClass);
2424

25+
/** Invokes +catalogIsPrimaryDemo on the class and returns the BOOL value. */
26+
FOUNDATION_EXTERN BOOL CBCCatalogIsPrimaryDemoFromClass(Class aClass);
27+
2528
#pragma mark Runtime enumeration
2629

2730
/** Returns all Objective-C and Swift classes available to the runtime. */

0 commit comments

Comments
 (0)