forked from material-components/material-components-ios
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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 material-components#9885 PiperOrigin-RevId: 307802500
- Loading branch information
1 parent
2040720
commit 0100cfe
Showing
121 changed files
with
6,755 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Do not merge this version into `stable`. # DO NOT CHANGE THIS FILE | ||
snapshot_test_goldens/**/*.png filter=lfs diff=lfs merge=lfs -text # DO NOT EDIT THE LINE BELOW. | ||
# Do not merge this version into `stable`. | ||
snapshot_test_goldens/**/*.png filter=lfs diff=lfs merge=lfs -text | ||
.gitattributes merge=gitattributes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Copyright 2017-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. | ||
|
||
licenses(["notice"]) # Apache 2.0 | ||
|
||
exports_files(["LICENSE"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
# Copyright 2019-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. | ||
|
||
load("//:material_components_ios.bzl", "mdc_objc_library", "mdc_swift_library") | ||
load("@build_bazel_rules_apple//apple:ios.bzl", "ios_application") | ||
|
||
licenses(["notice"]) # Apache 2.0 | ||
|
||
IOS_MINIMUM_OS = "9.0" | ||
|
||
ios_application( | ||
name = "MDCCatalog", | ||
app_icons = glob(["MDCCatalog/Assets.xcassets/AppIcon.appiconset/**"]), | ||
bundle_id = "com.google.mdc-catalog", | ||
families = [ | ||
"iphone", | ||
"ipad", | ||
], | ||
infoplists = ["MDCCatalog/Info.plist"], | ||
launch_storyboard = "MDCCatalog/Base.lproj/LaunchScreen.storyboard", | ||
minimum_os_version = IOS_MINIMUM_OS, | ||
deps = [ | ||
":MDCCatalogLib", | ||
":MDCCatalogObjcLib", | ||
], | ||
) | ||
|
||
ios_application( | ||
name = "MDCDragons", | ||
app_icons = glob(["MDCCatalog/Assets.xcassets/AppIconInverse.appiconset/**"]), | ||
bundle_id = "com.google.MDCDragons", | ||
families = [ | ||
"iphone", | ||
"ipad", | ||
], | ||
infoplists = ["MDCDragons/Info.plist"], | ||
launch_storyboard = "MDCCatalog/Base.lproj/LaunchScreen.storyboard", | ||
minimum_os_version = IOS_MINIMUM_OS, | ||
deps = [ | ||
":MDCDragonsLib", | ||
], | ||
) | ||
|
||
mdc_objc_library( | ||
name = "MDCCatalogObjcLib", | ||
srcs = native.glob(["MDCCatalog/*.h"]), | ||
visibility = ["//visibility:private"], | ||
) | ||
|
||
mdc_swift_library( | ||
name = "MDCCatalogLib", | ||
srcs = native.glob(["MDCCatalog/*.swift"]), | ||
copts = [ | ||
"-swift-version", | ||
"4.2", | ||
], | ||
resources = ["MDCDragons/HeaderView.xib"], | ||
deps = [ | ||
":MaterialCatalog", | ||
"//components/AppBar", | ||
"//components/AppBar:ColorThemer", | ||
"//components/AppBar:TypographyThemer", | ||
"//components/BottomSheet", | ||
"//components/Buttons", | ||
"//components/Buttons:ButtonThemer", | ||
"//components/Buttons:Theming", | ||
"//components/Collections", | ||
"//components/Dialogs", | ||
"//components/FlexibleHeader", | ||
"//components/FlexibleHeader:ColorThemer", | ||
"//components/Ink", | ||
"//components/LibraryInfo", | ||
"//components/OverlayWindow", | ||
"//components/Palettes", | ||
"//components/ShadowElevations", | ||
"//components/ShadowLayer", | ||
"//components/Themes", | ||
"//components/Typography", | ||
"//components/private/Icons", | ||
"//components/private/Icons/icons/ic_arrow_back", | ||
"//components/private/Icons/icons/ic_check", | ||
"//components/private/Icons/icons/ic_color_lens", | ||
"//components/private/Icons/icons/ic_help_outline", | ||
"//components/private/Icons/icons/ic_more_horiz", | ||
"//components/private/Icons/icons/ic_settings", | ||
"//components/schemes/Color", | ||
"//components/schemes/Container", | ||
"//components/schemes/Typography", | ||
"@catalog_by_convention//:CatalogByConvention", | ||
"@material_internationalization_ios//:MDFInternationalization", | ||
"@material_text_accessibility_ios//:MDFTextAccessibility", | ||
], | ||
) | ||
|
||
mdc_objc_library( | ||
name = "MaterialCatalog", | ||
srcs = native.glob(["MaterialCatalog/*.m"]), | ||
hdrs = native.glob(["MaterialCatalog/*.h"]), | ||
module_name = "MaterialCatalog", | ||
deps = [ | ||
"//components/Themes", | ||
], | ||
) | ||
|
||
mdc_swift_library( | ||
name = "MDCDragonsLib", | ||
srcs = native.glob(["MDCDragons/*.swift"]), | ||
copts = [ | ||
"-swift-version", | ||
"4.2", | ||
], | ||
data = glob(["MDCCatalog/Assets.xcassets/*.imageset/**"]), | ||
resources = ["MDCDragons/HeaderView.xib"], | ||
deps = [ | ||
"//components/AppBar", | ||
"//components/FlexibleHeader", | ||
"//components/LibraryInfo", | ||
"//components/ShadowElevations", | ||
"//components/ShadowLayer", | ||
"//components/Themes", | ||
"//components/Typography", | ||
"//components/private/Icons/icons/ic_arrow_back", | ||
"//components/private/Icons/icons/ic_chevron_right", | ||
"//components/private/KeyboardWatcher", | ||
"@catalog_by_convention//:CatalogByConvention", | ||
], | ||
) | ||
|
||
mdc_objc_library( | ||
name = "MDCActionExtension", | ||
srcs = native.glob(["MDCActionExtension/*.m"]), | ||
hdrs = native.glob(["MDCActionExtension/*.h"]), | ||
deps = ["@catalog_by_convention//:CatalogByConvention"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,167 @@ | ||
# Copyright 2018-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. | ||
|
||
load( | ||
"//:material_components_ios.bzl", | ||
"mdc_examples_objc_library", | ||
"mdc_examples_swift_library", | ||
"mdc_extension_objc_library", | ||
"mdc_objc_library", | ||
"mdc_public_objc_library", | ||
"mdc_snapshot_objc_library", | ||
"mdc_snapshot_test", | ||
"mdc_unit_test_objc_library", | ||
"mdc_unit_test_suite", | ||
"mdc_unit_test_swift_library", | ||
) | ||
|
||
licenses(["notice"]) # Apache 2.0 | ||
|
||
mdc_public_objc_library( | ||
name = "ActionSheet", | ||
sdk_frameworks = ["UIKit"], | ||
deps = [ | ||
"//components/BottomSheet", | ||
"//components/Elevation", | ||
"//components/Ink", | ||
"//components/Ripple", | ||
"//components/ShadowElevations", | ||
"//components/Typography", | ||
"//components/private/Math", | ||
], | ||
) | ||
|
||
mdc_extension_objc_library( | ||
name = "Theming", | ||
deps = [ | ||
":ActionSheet", | ||
"//components/Elevation", | ||
"//components/ShadowElevations", | ||
"//components/private/Color", | ||
"//components/schemes/Container", | ||
], | ||
) | ||
|
||
mdc_extension_objc_library( | ||
name = "ActionSheetThemer", | ||
deps = [ | ||
":ActionSheet", | ||
":ColorThemer", | ||
":TypographyThemer", | ||
], | ||
) | ||
|
||
mdc_extension_objc_library( | ||
name = "TypographyThemer", | ||
deps = [ | ||
":ActionSheet", | ||
"//components/schemes/Typography", | ||
], | ||
) | ||
|
||
mdc_extension_objc_library( | ||
name = "ColorThemer", | ||
deps = [ | ||
":ActionSheet", | ||
"//components/schemes/Color", | ||
], | ||
) | ||
|
||
mdc_objc_library( | ||
name = "privateHeaders", | ||
testonly = 1, | ||
hdrs = native.glob(["src/private/*.h"]), | ||
deps = [":ActionSheet"], | ||
) | ||
|
||
mdc_examples_objc_library( | ||
name = "ObjcExamples", | ||
deps = [ | ||
":ActionSheet", | ||
":Theming", | ||
"//components/Buttons", | ||
"//components/Buttons:Theming", | ||
"//components/schemes/Color", | ||
"//components/schemes/Container", | ||
"//components/schemes/Typography", | ||
], | ||
) | ||
|
||
mdc_examples_swift_library( | ||
name = "SwiftExamples", | ||
deps = [ | ||
":ActionSheet", | ||
":Theming", | ||
"//components/AppBar", | ||
"//components/schemes/Color", | ||
"//components/schemes/Container", | ||
"//components/schemes/Typography", | ||
], | ||
) | ||
|
||
mdc_unit_test_swift_library( | ||
name = "unit_test_swift_sources", | ||
extra_srcs = glob(["tests/unit/ColorThemer/*.swift"]), | ||
deps = [ | ||
":ActionSheet", | ||
":ColorThemer", | ||
":privateHeaders", | ||
], | ||
) | ||
|
||
mdc_unit_test_objc_library( | ||
name = "unit_test_sources", | ||
hdrs = glob(["tests/unit/*.h"]), | ||
extra_srcs = glob([ | ||
"tests/unit/ActionSheetThemer/*.m", | ||
"tests/unit/Theming/*.m", | ||
]), | ||
sdk_frameworks = [ | ||
"CoreImage", | ||
], | ||
deps = [ | ||
":ActionSheet", | ||
":ActionSheetThemer", | ||
":ColorThemer", | ||
":Theming", | ||
":TypographyThemer", | ||
":privateHeaders", | ||
], | ||
) | ||
|
||
mdc_unit_test_suite( | ||
name = "unit_tests", | ||
# TODO (https://github.com/material-components/material-components-ios/issues/8249): Re-enable autobot environment. | ||
use_autobot_environment_runner = False, | ||
deps = [ | ||
":unit_test_sources", | ||
":unit_test_swift_sources", | ||
], | ||
) | ||
|
||
mdc_snapshot_objc_library( | ||
name = "snapshot_test_lib", | ||
deps = [ | ||
":ActionSheet", | ||
":privateHeaders", | ||
], | ||
) | ||
|
||
mdc_snapshot_test( | ||
name = "snapshot_tests", | ||
deps = [ | ||
":snapshot_test_lib", | ||
], | ||
) |
Oops, something went wrong.