25 Commits

Author SHA1 Message Date
Jeff Verkoeyen
4c86b139e4 Optimizing imports
PiperOrigin-RevId: 357185900
2021-02-12 07:35:17 -08: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
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
Robert Moore
372d6b24f9
No longer using -init for Color Scheme. (#5734)
{MDC iOS} No longer using `-init` for Color Scheme.

Based on the discussions in go/mdc-ios-theming, we should not use the `-init` default initializer. Instead, we should use an explicit set of defaults.

Search regex: '\[\[MDCSemanticColorScheme alloc\] init\]'
2018-11-12 12:54:47 -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
John Detloff
0c0ce4248e
Initialize default color and typography schemes in examples (#4200)
Ensure a default colorScheme and typographyScheme is initialized for examples.
2018-05-21 12:44:43 -04:00
Robert Moore
47c1bcb5d3
[FeatureHighlight] Allow setting accessibilityHint (#3649)
Users should be able to override the default `accessibilityHint` on the
title text of the Feature Highlight view. The current hint is incorrect
instructions about dismissing the view.

Since we are not currently making breaking changes to components, this
change will permit teams to override the incorrect hint by assigning
either an empty string (to have no hint) or to set an appropriate hint.

Partially implements #3644
2018-05-02 14:48:23 -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
bb9324ecae
[FeatureHighlight] Add umbrella headers for all extension targets. (#3466)
Also updated all imports to make use of the umbrella headers.

Pivotal story: https://www.pivotaltracker.com/story/show/157045283
2018-04-24 16:23:18 -04:00
Mohammad Cazi
8563ec05c7
[FeatureHighlight] Implementation of Typography Themer. (#3268)
* Adding TypographyThemer for FeatureHighlight.

* finish the deprecation comment.

* fix blaze build

* Typography -> TypographyThemer

* Updated old tests.

* Cleaning up comments, and test.

* use an instead of a for MDC
2018-04-09 16:08:20 -04:00
Mohammad Cazi
fa00c708b7
[FeatureHighlight] Adding Color Themer. (#3260)
* Added Semantic Color Scheme Method for FeatureHighlight.

* change the applied color for title and body.

* Added Color Scheme for Feature Highlight.

* [Color] Implement a swift-friendly API for color scheme defaults. (#3246)

The old API required swift code like so:

    MDCSemanticColorScheme(materialDefaults: ())

The new API allows swift code like so:

    MDCSemanticColorScheme(defaults: .material)

Pivotal story: https://www.pivotaltracker.com/story/show/156527002
2018-04-06 10:24:16 -04:00
Robert Moore
8e8d6f263b
Revert "[FeatureHighlight] FeatureHighlightViewController should expose FeatureHighlightView as a property. (#3145)" (#3231)
Many internal clients are breaking because of this API change. Instead, we
should follow the deprecation policy so clients can make a gradual migration
to the final API.

This reverts commit 24be789f57aedb732ceddecc36699f52875dc8d6.

Reopens #3144
2018-04-04 15:31:54 -04:00
Mohammad Cazi
24be789f57 [FeatureHighlight] FeatureHighlightViewController should expose FeatureHighlightView as a property. (#3145)
* Extracting Accessibility out of FeatureHighlightViewController to a mutator.
Tests added.
Example updated.

* Revert "Extracting Accessibility out of FeatureHighlightViewController to a mutator."

This reverts commit 0b5433ebf86366087b240c4dc4992a0603fa73e0.

* Feature Highlight Clean up.

* Update examples.

* make title and body font defaults a class property.
2018-03-27 13:26:51 -04:00
Mohammad Cazi
fa6a2f67d6 [FeatureHighlight] Accessibility title and body mutator added to fix UIAppearance issue (#3043)
* Extracting Accessibility out of FeatureHighlightViewController to a mutator.
Tests added.
Example updated.

* Added the new folder to pod setting.

* Splitting Title and Body Mutators, added tests for case of nil color.

* extra lf.

* Options is now a variable that can be given to the mutator.

* Fixing unit test issues, Updating all examples.

* Fixing Build file.

* Fixing build file.

* build file fix

* extra pace in the build file

* Revert "extra pace in the build file"

This reverts commit 18195fc893da2bcef7f8ef21f20b9f016b6c6011.

* extra space.

* cleaning up based on PR feedback.

* call super on setup and teardown.

* has to include to folder.

* build file indentation and variable name fixes.

* added color test.

* Document the test

* Made single method for accessibility.

* removing option input from public API.

* improving tests and documentation.

* putting this change in a separate PR.
2018-03-13 12:14:43 -04: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
Will Larche
3fc78fd868 [TextFields] Adding a doc: menu for styles (#2064)
* [TextFields] Beginning to update the docs to show the new controller styles.

* [TextFields] Correcting the name of a file.

* [TextFields] Adding content to controller styles doc.

* [TextFields] Images for the text field styles doc.

* [TextFields] Renaming styling doc.

* [TextFields] Moving doc images.

* [TextFields] Updating image ref paths.

* [TextFields] Text clarity in doc.

* [TextFields] Updated photo.

* [TextFields] Nits of grammar.

* [TextFields] Spelling correction.
2017-09-28 11:25:41 -04:00
Sam Morrison
add558db3e [FeatureHighlight] Dynamic type support (#1884)
* Use material font styles instead of explicitly referencing fonts

* Observe UIContentSizeCategoryDidChangeNotification
2017-08-24 11:45:07 -04:00
Sam Morrison
f73704593b [FeatureHighlight] Improve text layout (#1867)
* Add 1pt of line spacing to feature highlight text

* Add padding between baselines of title and body
2017-08-22 17:06:24 -04:00
Junius Gunaratne
2873e798f2 [Themes] Add ability to change catalog theme (#1477)
Discussed merge with Ian offline. Issues with Travis CI may be resolved once the PR is merged.

* Add color to tiles.

* Add theming to catalog

* Update text field tile.

* Implementation method signatures should match those in header.

* Update MDCDrawFunc typedef

* Pass color scheme through NSNotification

* Add component theming

* Add tabbar themer

* Update tab example to use UIAppearance

* Theme sliders based on UIAppearance proxy

* Allow any class conforming to MDCColorScheme

* Override navigation bar color theme for imagery example.

* Update AppBar and ButtonBar color theming

* Update button bar themer comment

* Update button theming

* Remove theme imports where not necessary.

* Fix case of private
2017-06-23 11:36:48 -04:00
Junius Gunaratne
6d8f757609 Keep feature highlight view implementation in private with limited public properties (#1422)
* Update feature highlight

* Move feature highlight view implementation details into private.

* Move feature highlight view implementation into private

* Move feature highlight properties into private. Fix space formatting.

* Fix formatting

* Clean up comments, formatting.

* Change property order

* Use year of when file was first created.

* Add feature highlight view to umbrella header
2017-05-11 14:18:18 -04:00
Junius Gunaratne
127b60710e Revert "Make MDCFeatureHighlightView public and prepare color properties for UIAppearance (#1410)" (#1419)
This reverts commit 5fa6b89e612acc7c659aaba689445e63d641ca10.
2017-05-10 14:25:32 -04:00
Junius Gunaratne
5fa6b89e61 Make MDCFeatureHighlightView public and prepare color properties for UIAppearance (#1410)
* Make MDCFeatureHighlightView public and update color setters for use with UIAppearance

* Change featureHighlightView to nonnull, fix formatting

* Update comment
2017-05-09 16:30:30 -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
7ba66bf09c Formatted all Objective-C sources with clang-format. (#1133) 2017-01-05 10:17:24 -05:00
Sam Morrison
d4806473e4 MDCFeatureHighlightViewController implementation (#765)
* API Review for Feature Highlight component

Summary:
This is the proposed API for the Feature Highlight component.

For more info see the following links:
Design spec: https://material.googleplex.com/growth-communications/feature-discovery.html#feature-discovery-design
Tracking bug: b/30695049

Example usage
```
MDCFeatureHighlightViewController *vc = [[MDCFeatureHighlightViewController alloc] init];
vc.delegate = self;
vc.hintTitleText = @"...";
vc.hintBodyText = @"...";
[vc highlightView:_button];
[self presentViewController:vc animated:animated completion:completion];
```
In the delegate:
```
- (void)featureHighlightWasAccepted:(MDCFeatureHighlightViewController *)highlight {
  // do accepted things here
  [self dismissViewControllerAnimated:YES completion:nil];
}
- (void)featureHighlightWasIgnored:(MDCFeatureHighlightViewController *)highlight {
  // do ignored things here
  [self dismissViewControllerAnimated:YES completion:nil];
}
```

Reviewers: ajsecord, featherless, iangordon, O1 Material components iOS, randallli

Reviewed By: ajsecord, featherless, iangordon

Subscribers: randallli, iangordon, featherless, ajsecord

Tags: #material_components_ios

Differential Revision: http://codereview.cc/D1465

* Add MDCFeatureHighlightViewController

* Add Feature Highlight typical use

* Get Feature Highlight buildable

* Copy functionality over from prototype

* Accept/Reject highlight with animation

* Rotation

* Tap anywhere in the feature highlight typical use case demo to move the button

* Align highlight center and highlight point

* Layout text correctly

* Use sample text

* Use animated transitioning delegate for presentation and dismissal animations

* Clean up presentation + dismissal animation code

* Move intructional text behind button

* Limit width of text in feature highlight

* Layout text relative to center when noncentered

* Fix rotation

* First pass at feature highlight color example

* Properly map the inner and outer colors to the view

* Use correct license header

* Automatically choose text color based on outer highlight color

* Clean up color usage

* wrap long lines

* Clean up title positioning

* Clean up radius calculation

* Constize values

* Add feature highlight nav bar example

* Move examples up a directory

* Remove nav bar example

* Improve outer highlight color docs and implementation

* Add TODO: Mask the labels during the presentation and dismissal animations.

* Clean up feature highlight view

* Clean up feature highlight examples

* Layout feature highlight labels with support for RTL

* Code review improvements

* Clean up feature highlight samples

* Feature Highlight readme

* Update Podfile.lock for Feature Highlight

* Feature highlight readme improvements
2016-10-28 10:44:31 -04:00