246 Commits

Author SHA1 Message Date
Nobody
8f69468a2f Update Material iOS to compile for visionOS
PiperOrigin-RevId: 641364760
2024-06-07 14:52:13 -07:00
Jeff Verkoeyen
1c432db2e2 [Typography] Remove font loader setter.
PiperOrigin-RevId: 604499858
2024-02-05 18:55:43 -08:00
Jeff Verkoeyen
729ff03c87 [Typography] Delete unused display font styles.
PiperOrigin-RevId: 603745142
2024-02-02 11:42:18 -08:00
Randall Li
d71ee09714 [Typography] Change deprecation warning to point at newer recommendation.
PiperOrigin-RevId: 492210139
2022-12-01 09:03:43 -08:00
Randall Li
f77307af07 [FontLoader] Change deprecation warning to point at newer recommendation.
PiperOrigin-RevId: 492043820
2022-11-30 16:09:09 -08:00
Randall Li
a77376ee8c [MDCTypography] Change deprecation warning to point at migration guide.
PiperOrigin-RevId: 490227675
2022-11-22 06:36:27 -08:00
Nobody
572585b60a Fixed up imports for Typography
PiperOrigin-RevId: 474189786
2022-09-13 20:34:20 -07:00
Jeff Verkoeyen
b2bbd50350 Mark all To Be Deprecated APIs as Deprecated.
PiperOrigin-RevId: 460478209
2022-07-12 09:13:52 -07:00
Wenyu Zhang
e3cb80c1aa [MDCFontLoader, MDCFontScaler] Mark the component's APIs as To Be Deprecated.
PiperOrigin-RevId: 455133645
2022-06-15 08:15:47 -07:00
Siyu Song
473d32e78c -[UIFont systemFontOfSize:] and -[UIFont systemFontOfSize:weight:] may return different UIFont instances backed by different underlying fonts (e.g. .SFUI-Regular vs .SFUI-Semibold) depending on whether the system-level Bold Text accessibility setting is enabled. Therefore, we also need to invalidate the font cache when Bold Text setting changes, similar to how we handle the Dynamic Type setting change.
PiperOrigin-RevId: 453986099
2022-06-09 12:31:01 -07:00
Jeff Verkoeyen
31892cf6c2 [Typography] Annotate mostly all APIs as To Be Deprecated.
The only exception being mdc_isSimplyEqual which is in relatively heavy use in tests.

PiperOrigin-RevId: 449792577
2022-05-19 11:22:58 -07:00
Jeff Verkoeyen
c34de39e30 Internal change.
PiperOrigin-RevId: 397316843
2021-09-17 07:45:01 -07:00
Alyssa Weiss
e4d313ee44 Delete MDCTypography boldFontFromFont and italicFontFromFont APIs.
PiperOrigin-RevId: 395578910
2021-09-08 16:10:06 -07:00
Alyssa Weiss
1b69273926 Delete MDCTypography font opacities.
PiperOrigin-RevId: 394494448
2021-09-02 10:44:20 -07:00
Alyssa Weiss
6ccb268a37 Move FontScaler APIs in MDCTypography to a separate directory.
PiperOrigin-RevId: 390642325
2021-08-13 10:33:45 -07:00
Jeff Verkoeyen
8accfaa337 [Typography] Annotate legacy Dynamic Type APIs as to be deprecated.
PiperOrigin-RevId: 390121900
2021-08-11 06:57:41 -07:00
Alyssa Weiss
2ae9094c8b Remove setFontLoader from MDCTypography.h, now only available through MDCTypography:FontLoader.
PiperOrigin-RevId: 376884939
2021-06-01 11:53:42 -07:00
Alyssa Weiss
9f7c0683c8 Add separate target for MDCTypography setFontLoader. SetFontLoader will later be removed from the MDCTypography target and only be available through MDCTypographyFontLoader. This target will eventually be deprecated and deleted.
PiperOrigin-RevId: 374325657
2021-05-17 18:52:18 -07:00
Alyssa Weiss
e12e0a4573 Deleted scaledValueForValue API from Material Typography.
PiperOrigin-RevId: 368416188
2021-04-14 06:19:17 -07:00
Alyssa Weiss
53e1d5e945 Remove description related to iOS 9 as there is no longer iOS 9 support
PiperOrigin-RevId: 366440412
2021-04-02 07:05:44 -07:00
Alyssa Weiss
924c49e43b Remove all iOS 10 availability checks from material_components_ios now that only iOS 10+ is supported.
PiperOrigin-RevId: 366437050
2021-04-02 06:33:16 -07:00
Andrew Overton
4e245ac6dc [Multiple components] Miscellaneous doc updates
This PR closes out all current doc change requests.

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

COPYBARA_INTEGRATE_REVIEW=https://github.com/material-components/material-components-ios/pull/10181 from andrewoverton:dev-docs-03-15-cherry-pick 00414a4f89e39dfc8d47623ee95e0311db1c7ae7
PiperOrigin-RevId: 363178361
2021-03-16 07:30:36 -07:00
Jeff Verkoeyen
63988b35da Optimizing imports
PiperOrigin-RevId: 356966165
2021-02-11 07:09:58 -08:00
Randall Li
274ba189ab UIFont MDC simple equality: updated class docs.
PiperOrigin-RevId: 354345406
2021-01-28 10:51:42 -08:00
Jeff Verkoeyen
fbb1f20aa2 Internal change
PiperOrigin-RevId: 332151481
2020-09-16 21:01:21 -07:00
Jeff Verkoeyen
d7ff705337 Drop support for iOS 9.
PiperOrigin-RevId: 326015653
2020-08-11 07:21:40 -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
Jeff Verkoeyen
244dd62b6c [Typography] Use MDFTextAccessibility's isLargeForContrastRatios.
This is part of a larger effort to break apart and trim down the size of our typography solutions.

PiperOrigin-RevId: 316484500
2020-06-15 09:53:32 -07:00
Jeff Verkoeyen
efea2ddce6 Internal change
PiperOrigin-RevId: 311020225
2020-05-13 14:37:54 +00:00
Wenyu Zhang
a3381717f7
Fix the bazel BUILD files and snapshot that were restored unintentionally.(#9983) 2020-04-29 11:00:00 -04: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
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
featherless
3b96c0b37e
[Typography] Remove unused import in //components/Typography:SwiftExamples. (#9367)
Prep work for https://github.com/material-components/material-components-ios/issues/5491
2020-01-02 11:01:03 -05:00
Randall Li
b86e38f249
[UIApplication] Use prefix on category name for UIApplication+AppExtensions so that category names don't conflict in ObjC namespace. (#9277)
[UIApplication] Use prefix on category name for UIApplication+AppExtensions so that category names don't conflict in ObjC namespace.

sourced from cl/285233749
2019-12-20 13:24:53 -05:00
Randall Li
afbd7351b5 [Typography] Using safeSharedApplication in test (#8815)
I needed to change this to run test locally in my simulator.

I'm not sure why this wasn't caught in CI.
2019-11-15 07:31:27 -08:00
Robert Moore
2550aa00b3 [Typography] Remove checks for systemFontOfSize:weight:. (#8581)
Removing conditional checks and guards for the API since we now support iOS 9
as the minimum iOS version and no longer support Xcode 9.

Part of #8580
2019-10-15 00:29:35 -04:00
Randall Li
1eaff651f9 Reran ./scripts/generate_all_readmes (#8557)
Moved changes from https://github.com/material-components/material-components-ios/pull/7360 to the source Readme file

Also some readme files got a minor addition to add `./` in their generation comment
2019-10-11 10:44:43 -04:00
Robert Moore
d8858723ef
[Typography] Fix scaling test. (#8477)
Corrects a bug in an font scaling test that assumed the test host had its
content sizes category set to `UIContentSizeCategoryLarge`.

Discovered while authoring #8476.
2019-09-23 10:33:34 -04:00
Robert Moore
80e8c3252e
[Typography] Use Starlark macros. (#8199)
Use more Starlark macros in the BUILD file. This makes releasing easier.

Part of #8150
2019-08-02 16:34:36 -04:00
Robert Moore
ae72826167
[Typography] Drop iOS 8 pragmas. (#8119)
Dropping iOS 8-specific work-arounds now that we no longer support it.

Part of #1296
2019-07-30 12:43:15 -04:00
Robert Moore
e64c440035
[Typography] Internal comments to explain font scaling. (#8087)
Add an explanation of how scalable fonts calculate the final point size of a scaled font.

PiperOrigin-RevId: 259536043
2019-07-25 13:39:18 -04:00
Wenyu Zhang
8735ebb8e8
[Typography] Add doc to explain fallback behavior. (#7493)
This PR is a follow-up to https://github.com/material-components/material-components-ios/pull/7466 to clarify the behavior of the fallback flag.
2019-05-28 14:18:08 -04:00
featherless
ec4b19d064
[Typography] Add mdc_scaledFontForTraitEnvironment. (#7471)
This method's logic exists frequently throughout our componentry and theming extensions as a mechanism for scaling a scalable font with the preferred content size category.

This change introduces a new API that can be invoked by each of the components and theming extensions that support Dynamic Type.

Part of https://github.com/material-components/material-components-ios/issues/7470
2019-05-24 15:19:38 -04:00
featherless
ca11c9b079
[Typography] Copy-edit of UIFont+MaterialScalable.h (#7475)
- `-mdc_scaledFontForSizeCategory:` has been documented as preferred over `-mdc_scaledFontForCurrentSizeCategory` because it encourages use of trait collections and is more testable as a result.
- The method summaries follow the verb form guidance at https://developers.google.com/style/reference-verbs (i.e. "Returns" instead of "Return").
- `mdc_scalingCurve's` property type is now typedef'd so that it can be consistently used throughout the Typography target.
- All of the public API have been copy-edited for clarity and conciseness.

Closes https://github.com/material-components/material-components-ios/issues/7474
2019-05-24 07:06:30 -04:00
featherless
50bd0a4dc5 [Typography] Implement copy semantics on the UIFont's mdc_scalingCurve. (#7476)
Prior to this change, mdc_scalingCurve was implemented using retain semantics insteaad of copy semantics. This potentially enabled a class of surprising bugs if mutable dictionaries were being assigned and then modified after the fact.

After this change, mdc_scalingCurve implements copy semantics as its public API defines.

The added test was verified to fail prior to this PR's change, and passes with the PR's change.

Closes https://github.com/material-components/material-components-ios/issues/7472
2019-05-24 01:58:40 -04:00
Wenyu Zhang
59b8de1254
[Typography] Update Dynamic Type section in Typography doc. (#7469)
Add Dynamic Type doc into Typography as a section.
2019-05-24 00:29:28 -04:00
Wenyu Zhang
14484e4efe
[Typography] add a brief doc for Dynamic Type support. (#7431)
The original README for Typography is not composed by separate files. This PR solely adds a separate file for Dynamic Type section, which needs to be integrated into the root one later.
2019-05-23 23:33:33 -04:00
Wenyu Zhang
a74886b91b
[Typography] Split Typography doc into separate md files. (#7435) 2019-05-21 17:04:19 -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
Andrew Overton
b38372192f
Update to Swift 4.2 (#7166)
This PR updates the Swift version to 4.2.

Partially resolves #6874.
2019-04-17 16:59:02 -04:00