This PR is the last step in graduating the Navigation Drawer component from Beta to Ready.
We have resolved all the outstanding issues in the Navigation Drawer Project here: https://github.com/material-components/material-components-ios/projects/85 and hotlist: 1230549 .
The only outstanding issue is the unit tests ( #5466 , #5465 ) which were approved and are pending due to GitHub issues causing CI not to run.
We are essentially migrating here the NavigationDrawer component from the MaterialComponentsAlpha podspec to the MaterialComponents podspec so it can be used publicly using the normal means of installing our Pod.
This PR is blocked and can land once #5466 and #5465 land.
Closes#5333
Adding semantic emphasis to Dialog actions which allows conditional theming of buttons. The MDCDailogScheme now has a button scheme which can be used to theme buttons according to their action's assigned emphasis.
Issue: b/117608629
Design Review document (go/gmdc-ios-dialogs-design-doc).
Adding semantic emphasis to Dialog actions which allows conditional theming of buttons. The MDCDailogScheme now has a button scheme which can be used to theme buttons according to their action's assigned emphasis.
Issue: b/117608629
Design Review document (go/gmdc-ios-dialogs-design-doc).
See docs for test_spec here: https://blog.cocoapods.org/CocoaPods-1.3.0/
test_spec is an official CocoaPods mechanism for associating tests with a component. tests_spec has several advantages over our prior "tests as a podspec" hack:
- We can finally run individual tests from Xcode's inline green "test" button that shows up alongside each test in the editor.
- Tests can import private header files from components from .h files in the test target (because tests are no longer treated as frameworks). We were not previously able to do this, making it impossible to create .h/.m files that were shared across multiple test .m files.
- We no longer need MDCUnitTests - everything lives in the MDCCatalog target.
- The tests/ folder now appears as a sub-group for each component in the MaterialComponents development pod group. This will have a big impact on day-to-day workflow. Previously our tests lived in a sibling group to our components, making it somewhat difficult to navigate back-and-forth in Xcode.
- pod lib lint is now able to run our unit tests.
- Our tests can now explicitly declare their dependencies.
Some caveats:
- Each component now needs a test_spec subspec definition. This is a minor detail and one that doesn't add much extra work when creating a new component (we continue to just copy the existing templates).
- When adding a new test_spec, we also need to add the test_spec to our MDCCatalog Podfile under the `:testspecs` list. This is a bit annoying, but only happens when new components are created (very infrequent). This is a good case of the cost here being outweighed by the benefits above (which affect our daily workflow).
## Screenshot
<img width="405" alt="screen shot 2018-09-22 at 9 40 17 pm" src="https://user-images.githubusercontent.com/45670/45920647-33f4c180-beb0-11e8-94bc-88f3450c9e0a.png">
Revert "[Dialogs] Remove use of MDCFlatButton for MDCButton and MDCTextButtonThemer (#4739)"
This reverts commit 84d5dfbb83d0118ff26921318df8cc549d919809.
This commit resulted in undesired behavior for a client, this change reverts to the old desired behavior.
Revert "[Dialogs] Remove use of MDCFlatButton for MDCButton and MDCTextButtonThemer (#4739)"
This reverts commit 84d5dfbb83d0118ff26921318df8cc549d919809.
This commit resulted in undesired behavior for a client, this change reverts to the old desired behavior.
Added a card shape themer to our cards component. This includes adding a shape themer, and adding that to the card themer logic to apply the shape themer as well. Also added unit tests.
This PR is blocked on PR #5030
This PR implements the initial Shape Scheme that is essential for allowing shape theming for components (*this doesn't include any themers and that will be included as a separate PR once this is approved*). More information can be seen in go/mdc-ios-shape-theming and go/material-shapes-eng
This closes#4609#4612#4613
* Four prototypes: (#4382)
Two have manual layout and two have auto layout.
Two have configurable supporting views, two don't.
* Manual Layout prototype 3
* Fix project by adding initial List Item Cell Demo
* Add other List Item example
* Make view properties readonly and make cellWidth private
* Make cellWidth public again and make more efficient
* Rename MDCListItemCell to MDCBasicStereoCell
* Rename to MDCSelfSizingStereoCell
* Small nits
* Set cellWidth in preferredLayoutAttributes
* Some Jeff feedback
* Extract layout code
* Delete all the prototypes from forever ago
* Fix copyright messages
* Get rid of __IPHONE_11_0 checks
* PR feedback
* Move layout to its own file
* Add dependencies
* Tweak documentation
* Fix copyright stanzas
* Clang format
* Move numberOfLines logic to cell
Repro case:
Add the following code to a view controller with an App Bar:
```swift
class SomeObject {
@objc func someEvent() {
}
}
let object = SomeObject()
self.navigationItem.rightBarButtonItem =
UIBarButtonItem(title: "Right", style: .done, target: object, action: #selector(SomeObject.someEvent))
```
Tap the button.
Expected behavior: the someEvent method is invoked.
Actual behavior: crash due to unrecognized selector `methodSignatureForSelector:`.
After this change the behavior works as expected, with the caveat being that we are not able to pass the button instance along as a third argument to pure Swift classes. The implication of this is that pure Swift classes will not be able to present popovers from the provided item instance. Supporting this case will require turning the pure Swift class into an Objective-C compatible class.
Closes https://github.com/material-components/material-components-ios/issues/2981
### Release notes
`canAlwaysExpandToMaximumHeight` is a new behavior on the Flexible Header component that is available through an extension target, `FlexibleHeader+CanAlwaysExpandToMaximumHeight`.
Enabling this behavior on a flexible header instance will allow the flexible header to expand to its maximum height even when the flexible header is floating in front of its content.
---
We intend to keep usage of this API fairly restricted internally, so we have added the behavior as a separate target that we'll whitelist internally to clients. The API is still supported by the typical API contract for public clients.
The behavior is implemented using the same shift accumulator logic that enables header shifting. When the accumulator is positive, we're shifting off-screen. When the accumulator is negative, we're expanding the height of the flexible header.
Closes https://github.com/material-components/material-components-ios/issues/4393
Remove all instances of MDCFlatButton within [Dialogs] component
Replace with MDCTextButtonThemer and MDCButton
MDCFlatButton is the old API and MDCTextButtonThemer/MDCButton are the modern APIs.
Closes#3914