211 Commits

Author SHA1 Message Date
Cody Weaver
2fed28c5d8 Internal change
PiperOrigin-RevId: 748022021
2025-04-15 14:26:07 -07:00
Nobody
24a0ffbd03 Annotate various Delegate protocols as NS_SWIFT_UI_ACTOR
PiperOrigin-RevId: 708413470
2024-12-20 13:33:55 -08:00
Nobody
8f69468a2f Update Material iOS to compile for visionOS
PiperOrigin-RevId: 641364760
2024-06-07 14:52:13 -07:00
Jeff Verkoeyen
28e23261a8 [Collections] Remove defunct test.
This test no longer passes when built with Xcode 15.0.1, likely due to underlying changes in trait collection behaviors with iOS 17+ SDKs.
The failure was:

```
Failure at components/Collections/tests/unit/CollectionsStylerTests.m:180
Assertion Failure at CollectionsStylerTests.m:180: ((lightModeImage) not equal to (darkModeImage)) failed: ("<_UIResizableImage:0x600002dd49a0 anonymous {44, 44} renderingMode=automatic(original)>") is equal to ("<_UIResizableImage:0x600002dd49a0 anonymous {44, 44} renderingMode=automatic(original)>")
```

PiperOrigin-RevId: 606709730
2024-02-13 12:30:02 -08:00
Randall Li
ec2d41dfdb [MDCCollections] Change deprecation warning to point at migration guide.
PiperOrigin-RevId: 490282427
2022-11-22 10:54:27 -08:00
Nobody
c429841c3d Fixed up imports and nullability for Collections
PiperOrigin-RevId: 487878926
2022-11-11 11:46:04 -08:00
Jeff Verkoeyen
6f579ed282 [Collections] Delete the docs.
This component is no longer supported.

PiperOrigin-RevId: 477620059
2022-09-28 20:29:03 -07:00
Nobody
9e1c0c0a45 Internal change
PiperOrigin-RevId: 477458164
2022-09-28 08:26:32 -07:00
Nobody
1bbb14cafb Fix a layout exception that was triggered on iPad Mini in SplitView.
PiperOrigin-RevId: 475356973
2022-09-19 12:32:26 -07:00
Nobody
3713e0d61e Add void to functions in C missing parameters to fix -Wstrict-prototypes warnings.
This warning became more strict after updates in the clang compiler.

The error message that this change fixes is:

```
error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
```
PiperOrigin-RevId: 472723024
2022-09-07 07:52:30 -07:00
Jeff Verkoeyen
72dcc44075 Internal change
PiperOrigin-RevId: 468184898
2022-08-17 06:51:30 -07:00
Jeff Verkoeyen
b2bbd50350 Mark all To Be Deprecated APIs as Deprecated.
PiperOrigin-RevId: 460478209
2022-07-12 09:13:52 -07:00
Jeff Verkoeyen
8017856349 [Collections] Annotate all APIs as To Be Deprecated
PiperOrigin-RevId: 457735073
2022-06-28 08:24:19 -07:00
Nobody
7d5ebf1a70 [Collections] Update background color images to support dynamic colors
PiperOrigin-RevId: 453896790
2022-06-09 04:58:27 -07:00
Wenyu Zhang
598c7be032 Internal change.
PiperOrigin-RevId: 405860644
2021-10-27 04:39:56 -07:00
Jeff Verkoeyen
886df7d80d Remove all pre-iOS 12 logic.
PiperOrigin-RevId: 401065746
2021-10-05 13:48:13 -07:00
Jeff Verkoeyen
89b30158ef Remove all pre-iOS 12 logic.
PiperOrigin-RevId: 401010649
2021-10-05 10:03:23 -07:00
Wenyu Zhang
2462921fa8 Internal change
PiperOrigin-RevId: 400032429
2021-09-30 14:56:05 -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
Jeff Verkoeyen
29803522c6 Optimizing imports
PiperOrigin-RevId: 357185525
2021-02-12 07:27:05 -08:00
Jeff Verkoeyen
39c20e15f8 Optimizing imports
PiperOrigin-RevId: 356967514
2021-02-11 07:17:45 -08:00
Jeff Verkoeyen
6171ea2840 Optimizing imports
PiperOrigin-RevId: 356854140
2021-02-10 16:30:16 -08:00
Nobody
21d67fef12 Silence warnings when including a header with a method that uses deprecated declarations.
PiperOrigin-RevId: 329913818
2020-09-03 07:22:41 -07:00
Yarden Eitan
8d7bc88a11 [Ink] Official deprecation of Ink.
Please use the Ripple component.

PiperOrigin-RevId: 329771765
2020-09-02 13:07:40 -07:00
featherless
8cea56b405 Enable Catalyst support for the catalogs.
Turning this support on revealed a new class of error:

```
Implicit conversion from integral type 'int' to 'BOOL'
```

These errors have been fixed where applicable.

Note that due to https://stackoverflow.com/questions/58547010/ios-catalyst-cocoapod-framework-error-signing-requires-a-development-team, each of the icons pod targets needs to have its Signing Certificate value manually set to "Sign to Run Locally".

Separately, due to https://github.com/onmyway133/blog/issues/572 we also need to disable Library Validation on the projects.

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

COPYBARA_INTEGRATE_REVIEW=https://github.com/material-components/material-components-ios/pull/10059 from jverkoey:catalyst 66127447f2d9e26942f2543ccdb3d2963caa30fa
PiperOrigin-RevId: 326058707
2020-08-11 11:10:36 -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
Yarden Eitan
f8465c8fb3 [Collections] Add Ripple as an opt-in for MDCCollections and MDCCollectionCells
PiperOrigin-RevId: 318026061
2020-06-24 02:09:05 -07:00
Wenyu Zhang
5e0294184b [Collections] Fix dynamic color not working when it is used in collectionView:cellBackgroundColorAtIndexPath:.
PiperOrigin-RevId: 310352709
2020-05-07 07:20:49 -07:00
Jeff Verkoeyen
146fb7754c [Collections] Remove special characters from example breadcrumbs.
PiperOrigin-RevId: 310287164
2020-05-06 21:12:47 -07:00
Wenyu Zhang
a866a00f77 Internal change.
PiperOrigin-RevId: 309222502
2020-04-30 07:38:16 -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
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
Bryan Oltman
97f26d5767 [Collections] Move protocol definitions into separate header files
PiperOrigin-RevId: 302054424
2020-03-20 10:34:56 -07:00
Nobody
91856c66ff [Collections] Move protocol definitions into separate header files
PiperOrigin-RevId: 301928849
2020-03-19 17:27:32 -07:00
Nobody
4d636f111d [Collections] Remove private header imports from MaterialCollections.h
PiperOrigin-RevId: 301926673
2020-03-19 17:13:07 -07:00
Bryan Oltman
41eaca5b96 [Collections] Remove private header imports from MaterialCollections.h
PiperOrigin-RevId: 301914951
2020-03-19 16:06:48 -07:00
Bryan Oltman
a245b4468e [Collections] Move protocol definitions into separate header files
PiperOrigin-RevId: 301858977
2020-03-19 11:36:15 -07:00
Randall Li
b3f784f11e
[Material][Availability] Migrates Collections to MDCAvailability. (#9712)
[Material][Availability] Migrates Collections to MDCAvailability.
2020-02-18 13:42:15 -05:00
Robert Moore
a97f0e9dd4
[Collections] Use more Starlark macros. (#8167)
Add more Starlark macro usage to the BUILD file. Make releasing easier.

Part of #8150
2019-08-02 08:58:13 -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
Wenyu Zhang
a4e6886f22
Fix some CGFloat conversion. (#7130) 2019-04-12 12:09:19 -04:00
dmaclach
921ad6e4db [Collections] Clean up interface by removing NS_REQUIRES_SUPER (#6788)
The delegate calls that return "BOOL" have no reason to *require* subclasses to call them. They set no state in the collection view. Subclasses can certainly call [super] if they want to get the functionality of MDCCollectionViewController, but the NS_REQUIRES_SUPER is too strong a requirement for a lot of subclassing.
2019-03-06 18:32:13 -05:00
Yarden Eitan
c4d24627ee
updated jazzy yaml files to include framework root (#6750)
We have had errors when generating the docs using jazzy specifically around components giving a fatal error around not finding imports when depending on other components. This is because each component for jazzy is isolated and on its own unless we provide the framework root. This caused our website generator to crash each time and fail to generate a new website.

This should resolve this problem.

QA=
Before the fix when running the website generator we got these errors:
```
/material-components-ios/components/BottomAppBar/src/MDCBottomAppBarView.h:17:9: fatal error: 'MaterialButtons.h' file not found
building site
building search index
^C/Library/Ruby/Gems/2.3.0/gems/rouge-3.1.1/lib/rouge/lexer.rb:458:in `load': Interrupt
	from /Library/Ruby/Gems/2.3.0/gems/rouge-3.1.1/lib/rouge/lexer.rb:458:in `load_lexer'
	from /Library/Ruby/Gems/2.3.0/gems/rouge-3.1.1/lib/rouge.rb:50:in `block in <top (required)>'
	from /Library/Ruby/Gems/2.3.0/gems/rouge-3.1.1/lib/rouge.rb:49:in `each'
	from /Library/Ruby/Gems/2.3.0/gems/rouge-3.1.1/lib/rouge.rb:49:in `<top (required)>'
	from /Library/Ruby/Gems/2.3.0/gems/jazzy-0.9.3/lib/jazzy/jazzy_markdown.rb:2:in `require'
	from /Library/Ruby/Gems/2.3.0/gems/jazzy-0.9.3/lib/jazzy/jazzy_markdown.rb:2:in `<top (required)>'
	from /Library/Ruby/Gems/2.3.0/gems/jazzy-0.9.3/lib/jazzy/doc.rb:7:in `require'
	from /Library/Ruby/Gems/2.3.0/gems/jazzy-0.9.3/lib/jazzy/doc.rb:7:in `<top (required)>'
	from /Library/Ruby/Gems/2.3.0/gems/jazzy-0.9.3/lib/jazzy/config.rb:5:in `require'
	from /Library/Ruby/Gems/2.3.0/gems/jazzy-0.9.3/lib/jazzy/config.rb:5:in `<top (required)>'
	from /Library/Ruby/Gems/2.3.0/gems/jazzy-0.9.3/lib/jazzy.rb:1:in `require'
	from /Library/Ruby/Gems/2.3.0/gems/jazzy-0.9.3/lib/jazzy.rb:1:in `<top (required)>'
	from /Library/Ruby/Gems/2.3.0/gems/jazzy-0.9.3/bin/jazzy:13:in `require'
	from /Library/Ruby/Gems/2.3.0/gems/jazzy-0.9.3/bin/jazzy:13:in `<top (required)>'
	from /usr/local/bin/jazzy:22:in `load'
	from /usr/local/bin/jazzy:22:in `<top (required)>'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/cli/exec.rb:74:in `load'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/cli/exec.rb:74:in `kernel_load'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/cli/exec.rb:28:in `run'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/cli.rb:463:in `exec'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/cli.rb:27:in `dispatch'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/cli.rb:18:in `start'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/exe/bundle:30:in `block in <top (required)>'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors'
	from /Library/Ruby/Gems/2.3.0/gems/bundler-2.0.1/exe/bundle:22:in `<top (required)>'
	from /usr/local/bin/bundle:22:in `load'
	from /usr/local/bin/bundle:22:in `<main>'
/material-components-site-generator/scripts/lib/reporter.js:36
      throw e;
      ^

Error: Command failed: bundle exec jazzy         --output "/material-components-site-generator/.stage/ios/catalog/bottomnavigation/api-docs/"         --theme "/material-components-site-generator/ios-api-docs-src/theme"         --head '/components'         --use-safe-filenames
    at checkExecSyncError (child_process.js:601:13)
    at execSync (child_process.js:641:13)
    at JazzyApiGenerator.build (/material-components-site-generator/scripts/lib/jazzy-api-generator.js:34:5)
    at PlatformSite.generateApiDocs (/material-components-site-generator/scripts/lib/platform-site.js:212:17)
    at platformSites.forEach (/material-components-site-generator/scripts/build:86:14)
    at Array.forEach (<anonymous>)
    at reporter.step (/material-components-site-generator/scripts/build:85:21)
    at Reporter.step (/material-components-site-generator/scripts/lib/reporter.js:32:22)
    at Object.<anonymous> (/material-components-site-generator/scripts/build:84:14)
    at Module._compile (module.js:652:30)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Function.Module.runMain (module.js:693:10)
    at startup (bootstrap_node.js:191:16)
    at bootstrap_node.js:612:3
```
Now we no longer get fatal errors or crash when running the script.
2019-03-01 16:52:02 -05:00
Robert Moore
d57f7199b3
[Collections] Customize reorder long-press timing. (#6469)
To support customized UI when reordering elements in an Editing MDC Collection, the long press gesture recognizer's `minimumPressDuration` can be modified by clients. 

Internal issue: b/118123655

PiperOrigin-RevId: 230317765
2019-01-25 07:51:56 -05:00
Robert Moore
800188a649
{clang-format} Format the components. (#6347)
This is a follow-up to https://github.com/material-components/material-components-ios/pull/6027

```
find components \( -name "*.h" -or -name "*.m" \) | xargs clang-format -i
```
2019-01-23 11:08:43 -05:00
Cody Weaver
eeafb68117
[Collections] Add examples to BUILD file (#6341)
Closes #6216
2019-01-16 09:51:30 -05:00
Yarden Eitan
2803125b2c
ran clang-format (#6027) 2019-01-11 13:23:51 -05:00