27 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
ianegordon
29e98b8736
[Snackbar] Add customizable fonts (#2831)
* Add a custom font property

* Add custom button font
2018-01-12 10:10:19 -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
Adrian Secord
479f7b1141 Remove trailing whitespace everywhere. (#2168) 2017-10-13 11:33:35 -04:00
Alastair Tse
4a46c8c19e Monochromatic sweep of all catalog components (#1370)
* Replace MDC all icons

* Update border

* Replace MDCActionExtension icon with new logo

* Update all headers to be white on black

* Make Catalog greyscale to match Material’s style.

* Fix collection tile

* Update all headers to be white on black

* Make Catalog greyscale to match Material’s style.

* Fix collection tile

* WIP: Updating TabBar example to use black/green theme.

* WIP: Monochoroming all examples.

* Switch MDC Catalog to a black and white theme (#1355)

* Replace MDC all icons

* Update border

* Replace MDCActionExtension icon with new logo

* Update all headers to be white on black

* Make Catalog greyscale to match Material’s style.

* Fix collection tile

* Update all headers to be white on black

* Make Catalog greyscale to match Material’s style.

* Fix collection tile

* Fix floats

* Make Catalog greyscale to match Material’s style.

* More black and whiting

* WIP: Snackbar and global style

* Simplify snack bar examples.

* Page control
2017-05-05 16:16:47 -04:00
Adrian Secord
8c3af252be Adding AUTHORS and removing CONTRIBUTORS.txt.
We can credit any contributor who would like to be credited this way, by adding them on request to the AUTHORS file. The copyright statement changes are required for this to work. Note that this has...

Summary:

We can credit any contributor who would like to be credited this way, by adding them on request to the AUTHORS file. The copyright statement changes are required for this to work. Note that this has no legal change, since the contributors always retained their copyright despite the copyright notice, but it's a nice acknowledgement.

Changed copyright statement to include non-Google authors.

Command run:

find * \( -name '*\.m' -or -name '*\.h' -or -name '*\.swift' \) -and -not \( -path 'scripts/external*' -name Pods  \) -print0 | xargs -0 sed -i '' 's/Copyright \(.*\) Google Inc/Copyright \1 the Material Components for iOS authors/'

Added non-source files.

Command run:

grep -Rl 'Copyright .* Google Inc' * --exclude-dir scripts/external --null | xargs -0 sed -i '' 's/Copyright \(.*\) Google Inc/Copyright \1 the Material Components for iOS authors/'

Reviewers: featherless, O1 Material components iOS, randallli

Reviewed By: O1 Material components iOS, randallli

Tags: #material_components_ios

Differential Revision: http://codereview.cc/D1415
2016-08-08 08:16:37 -07:00
Junius Gunaratne
e8afa47fa6 [Snackbar] Adding Snackbar component and related Overlay Window
Summary:
Adds Snackbar and related Overlay Window component as well as demos for MDCCatalog. The Overlay component, of which Snackbar depends, is private for the time being.

  - Removed dependencies on internal core.
  - Removed i18n string translation, TODO added to replace.
  - Removed RTL, waiting on https://github.com/google/material-components-ios/issues/579
  - Animation curve constants moved inline.
  - Fixed styling to be the material standard instead of configurable.

Reviewers: ajsecord, O1 Material components iOS

Reviewed By: ajsecord, O1 Material components iOS

Tags: #material_components_ios

Differential Revision: http://codereview.cc/D1036
2016-06-29 10:44:06 -04:00