David Collazo
5d6a6c8630
Rename SnackbarManagerTests to MDCSnackbarManagerTests with cleanup.
...
PiperOrigin-RevId: 684235249
2024-10-09 17:57:31 -07:00
Frank Wang
8c0ddb0da5
[Snackbar] Remove flaky test
...
PiperOrigin-RevId: 678800704
2024-09-25 12:20:24 -07:00
Janette James
8a2b62a055
Make all snackbars with actions persist until explicitly dismissed
...
PiperOrigin-RevId: 598973358
2024-01-16 15:18:51 -08:00
Janette James
21ffd39eb6
Do not allow actions with nil or empty titles
...
PiperOrigin-RevId: 597262536
2024-01-10 08:49:39 -08:00
Nobody
7952b5beeb
[Snackbar] Delete the unused disabledButtonAlpha property.
...
PiperOrigin-RevId: 584147997
2023-11-20 15:49:11 -08:00
Janette James
ba1e10d39b
Delete deprecated MDCSnackbarMessageView.actionButtons API
...
PiperOrigin-RevId: 518894043
2023-03-23 10:15:45 -07:00
Janette James
79985f2a71
Change MDCSnackbarMessageView.actionButton to a UIButton
...
PiperOrigin-RevId: 518592822
2023-03-22 09:41:15 -07:00
David Collazo
7395c5c77b
Change snackbarView's accessibilityElementsHidden to match its manager's setting when a snackbar is not focusable.
...
PiperOrigin-RevId: 505692142
2023-01-30 07:55:02 -08:00
Wenyu Zhang
fd6c2dda04
[Snackbar] Rename alignment to horizontalAlignment to reflect its intended usage.
...
This prepares us for adding a verticalAlignment if/when needed.
PiperOrigin-RevId: 504853313
2023-01-26 08:49:34 -08: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
Wenyu Zhang
cbe2384696
[MDC-iOS/Snackbar] Void token variable from test.
...
PiperOrigin-RevId: 474824538
2022-09-16 08:49:15 -07:00
Nobody
b91f6db084
Fixed up imports for Snackbar
...
PiperOrigin-RevId: 469479347
2022-08-23 09:32:25 -07:00
Janette James
d71f3d5162
Update accessibilityElementsHidden when VoiceOver status changes
...
PiperOrigin-RevId: 449760487
2022-05-19 09:20:49 -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
Alyssa Weiss
6ccb268a37
Move FontScaler APIs in MDCTypography to a separate directory.
...
PiperOrigin-RevId: 390642325
2021-08-13 10:33:45 -07:00
Wenyu Zhang
ece3a92582
[Snackbar] Add shouldShowMessageWhenVoiceOverIsRunning to support disabling Snackbar under VoiceOver mode.
...
PiperOrigin-RevId: 388737549
2021-08-04 11:06:25 -07:00
Nobody
d9421e391e
Snackbar image and multiple button support dead code cleanup.
...
Adds a new actionButton property to the message view with a backup deprecated actionButtons property for compatibility (note that the type signature has changed from NSMutableArray to NSArray).
PiperOrigin-RevId: 386045907
2021-07-21 10:51:35 -07:00
Alyssa Weiss
640f555df4
Remove adjustsFontForContentSizeCategoryWhenScaledFontIsUnavailable API from MDCSnackbar.
...
PiperOrigin-RevId: 376274802
2021-05-27 16:37:44 -07:00
Jeff Verkoeyen
a8e4831fd0
Flattening all unit tests into single directories as per convention.
...
PiperOrigin-RevId: 367426300
2021-04-08 07:33:29 -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
Jeff Verkoeyen
9a49fd96f9
Internal change.
...
PiperOrigin-RevId: 366342462
2021-04-01 15:26:22 -07:00
Jeff Verkoeyen
b3fa42005b
Optimizing imports
...
PiperOrigin-RevId: 356966407
2021-02-11 07:12:37 -08:00
Yarden Eitan
11e4afa57c
[Snackbar] Add present+dismiss unit test for legacy snackbar.
...
PiperOrigin-RevId: 351433295
2021-01-12 13:16:07 -08:00
Cody Weaver
2158cbeda7
[Snackbar] Make imports more explicit
...
PiperOrigin-RevId: 351406902
2021-01-12 11:09:49 -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
Jeff Verkoeyen
166e7ca6cb
[Snackbar] Delete all deprecated APIs.
...
PiperOrigin-RevId: 334175572
2020-09-28 09:39:46 -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
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
40e66874e6
[Snackbar] Delete deprecated MDCSnackbarFontThemer.
...
PiperOrigin-RevId: 323636613
2020-07-28 13:08:22 -07:00
Bryan Oltman
9b23c3474a
[Snackbar] Delete deprecated MDCSnackbarTypographyThemer.
...
PiperOrigin-RevId: 323632046
2020-07-28 12:45:21 -07:00
Randall Li
7593c0dc3a
[MDC snackbar] Add completion handler with error parameter to snackbar message.
...
PiperOrigin-RevId: 315260744
2020-06-08 06:14:45 -07:00
Randall Li
70dd23c680
[MDCSnackbar] Added more information in description to Message and MessageView.
...
(lldb) po messageView
<MDCSnackbarMessageView: 0x7fdae643ed30; frame = (8 1121; 818 49); animations = { snackbarAnimation=<CAAnimationGroup: 0x7fdae6555fd0>; }; layer = <MDCShadowLayer: 0x7fdae9b20130>> {
message: <MDCSnackbarMessage: 0x7fdae643d2f0> {
text: "message text",
viewClass: "MDCSnackbarMessageView",
};
}
PiperOrigin-RevId: 315195591
2020-06-07 18:20:32 -07:00
Nobody
c8b569bd60
[MDCSnackbar] Add snackbarWillDisappear to SnackbarManagerDelegate
...
PiperOrigin-RevId: 312479558
2020-05-20 07:43:36 -07:00
Nobody
0fcf353c3a
[MDCSnackbar] Add snackbarIsPresenting to MDCSnackbarManagerDelegate.
...
PiperOrigin-RevId: 312316674
2020-05-19 11:21:58 -07:00
Nobody
39e9475f5e
[Snackbar] Add an option to dismiss when the user taps anywhere on the overlay.
...
PiperOrigin-RevId: 310921840
2020-05-12 15:11:26 -04: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
Yarden Eitan
23a372798c
[Snackbar] Add a property to allow customization the accessibility post notification level.
...
This property allows clients to customize the accessibility post notification level for Snackbars that are intended to be focused.
The default behavior leaves the level as before, hence it being an opt-in property.
PiperOrigin-RevId: 307265222
2020-04-19 03:23:16 -07:00
Yarden Eitan
ecbb85397f
[Snackbar] Add 'snackbarDidDisappear' to MDCSnackbarManagerDelegate. ( #9815 )
...
[Snackbar] Add 'snackbarDidDisappear' to MDCSnackbarManagerDelegate.
If you made changes to accommodate the snackbar, this lets you un-make them after the snackbar disappears (rather than when it starts disappearing).
2020-02-28 11:41:56 -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
Bryan Oltman
6717fca594
[Snackbar] Deprecate adjustsFontForContentSizeCategoryWhenScaledFontIsUnavailable ( #8728 )
...
* [Snackbar] Deprecate adjustsFontForContentSizeCategoryWhenScaledFontIsUnavailable
* Revert change to default value
* More reverting changed to default behavior
* clang
2019-11-11 14:21:43 -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.

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
b00771afb7
[Snackbar] Adding traitCollection and elevationDidChange blocks of the messageView in the manager. ( #8330 )
...
This PR adds 2 new properties to the manager; traitCollectionDidChangeBlockForMessageView, and mdc_elevationDidChangeBlockForMessageView. This PR also adds conformance to overriding elevation, if the client wants to override the Snackbar's elevation through the manager.
Because the manager is the API surface for the client when initializing a snackbar, and the message view is only apparent through a delegate for each instance that is created, we need to have elevation and trait collection APIs in the manager itself.
2019-08-16 10:57:37 -04:00
Wenyu Zhang
ab552b1ae0
[Snackbar] Add dynamic type M2 support. ( #8303 )
...
part of https://github.com/material-components/material-components-ios/issues/7428 .
The message text and then button text need to follow the M2 typography scale (https://material.io/design/typography/the-type-system.html#type-scale ). Adding a `adjustsFontForContentSizeCategoryWhenScaledFontIsUnavailable` flag to make the component compatible with the old behavior. This flag is YES by default.
2019-08-14 10:54:04 -04:00
Yarden Eitan
f1a0665d67
[Snackbar] Supports MaterialElevation. ( #8081 )
...
Adds conformance to MDCElevatable and MDCElevationOverriding for snackbar message view.
Closes #8013
2019-07-26 17:50:00 -04:00
Bryan Oltman
4c9ca7d459
[Snackbar] Add traitCollectionDidChangeBlock API ( #7903 )
...
Fixes #7895
2019-07-12 15:54:59 -04:00
Cody Weaver
ba841d886e
[Snackbar] Allow clients to customize elevation ( #7844 )
...
This allows clients to customize the elevation of their snackbar and additionally get the elevation of their snackbar. Unit test have been added for custom elevation and default elevation as well as a custom elevation snapshot test.
2019-07-11 11:21:24 -04:00