62 Commits

Author SHA1 Message Date
Jeff Verkoeyen
91ff4bfb83 Delete flaky tests.
PiperOrigin-RevId: 607353431
2024-02-15 09:09:32 -08:00
Cody Weaver
17a0a79321 #Snackbar Set all examples to delay snapshots for 1 second
PiperOrigin-RevId: 556804131
2023-08-14 08:48:21 -07:00
David Collazo
80ea6b0ad5 Add snapshot delay of 1 second to Snackbar example.
PiperOrigin-RevId: 536794296
2023-05-31 12:52:35 -07:00
Janette James
ba1e10d39b Delete deprecated MDCSnackbarMessageView.actionButtons API
PiperOrigin-RevId: 518894043
2023-03-23 10:15:45 -07:00
Morgan Redding
0997c9ddf6 Pass SnackbarManager to MDCSnackbarManagerDelegate methods.
This is a breaking change as it changes to the methods in the MDCSnackbarManagerDelegate protocol.

PiperOrigin-RevId: 480429735
2022-10-11 12:52:25 -07:00
Jeff Verkoeyen
86a8c97dc7 Remove all pre-iOS 12 logic.
PiperOrigin-RevId: 400788645
2021-10-04 12:41:07 -07:00
Alyssa Weiss
93ccaa53c1 Remove mdc_adjustsfontforcontentsizecategory from MDCSnackBar
PiperOrigin-RevId: 391377140
2021-08-17 14:31:42 -07:00
Jeff Verkoeyen
4c86b139e4 Optimizing imports
PiperOrigin-RevId: 357185900
2021-02-12 07:35:17 -08:00
Yarden Eitan
0c6adf0080 [MDCSnackbar] Update MDCSnackbarManagerDelegate presentation lifecycle methods to declare a nonnull MDCSnackbarMessageView.
PiperOrigin-RevId: 339064856
2020-10-26 10:24:25 -07:00
Bryan Oltman
78868b55e6 [Snackbar] Remove references to deprecated static MDCSnackbarManager methods.
PiperOrigin-RevId: 331144968
2020-09-11 07:36:29 -07:00
Bryan Oltman
63670a7b2c [Snackbar] Remove non-shared classes from Snackbar supplemental directory.
PiperOrigin-RevId: 331144273
2020-09-11 07:30:33 -07:00
Randall Li
4c6b2357e9 [MDCSnackbar] Example: Dismiss snackbars when push or popping the example VC.
PiperOrigin-RevId: 330579203
2020-09-08 13:57:59 -07:00
Jeff Verkoeyen
ad2b16134b Internal change
PiperOrigin-RevId: 326243049
2020-08-12 09:09:22 -07:00
Jeff Verkoeyen
0dd6376c6d Internal change
PiperOrigin-RevId: 324738366
2020-08-03 20:28:17 -07:00
Bryan Oltman
9b23c3474a [Snackbar] Delete deprecated MDCSnackbarTypographyThemer.
PiperOrigin-RevId: 323632046
2020-07-28 12:45:21 -07:00
Yarden Eitan
ec84eb996e [Snackbar] Add ability to set presentation host view on specific message.
This allows finer granularity to set specific snackbar messages under certain views.

PiperOrigin-RevId: 309919536
2020-05-05 04:08:35 -07:00
Jeff Verkoeyen
a5324f3bf3 [Snackbar] Add snapshot test cases to the examples.
PiperOrigin-RevId: 309060067
2020-04-29 11:21:31 -07:00
Bryan Oltman
c95a444997
[Snackbar] Add example to show snackbar with keyboard (#9479)
Adds a Dragons example to demonstrate how `MDCSnackbar` interacts with the on-screen keyboard. 
 
![snackbar-keyboard](https://user-images.githubusercontent.com/581764/73021209-25e0e900-3df5-11ea-83af-755176caf559.gif)

Related to #9456
2020-01-24 10:37:19 -05:00
Yarden Eitan
d0f05aef60
[Snackbar] Allow Snackbars to be non-transient if needed. (#9299)
This provides an opt-in functionality for clients to have the Snackbar persist unless an action is made upon it.
2019-12-18 12:37:18 -05:00
Andrew Overton
04de6086a9
[Snackbar] Delete MDCSnackbarColorThemer (#9227)
Delete MDCSnackbarColorThemer. Closes #9089.
2019-12-10 12:32:22 -05:00
Andrew Overton
e4fad9a7a8
[Snackbar] Deprecate MDCSnackbarColorThemer (#9152)
Related to #9089.
Related to #9090.
2019-12-06 14:19:49 -05:00
Yarden Eitan
e5a94aea1f
[Snackbar] Add will present block to allow customization of sna… (#8751)
Add a will present block to the MDCSnackbarMessage class. This allows for clients who wish to customize their snackbar message view (MDCSnackbarMessageView) instance, but without exposing UI properties on the message objects. This also makes it easier for clients who have multiple files where they show the snackbar with only one Manager to not have issues with different classes stealing the MDCSnackbarDelegate in order to add customization to the snackbar view.

![Simulator Screen Shot - iPhone 7 - 2019-11-07 at 12 38 42](https://user-images.githubusercontent.com/4066863/68414853-fcea7980-015e-11ea-8ae6-3ceb7d091a2e.png)
2019-11-07 14:25:34 -05:00
Yarden Eitan
f2821ce66a
[Snackbar] Add focusOnShow API (#8746)
This new API when set to YES allows the Snackbar to be focused and stay on screen by issuing a UIAccessibilityLayoutChangedNotification on the snackbar message view.
2019-11-07 10:14:57 -05:00
Yarden Eitan
3f0c25789c
[Snackbar] Adds the Ripple behavior to Snackbar. (#7596)
## Related links
* Bug: Closes #7379 
* Ripple: [Ripple](https://github.com/material-components/material-components-ios/tree/develop/components/Ripple)

## Introduction
This PR allows enabling the Ripple Behavior for [`MDCSnackbarMessage`](https://github.com/material-components/material-components-ios/tree/develop/components/Snackbar) by enabling the ripple behavior of the internal `MDCButton`. This behavior is an opt in flag property added to MDCSnackbarMessage, `enableRippleBehavior`.  This improves the visual touch feedback for our users as MDCInkView didn't support our current motion guidelines. The original Ink for Snackbar was using an unbounded style with a max ripple radius, however ink didn't have unbounded work in the past, therefore it always showed as bounded, which is the desired way. Therefore removed the unused code.

## Videos
| Before | After |
| - | - |
|![oldRipple](https://user-images.githubusercontent.com/4066863/59470557-07018980-8e06-11e9-9f2e-524679970a5b.gif)|![newRipple](https://user-images.githubusercontent.com/4066863/59470558-0963e380-8e06-11e9-85e7-635d89c09c30.gif)|
2019-06-15 14:33:36 -04: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
Yarden Eitan
ec206d5936
[Snackbar] Fix for Snackbar themer breaking Snackbar examples on dragons (#5731)
When the Scheme is nil, the Snackbar gets weird colors and is presented wrong. Because Dragons doesn't receive a scheme, we need to explicitly create a scheme in each of the examples to fix the color for Snackbars.
2018-11-12 20:36:41 +02:00
Robert Moore
74a27253e8
Global replace of integral single-precision literals with integer literals. (#5709)
Global replace of integral single-precision literals with integer literals.

Regular expression used:
```perl
/[^\w]([0-9]+)\.[0]*[fF]/$1/
```
2018-11-08 14:02:04 -05:00
featherless
2181084272
[automated] Standardize our open source license stanza to what Xcode generates. (#4985)
Removes the need to copy-paste stanzas from other files anymore as we'll rely on #4478 to generate the correct stanza for us instead.

This was an automated change generated by running a find-and-replace regular expression:

```
/\*
 Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\.

 Licensed under the Apache License, Version 2\.0 \(the "License"\);
 you may not use this file except in compliance with the License\.
 You may obtain a copy of the License at

 http://www\.apache\.org/licenses/LICENSE-2\.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.
 See the License for the specific language governing permissions and
 limitations under the License\.
 \*/
```

```
/\*
Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\.

Licensed under the Apache License, Version 2\.0 \(the "License"\);
you may not use this file except in compliance with the License\.
You may obtain a copy of the License at

http://www\.apache\.org/licenses/LICENSE-2\.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.
See the License for the specific language governing permissions and
limitations under the License\.
\*/
```

```
/\*
 Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\.
 Licensed under the Apache License, Version 2\.0 \(the "License"\);
 you may not use this file except in compliance with the License\.
 You may obtain a copy of the License at
 http://www\.apache\.org/licenses/LICENSE-2\.0
 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.
 See the License for the specific language governing permissions and
 limitations under the License\.
 \*/
```

```
// Copyright $1-present the Material Components for iOS authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
```
2018-08-31 12:13:07 -04:00
Yarden Eitan
3480c50c67
updated to newest CbC standard (#4956)
Move to the new CbC standard released in CatalogByConvention v2.5.0. See PR: material-foundation/cocoapods-catalog-by-convention#27 for more info on the change.
2018-08-29 20:45:13 -04:00
Robert Moore
514ed51aea
[Snackbar] Make examples accessible to Switch Control (#4745)
Users of Switch Control could not access the cells needed to make Snackbars
appear. For VoiceOver, the accessibilityLabel, accessibilityValue, and
accessibilityHint for the cells in the Message Suspension example were not
integrated with the cells themselves.

Closes #4712
2018-08-08 14:54:15 -04:00
Yarden Eitan
b9d4698caa
[Snackbar] Exposed the snackbar button class (#4171)
* exposed snackbar button class

* moved stuff to init

* nonnull

* move to a delegate logic over subclass

* remove spacing

* update
2018-05-18 10:28:50 -04:00
Mohammad Cazi
5ee14ab92e
[Catalog] Component descriptions update. (#3490)
* Button Description updated.

* Updating the description of Catalog Components.

* Missing space.

* fixing couple of small issues with catalog descriptions.

https://github.com/material-components/material-components-ios/pull/3490
2018-04-25 16:06:18 -04:00
Yarden Eitan
7f7bc36202
[Catalog] Expose colorScheme + typographyScheme properties for all examples to use app wide theming (#3478)
Made colorScheme and typographyScheme properties in the class interfaces for all our examples.
Moved theming away from example inits and into viewDidLoad
Small update for slider example to allow it to grab the theming properly.
Related Pivotal: https://www.pivotaltracker.com/story/show/156616695
2018-04-25 15:15:17 -04:00
featherless
330d9f6084
[Snackbar] Add umbrella headers for all extension targets. (#3475)
Also updated all imports to make use of the umbrella headers.

Pivotal story: https://www.pivotaltracker.com/story/show/157045283
2018-04-24 17:10:29 -04:00
Yarden Eitan
66f9b8702a
[Snackbar] Implement a semantic color scheme color themer API. (#3287)
Addition of a unit test, and updated the examples to use the new themer. Removed older stub color themer that was a no-op.

Pivotal: https://www.pivotaltracker.com/story/show/156171666
2018-04-11 10:49:57 +03:00
Yarden Eitan
0efc202c35
[Snackbar] Implement a typography themer. (#3288)
* added typography theming to snackbar

* added TypographyThemer to kokoro

* deprecation message
2018-04-09 11:42:21 +03:00
Yarden Eitan
bbf1126b8f
[Snackbar] Removed dependency on UIAppearance entirely for color/font customization/theming. (#3223)
* exposed typograpgy and color customization without the need of UIAppearance.

* doc updates

* update

* review updates
2018-04-05 15:51:00 +03:00
Yarden Eitan
28ef4730aa [Snackbar] font and color updates. (#3125)
* Revert "[TextFields] Adding font themer (#3096)"

This reverts commit 91a376ffe1330c6c96344259d36c837c88188db3.

* update decustomizing to remove color theme

* update decustomizing to remove color theme

* allow nullifying custom colors

* Update SnackbarSimpleExample.m

* fix font size error

* Revert "Revert "[TextFields] Adding font themer (#3096)""

This reverts commit a292d2bdb132c5037d182904428da52aa0a52e15.
2018-03-28 13:54:16 -04:00
Yarden Eitan
7a48b9171a
[Snackbar] added inputAccessory with Snackbar dragon + Fix for it (#3156) 2018-03-28 12:48:56 -04:00
Yarden Eitan
9f735f15d9
[Snackbar] custom font and dynamic type support, UI_APPEARANCE support for color theming (#3090) 2018-03-14 20:41:14 -04:00
Yarden Eitan
f3845d2fd1 [Snackbar] New Snackbar implementation with legacy toggle to activate (#3055)
* WIP

* WIP

* WIP

* update

* update

* update

* update

* update

* iphone x support

* layout stuff

* update

* update for review

* added overlay support
2018-03-08 15:57:35 -05:00
Yura Samsoniuk
d10d499d80 [SnackbarExmaples] Added required super call (#3005) 2018-02-27 10:02:54 -05:00
ianegordon
29e98b8736
[Snackbar] Add customizable fonts (#2831)
* Add a custom font property

* Add custom button font
2018-01-12 10:10:19 -05:00
Yarden Eitan
29d760c7d6
Added isPresentable to catalog files, ported over ZShadow to dragons. (#2726) 2017-12-15 12:20:35 -05:00
Randall Li
d555a8d7aa [Snackbar] Using block typdef to silence warning as error. (#2573) 2017-12-04 18:33:55 -05:00
Yurii Samsoniuk
2a96682230 Replace unnecessary imports with forward declarations (#2429)
* [Themes] Remove unnecessary imports.

* [TextFields] Remove unnecessary imports.

* [Typography] Do not use an umbrella header inside of a component.

* [Snackbar] Do not use self umbrella header.

* [ActivityIndicator] Do not use self umbrella header.

* [AppBar] Use umbrella headers.

* [AppBar] Remove self import header.

* [ButtonBar] Removed self umbrella header imports.

* [Buttons] Removed self umbrella header imports.

* [Collections] Update imports.

* [Dialogs] Moved import into an m file.

* [Collections] Fixed imports.

* [FeatureHighlight] Removed self umbrealla imports.

* [HeaderStackView] Reordered imports.

* [Ink] Replaced imports with forward declarations.

* [Slider] Replaced self umbrella import use.

* [Snackbar] Removed self umbrella header import.

* [Tabs] Changed math import. Replaced self umbrella header import.

* [Icons] Removed unnecessary imports.

* [Overlay] Replaced umbrella header import.

* [ShapeLibrary] Replace Shapes imports with an umbrella header.

* [Shapes] Replaced imports with forward declarations.

* [AppBar] Replace import with a forward declaration.

* [Examples] Updated imports.

* Fixed conflicting imports

* Added space between different import categories
2017-11-16 18:25:06 -05:00
Sam Morrison
5beada0e8d [Snackbar] Update to support safeAreaInsets (#2212)
* Reset bottomOffset when leaving example

* Expand snackbar to cover safeAreaInsets

* Review fixes

* Take horizontal safeAreaInsets in to account

* Review Fix #2
2017-10-18 15:06:30 -04:00
Adrian Secord
479f7b1141 Remove trailing whitespace everywhere. (#2168) 2017-10-13 11:33:35 -04:00
Andrés
6a0a5a62e5 [Catalog] Fix SnackbarOverlayViewExample's use of the OverlayObserver (#1955) 2017-09-07 14:26:01 -04:00
Robert Moore
8940d77d6d [Catalog] Verify all examples provide CatalogByConvention methods (#1911)
All examples now have at least the required `+catalogBreadcrumbs` and `+catalogIsPrimaryDemo`.  All examples in the same breadcrumbs path have only one primary demo.  There should be only one `-catalogDescription` attached to the primary demo.

Closes #1897
2017-08-31 08:46:10 -04:00