139 Commits

Author SHA1 Message Date
Nobody
8aa3c4f1a3 Fixed up imports and nullability for BottomAppBar
PiperOrigin-RevId: 490346819
2022-11-22 15:09:29 -08:00
Jeff Verkoeyen
b2bbd50350 Mark all To Be Deprecated APIs as Deprecated.
PiperOrigin-RevId: 460478209
2022-07-12 09:13:52 -07:00
David Collazo
bcc0e20335 Mark symbols to be deprecated
PiperOrigin-RevId: 458227698
2022-06-30 08:08:31 -07:00
Wenyu Zhang
b457b13005 Internal change.
PiperOrigin-RevId: 417635153
2021-12-21 09:32:05 -08:00
Jeff Verkoeyen
7986fb5512 Enforce minimum OS on more targets.
PiperOrigin-RevId: 415274652
2021-12-09 08:45:04 -08:00
Jeff Verkoeyen
86a8c97dc7 Remove all pre-iOS 12 logic.
PiperOrigin-RevId: 400788645
2021-10-04 12:41:07 -07:00
Jeff Verkoeyen
c34de39e30 Internal change.
PiperOrigin-RevId: 397316843
2021-09-17 07:45:01 -07:00
Randall Li
502bc5d910 Ran a Swift formatter
PiperOrigin-RevId: 395947664
2021-09-10 09:48:14 -07:00
Jeff Verkoeyen
ec44b12ee9 Internal change
PiperOrigin-RevId: 394725753
2021-09-03 11:44:01 -07:00
Cody Weaver
08d01596df [MultipleComponents] Remove mdf_effectiveUserInterfaceLayoutDirection in favor of the system API effectiveUserInterfaceLayoutDirection that was added in iOS 10.
PiperOrigin-RevId: 391307973
2021-08-17 09:30:47 -07:00
Jeff Verkoeyen
1abdf16760 Optimizing imports
PiperOrigin-RevId: 357185990
2021-02-12 07:36:41 -08:00
Andrew Overton
b42de42c87 Additional requested docs changes
Closes https://github.com/material-components/material-components-ios/pull/10147

COPYBARA_INTEGRATE_REVIEW=https://github.com/material-components/material-components-ios/pull/10147 from andrewoverton:material-io-bugs-2 d0e70d8a8c4b66e6d3b22c2fbe3408a60d8771ee
PiperOrigin-RevId: 348026588
2020-12-17 08:33:58 -08:00
Andrew Overton
fb4d874f62 [Multiple components] Change component README ToCs to bold paragraph style
PiperOrigin-RevId: 346365613
2020-12-08 11:09:33 -08:00
Andrew Overton
62ccb5c72f [Multiple components] Audit recent docs changes, part 2
Closes https://github.com/material-components/material-components-ios/pull/10135

PiperOrigin-RevId: 345473101
2020-12-03 09:54:14 -08:00
Jeff Verkoeyen
fbb1f20aa2 Internal change
PiperOrigin-RevId: 332151481
2020-09-16 21:01:21 -07:00
Bryan Oltman
da4b8f7c7f Fix mdc_elevationDidChangeBlock block parameter types for Xcode 12
PiperOrigin-RevId: 331843566
2020-09-15 13:39:15 -07:00
Jeff Verkoeyen
453eaa8a9a [BottomAppBar] Fix bug where FAB shadow would "bounce" when the position changed.
There are two related fixes involved here:

1. The horizontal shift animations were using the default CABasicAnimation timing function, Linear. These have been adjusted to EaseInEaseOut to match the guidelines.
2. The shadow was doing a wonky "bounce" animation by always animating to an elevation of 1 followed by an animation to the target elevation. This bounce animation has been removed.

Note that, while the bouncing has been removed, the shadow now does not animate at all. This is intentional for two reasons:

1. The shadow is expected to swap z-ordering with the bottom bar.
2. The animation is very subtle.

The result of these two constraints is that if we animate the shadow to the secondary position, then we need to change the z-order at the end of the animation. This would result in the shadow being "clipped" by the bar as the shadow moves from the foreground to the background. This ends up being more visible than the animation itself, and more distracting than the lack of an animation.

We could animate to the primary position, but at this point handling this logic would add complexity for a very subtle effect that doesn't necessarily improve the effect.

PiperOrigin-RevId: 326713093
2020-08-14 12:59:58 -07:00
Andrew Overton
68fa549cc1 [BottomAppBar] Update links in README
PiperOrigin-RevId: 324077893
2020-07-30 14:05:06 -07:00
Andrew Overton
07c46757cc Replace material.io API doc links with links to the relevant header f…
This PR replaces API links containing "/api-docs/" with links to suitable header files in GitHub because the site previously linked to is being taken down and replaced with something that won't handle API docs.

Closes https://github.com/material-components/material-components-ios/pull/10045

COPYBARA_INTEGRATE_REVIEW=https://github.com/material-components/material-components-ios/pull/10045 from andrewoverton:replace-mio-api-docs-with-github-links 0d6e56cc11d0c147366a4f6cde829d8b51567ecc
PiperOrigin-RevId: 323424362
2020-07-27 13:09:23 -07:00
Andrew Overton
d6255fa0f4 [BottomAppBar] Material io bottom app bar
This PR replaces the bottom app bar docs

Closes https://github.com/material-components/material-components-ios/pull/10040

PiperOrigin-RevId: 322647459
2020-07-22 13:54:02 -07:00
Alyssa Weiss
eb324d0394 Internal change
PiperOrigin-RevId: 321437366
2020-07-15 14:19:44 -07:00
Nobody
70716800b8 Internal change
PiperOrigin-RevId: 312085611
2020-05-18 16:41:12 +00:00
Andrew Overton
0a36a3a12b [MDC-iOS] Fix broken links
This CL fixes some longstanding and some newly broken links.

PiperOrigin-RevId: 311351416
2020-05-13 10:09:44 -07:00
Andrew Overton
9220d5b801 [BottomAppBar] Have BottomAppBar respect safe area
This change makes it so that the safe area impacts the inset of the floating button in a bottom app bar view.

PiperOrigin-RevId: 309734661
2020-05-04 06:53:52 -07:00
Wenyu Zhang
a3381717f7
Fix the bazel BUILD files and snapshot that were restored unintentionally.(#9983) 2020-04-29 11:00:00 -04:00
Jeff Verkoeyen
bcd0c79ef4 Internal change.
PiperOrigin-RevId: 308358719
2020-04-24 17:42:29 -07:00
Jeff Verkoeyen
25471afea0 Rename "flaky" to "skip_snapshots".
PiperOrigin-RevId: 308259307
2020-04-24 08:34:12 -07:00
Jeff Verkoeyen
92254ea119 Rename all icons to an ic_<#name#> convention.
PiperOrigin-RevId: 308232277
2020-04-24 04:33:51 -07:00
Randall Li
0100cfe414 [MDC-iOS/BottomSheet] Fix dismissOnDraggingDownSheet behavior
The bottom sheet incorrectly allowed the sheet to be drag dismissed when `dismissOnDraggingDownSheet` was set to NO.

This change permits the gesture to dismiss to begin but prevents it from actually closing the sheet.

https://github.com/material-components/material-components-ios/issues/9723

Closes https://github.com/material-components/material-components-ios/pull/9885

PiperOrigin-RevId: 307802500
2020-04-22 06:21:26 -07:00
Cody Weaver
cd30e764c2 [MDC/BottomAppBar] Add MDCRipple support to MDCBottomAppBarView
Clients may want to support ripple throughout their application and be using MDCBottomAppBar. Since the bottom app bar does not expose it's navigation bar we need to have a pass through property to enable the ripple in the navigation bar. Users shouldn't get any ripple effect on the bar itself so we don't need any additional support other than what the navigation bar has. If clients want to enable it on the floating action button that is exposed so they can do so. This change also allows them to customize the ripple color.

PiperOrigin-RevId: 306278679
2020-04-13 12:00:45 -07:00
Jeff Verkoeyen
8abbb099a9 Delete all bazel support.
We no longer support bazel.

This PR deletes everything related to bazel support from our repo.

Closes https://github.com/material-components/material-components-ios/pull/9968

PiperOrigin-RevId: 306227127
2020-04-13 07:13:47 -07:00
Jeff Verkoeyen
c2c1cc64b3 [Catalog] Expose the catalog by convention tree via the AppDelegate and walk the tree with the UI test runner.
This allows our UI test runner to fetch the catalog by convention tree at runtime in order to generate dynamic test runners that walk the entire catalog by convention tree without requiring maintenance of an explicit list of breadcrumbs.

In this change I have replaced the explicit list of components with such a dynamic walker. In a follow-up change we will be able to dynamically walk through every node of the three and take screenshots. In a subsequent change from there we may allow certain nodes to implement "testActionStart" and "testActionStop" methods that allow the test runner to invoke certain canonical actions automatically (e.g. present a dialog).

A couple examples are flaky, so a new convention has been added to those examples of providing a "flaky" tag on the example's metadata. If this flag is YES, then the example will not be snapshotted.

PiperOrigin-RevId: 306214455
2020-04-13 09:26:51 -04:00
Randall Li
a204ee6f8e
[Material][Availability] Migrates BottomAppBar to MDCAvailability. (#9729)
[Material][Availability] Migrates BottomAppBar to MDCAvailability.
2020-02-18 13:41:47 -05:00
Bryan Oltman
3596a5638b
[BottomAppBar] Add intrinsicContentSize (#9290)
* [BottomAppBar] Add snapshot test to verify autolayout bug

* Update snapshot

* [BottomAppBar] Add intrinsicContentSize
2019-12-13 18:08:12 -05:00
Bryan Oltman
2a17b6ef46
[BottomAppBar] Add snapshot test to verify autolayout bug (#9289)
* [BottomAppBar] Add snapshot test to verify autolayout bug

* Update snapshot
2019-12-13 17:50:53 -05:00
Bryan Oltman
68a65d33d3
[BottomAppBar] Delete deprecated MDCBottomAppBarColorThemer (#9166)
MDCBottomAppBarColorThemer has no internal use and is deprecated.

Fixes #9164
Fixes #9165
2019-12-06 17:10:33 -05:00
featherless
5425884431
[examples] Annotate all catalogShouldHideNavigation invocations with @objc. (#8791)
Context:

Due to changes in the Swift runtime over the past years, methods that are considered "optional" in Objective-C need to have @objc annotations in order for Objective-C to be able to perform `respondsToSelector:` invocations.

Problem:
Many of our examples had not annotated their `catalogShouldHideNavigation` methods with the `@objc` annotation, causing the Catalog to wrap the examples in a container app bar view controller. The reason most of these examples would implement `catalogShouldHideNavigation` is because they are managing their own navigation (e.g. to demonstrate AppBar functionality), so this would often result in duplicate AppBars appearing in the example.

The fix:
All `catalogShouldHideNavigation` Swift methods have been annotated with `@objc`.

Fixes https://github.com/material-components/material-components-ios/issues/7576
Fixes https://github.com/material-components/material-components-ios/issues/7578
2019-11-12 16:54:55 -05:00
Robert Moore
8cebc56185
[*] Suppress deprecation warnings. (#8481)
Suppresses deprecation warnings either for implementations of our own
deprecated APIs or for their use in tests and elsewhere.

Part of #7537
2019-09-23 12:48:42 -04:00
featherless
a01712388b
[BottomAppBar] Deprecate the ColorThemer. (#8438)
Part of https://github.com/material-components/material-components-ios/issues/8429

There is no internal usage of this API.
2019-09-11 09:00:36 -04:00
Robert Moore
ff0c94cdf8
[BottomAppBar] Use Starlark macros. (#8156)
Adds the unit test Objective-C Starlark macro to the BUILD file to make
releases easier.

Part of #8150
2019-08-01 15:23:30 -04:00
Robert Moore
1c0827f2ef
[*] Correct elevationDidChangeBlock type. (#8106)
The property type for `elevationDidChangeBlock` declared in `MDCElevatable` should not be changed when declaring the property in headers. If it is, the compiler can generate a warning or error because the types are incompatible.

Closes #8105
2019-07-29 08:08:39 -04:00
Bryan Oltman
02a707a5b4
[BottomAppBar] Add conformance to MDCElevatable, MDCElevationOverriding (#8094)
* [BottomAppBar] Add conformance to MDCElevatable, MDCElevationOverriding

* PR feedback
2019-07-26 14:49:26 -04:00
Robert Moore
db4b31e1ed
[BottomAppBar] Remove no-op tests. (#8072) 2019-07-24 14:59:23 -04:00
Robert Moore
8dcf1e4a56
[*] Remove RTL snapshot method overrides. (#7996)
With #7986, most snapshot tests began overriding a method that had nearly the
same behavior.
2019-07-22 21:11:17 -07:00
Wenyu Zhang
bc4a297012
[BottomAppBar] add support for dynamic color. (#7975)
closes https://github.com/material-components/material-components-ios/issues/7883.
2019-07-22 00:43:35 -04:00
Cody Weaver
ce0ab9122e
[BottomAppBar] Add traitCollectionDidChange block (#7930)
The bottom app bar needs an API so clients can hook-in to trait collection changes. This additionally passes the bottom app bar as a parameter so clients can modify the bottom app bar within the block.

Closes #7927
2019-07-16 05:13:16 -07:00
featherless
9c8e34138a
[Buttons] Remove all example references to MDCFloatingActionButtonThemer. (#7505)
This is pre-work for being able to annotate MDCFloatingActionButtonThemer as deprecated.

Part of https://github.com/material-components/material-components-ios/issues/5702
2019-06-17 20:59:33 -04:00
Yarden Eitan
efe61588a6
update (#7246)
We need to add @objc annotations to colorScheme and typographyScheme instances in our Swift examples, because we moved to Swift 4.2, the respondsToSelector won't find `setColorScheme:` and `setTypographyScheme:` setters otherwise.
2019-04-23 10:21:14 -04:00
featherless
5e8360e2fa [BottomAppBar] Annotate themer APIs with the recommended APIs. (#7214)
Part of https://github.com/material-components/material-components-ios/issues/7108
2019-04-22 12:39:54 -04:00
Andrew Overton
c56d5d76d3
Add @objc annotations to get examples to show up in Dragons (#7168)
This is a follow up PR for #7166 adds @objc annotations to Swift catalogMetadata() methods, because the Swift 4 compiler no longer attempts to infer what methods should be visible to Objective-C. As a result of this change in the compiler, no Swift examples were showing up in Dragons after #7166. See this article: https://useyourloaf.com/blog/objc-warnings-upgrading-to-swift-4/ for additional context.
2019-04-17 21:35:43 -04:00