190 Commits

Author SHA1 Message Date
Randall Li
84b5b93fad [FeatureHighlight] Change deprecation warning to point at newer recommendation.
PiperOrigin-RevId: 492007921
2022-11-30 13:49:42 -08: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
b2ba1d4c45 [FeatureHighlight] Annotate all APIs as To Be Deprecated.
PiperOrigin-RevId: 457742925
2022-06-28 09:05:07 -07:00
Wenyu Zhang
10e82d096e [FeatureHighlight] Fix accessibilityFrame of dismissal button being used for location based calculation incorrectly.
PiperOrigin-RevId: 421898777
2022-01-14 13:27:30 -08:00
Wenyu Zhang
b457b13005 Internal change.
PiperOrigin-RevId: 417635153
2021-12-21 09:32:05 -08:00
Jeff Verkoeyen
86a8c97dc7 Remove all pre-iOS 12 logic.
PiperOrigin-RevId: 400788645
2021-10-04 12:41:07 -07:00
Jeff Verkoeyen
c34de39e30 Internal change.
PiperOrigin-RevId: 397316843
2021-09-17 07:45:01 -07:00
Alyssa Weiss
1b69273926 Delete MDCTypography font opacities.
PiperOrigin-RevId: 394494448
2021-09-02 10:44:20 -07:00
Alyssa Weiss
38740c1a6c Remove mdc_adjustsFontForContentSizeCategory and mdc_UseLegacyFontScaling from FeatureHighlight
PiperOrigin-RevId: 373787626
2021-05-14 07:57:18 -07:00
Nobody
39911e5e75 [Material-iOS/FeatureHighlight, Material-iOS/FlexibleHeader, Material-iOS/HeaderStackView, Material-iOS/PageControl, Material-iOS/ShadowElevation] Fix broken images in iOS/Supporting APIs dev docs
PiperOrigin-RevId: 368295102
2021-04-13 14:30:45 -07:00
Jeff Verkoeyen
b64b0ec231 Internal change
PiperOrigin-RevId: 360230236
2021-03-01 11:04:51 -08:00
Jeff Verkoeyen
4c86b139e4 Optimizing imports
PiperOrigin-RevId: 357185900
2021-02-12 07:35:17 -08: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
Yarden Eitan
8960677221 [FeatureHighlight] Deprecate color themer APIs.
PiperOrigin-RevId: 333366448
2020-09-23 13:59:45 -07:00
Jeff Verkoeyen
fbb1f20aa2 Internal change
PiperOrigin-RevId: 332151481
2020-09-16 21:01:21 -07:00
Jeff Verkoeyen
eb82984224 Internal change
PiperOrigin-RevId: 331764642
2020-09-15 07:31:56 -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
Bryan Oltman
180a5bf724 [FeatureHighlight] Delete deprecated FeatureHighlightAccessibilityMutator.
PiperOrigin-RevId: 322445386
2020-07-21 14:42:20 -07:00
Bryan Oltman
b2ae9cdce1 [FeatureHighlight] Delete unused accessibility hint string and unused localization support.
PiperOrigin-RevId: 313776127
2020-05-29 07:23:53 -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
Jeff Verkoeyen
92254ea119 Rename all icons to an ic_<#name#> convention.
PiperOrigin-RevId: 308232277
2020-04-24 04:33:51 -07: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
Cody Weaver
fdf87c5995 [MDC/ColorScheme] Remove usage of init within MDC.
We recommend using `initWithDefaults` and we should follow the recommendation. This change removes all usage of `init` within MDC components in order to let us remove that initializer from the public surface.

PiperOrigin-RevId: 302958447
2020-03-25 13:36:51 -07:00
Jeff Verkoeyen
04c7a4b768 [FeatureHighlight] Minor docs fix.
PiperOrigin-RevId: 301373617
2020-03-17 08:01:18 -07:00
Randall Li
fa62718bc5
add deps on availability for a bunch of components (#9679)
* add Availability build file

* add Button deps on availability

* added elevation

* corrected include statements to use import of the umbrella files

* revert unwanted changes

* spaces

* clangformat

* add availability dep

* added buttom nav deps on availibility

* Add FeatureHighlight build dep for Availability

* Add Availability build dep to FeatureHighlight private

* Add missing =

* fixed tabs spacing

Co-authored-by: Bryan Oltman <bryanoltman@gmail.com>
2020-02-11 13:14:09 -05:00
Nobody
ef3c2bf8c9 [Material][Availability] Migrates Feature Hightlight to MDCAvailability.
PiperOrigin-RevId: 293794429
2020-02-07 05:30:24 -08:00
Robert Moore
076aaa29dc
[FeatureHighlight] Allow UIAccessibility to activate the "dismiss" affordance. (#9486)
This change connects the recently-added "dismiss" affordance to an action that
allows UIAccessibility to reject the Feature Highlight.  In #8959, a
discoverable affordance was added to Feature Highlight so UIAccessibility
would present dismiss options more easily to users. That change did not
include connecting the view to any action or gesture recognizer, so users
could discover a "dismiss" button but nothing happened when it was activated.

This change does the following:

*   Changes the dismiss view to a UIButton. There were complications when
    attempting to add another gesture recognizer to the view hierarchy and a
    UIButton was a simpler solution.
*   Sets the layout frame of the dismiss view to `{0, 0, 1, 1}`, creating a
    nearly-invisible clear view in the upper-left corner of the screen. The
    `accessibilityFrame` is set to match
    the Feature Highlight's bounds, which presents the affordance to
    UIAccessibility in a manner similar to a Scrim.  This is necessary to
    avoid introducing accidental "reject" taps if the user pressed on the
    Feature Highlight itself.

Closes #9450
2020-01-24 13:51:10 -05:00
Andrew Overton
0b2323ad42
Delete MDCFeatureHighlightTypographyThemer (#9273)
This PR deletes MDCFeatureHighlightTypographyThemer.

Closes #9208.
2019-12-16 09:52:51 -05:00
Andrew Overton
ad9631c0f7
Delete MDCFeatureHighlightFontThemer (#9230)
Closes #9104. Delete MDCFeatureHighlightFontThemer.
2019-12-10 13:41:31 -05:00
Andrew Overton
1920dd6878
Deprecate MDCFeatureHighlightTypographyThemer (#9225)
Deprecate MDCFeatureHighlightTypographyThemer. Related to #9208.
2019-12-10 11:21:02 -05:00
Andrew Overton
0f9e889b7d
[FeatureHighlight] Don't use MDCFeatureHighlightTypographyThemer in examples (#9224)
Related to #9208
2019-12-10 11:19:45 -05:00
Robert Moore
8eb7296dab
[Catalog] Fix container scheme properties. (#9192)
Making remaining examples use protocol for container schemes to match the
project's expected convention.

Found while reviewing #9188
2019-12-09 10:48:25 -05:00
Andrew Overton
c8b904426e
deprecate MDCFeatureHighlightFontThemer (#9115)
Related to #9104.
2019-12-06 11:35:50 -05:00
Robert Moore
36d950545f [FeatureHighlight] Fix accessibility tests. (#9018)
Pull request #8959 changed the accessibility behavior of Feature Highlight but
did not update the tests. Somehow the last commit in the PR failed CI tests,
but the PR itself was marked as passing.  This commit updates the unit tests
to reflect the latest behavioral expectations for accessibility.

Follow-up for #8961
2019-11-22 07:25:49 -05:00
Yarden Eitan
db709613cc
[FeatureHighlight] Positions label not hidden behind nav bar. (#8969)
Now label can be seen and voiceover will focus on it in the right order.

Closes #8888 

Before:

![Simulator Screen Shot - iPhone 7 - 2019-11-15 at 14 53 43](https://user-images.githubusercontent.com/4066863/68971687-18393280-07b8-11ea-9b1c-b8139f2946b2.png)


After:

![Simulator Screen Shot - iPhone 7 - 2019-11-15 at 14 53 34](https://user-images.githubusercontent.com/4066863/68971698-1b342300-07b8-11ea-8bca-962f50a31e6d.png)
2019-11-15 15:35:15 -05:00
Robert Moore
8e9eff85f8
[FeatureHighlight] Make "Color" example accessible. (#8957)
Includes the following changes:
1.  Each cell is an accessibility element with the color name as the label.
2.  Shown Feature Highlights no longer include the "double-tap to dismiss"
    hint.

|Before|After|
|---|---|
|![IMG_0099](https://user-images.githubusercontent.com/1753199/68967680-c344ee80-07ae-11ea-8b97-43a0045ffc53.PNG)|![IMG_0098](https://user-images.githubusercontent.com/1753199/68967657-b4f6d280-07ae-11ea-828f-4976f05ce862.PNG)|


Closes #8889
2019-11-15 15:23:08 -05:00
Yarden Eitan
4c7402857c
[FeatureHighlight] Add a voiceover dismissal affordance for the feature highlight. (#8959)
Currently the feature highlight didn't have a proper dismiss affordance when voiceover is on.

It will instead speak a hint of "double tap to dismiss" on the title but without allowing the user to dismiss even when double tapped.

This adds a dismiss affordance and passes the accessibility hint to dismiss to that view.

Frame of dismissal button in VO:
![IMG_2140](https://user-images.githubusercontent.com/4066863/68971016-95fc3e80-07b6-11ea-846d-e4219429a4d7.PNG)


Closes #8961 #8888 #8884 #8886 #8885
2019-11-15 15:11:56 -05:00
Yarden Eitan
ee10e067aa
[FeatureHighlight] Add adjustsFontForContentSizeCategory suppor… (#8655)
This PR adds adjustsFontForContentSizeCategory property to MDCFeatureHighlightViewController, allowing clients to have their scalable fonts adjust based on content size category changes.

Due to FeatureHighlight using an attributedText to set up the text for its labels, for the scalable fonts to adjust properly, the attributedText needs to have the font as an attribute. This is an interesting gotcha that was found while working on this PR.

Closes #8634
2019-10-28 17:32:59 -04:00
Yarden Eitan
115780b1a3
[FeatureHighlight] Add snapshot tests for setting preferredFont with adjustsFontForContentSizeCategory (#8629)
This PR adds 2 snapshot tests to verify the behavior for setting preferredFont on FeatureHighlight's title and body text.

Closes #8630
2019-10-24 10:56:52 -04:00
Wenyu Zhang
c2d5bf6f9b
[FeatureHighlight] Add snapshot tests to ensure the default presentation behavior doesn't change under iOS 13. (#8366)
Part of b/135017125.

Added a snapshot test to ensure FeatureHighlight's appearance doesn't change when presented under iOS 13.
2019-08-27 10:30:40 -04:00
Robert Moore
e92e0ef7d5
[FeatureHighlight] Use Starlark rules. (#8168)
Add more use of Starlark rules in the BUILD file to make releases easier.

Part of #8150
2019-08-02 08:58:24 -04:00
Cody Weaver
a57245ed91
[FeatureHighlight] Add traitCollectionDidChange block (#8036)
Adds a traitCollectionDidChangeBlock to MDCFeatureHighlightViewController and MDCFeatureHighlightView, called when its trait collection changes.

Additionally this moves the FeatureHighlightView test to a more generic name, instead of FeatureHighlightNoopTests they were moved to FeatureHighlightViewTests.

Closes #8050
2019-07-24 07:36:14 -07:00
Bryan Oltman
086cdb43e5
[FeatureHighlight] Support dynamic color (#7936)
* initial support for dynamic color

* Use current trait collection to get pulse colors

* Remove test code

* Uncomment

* clang

* Fix iOS 13 check
2019-07-16 12:08:27 -04:00
Yarden Eitan
efe61588a6
update (#7246)
We need to add @objc annotations to colorScheme and typographyScheme instances in our Swift examples, because we moved to Swift 4.2, the respondsToSelector won't find `setColorScheme:` and `setTypographyScheme:` setters otherwise.
2019-04-23 10:21:14 -04:00
featherless
7758aae05d
[FeatureHighlight] Annotate themer APIs with the recommended APIs. (#7222)
Part of https://github.com/material-components/material-components-ios/issues/7108
2019-04-22 19:58:16 +03: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