-
Notifications
You must be signed in to change notification settings - Fork 948
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update MaterialComponents podspec to separate extensions from component. Breaking change, please see description when sending out a new release #2748
Conversation
…ponents-ios into develop
…ponents-ios into develop
…ponents-ios into develop
…ponents-ios into develop
…ponents-ios into develop
…ponents-ios into develop
…ponents-ios into develop
…ponents-ios into develop
MaterialComponents.podspec
Outdated
@@ -102,29 +104,30 @@ Pod::Spec.new do |mdc| | |||
|
|||
component.dependency "MDFInternationalization" | |||
component.dependency "MaterialComponents/Buttons" | |||
component.dependency "MaterialComponents/NavigationBar" | |||
component.dependency "MaterialComponents/NavigationBar+Extensions" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirming that we are intentionally bringing in the extensions here.
If so, can we bring in a more specific subset of extensions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately so: https://github.com/material-components/material-components-ios/blob/develop/components/BottomAppBar/src/MDCBottomAppBarView.m#L101
I will update it to point only to the themer in case more extensions are added in the future.
MaterialComponents.podspec
Outdated
spec.source_files = "components/#{component.base_name}/src/#{spec.base_name}/*.{h,m}" | ||
spec.dependency "MaterialComponents/ButtonBar/Component" | ||
spec.dependency "MaterialComponents/NavigationBar/Component" | ||
spec.public_header_files = "components/ButtonBar/src/#{spec.base_name}/*.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be reasonable to do a find and replace of 'spec' with 'extension' now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM overall - just some minor questions.
Codecov Report
@@ Coverage Diff @@
## develop #2748 +/- ##
===========================================
- Coverage 46.89% 46.74% -0.15%
===========================================
Files 165 165
Lines 24651 24797 +146
Branches 1060 1063 +3
===========================================
+ Hits 11559 11591 +32
- Misses 13029 13141 +112
- Partials 63 65 +2
Continue to review full report at Codecov.
|
This solves #2696
To install the component without any extensions:
pod MaterialComponents/<Component>
To install the component with all its extensions:
pod MaterialComponents/<Component>+Extensions
To install the component with only one if its extensions:
pod MaterialComponents/<Component>+Extensions/<Extension>
@randallli is good with this approach, we discussed offline.
I will add a isBreaking label and won't merge for now, as we should discuss the implications of current users having a
pod MaterialComponents/<Component>
and expecting the extensions to come with it.The podspec passes
pod spec lint
This is a breaking change, so when pushing out a new version please make sure to add a note of this change in the CHANGELOG with possibly adding the above examples of usage