diff --git a/Airship/Airship.xcodeproj/project.pbxproj b/Airship/Airship.xcodeproj/project.pbxproj index 0929853ab..9f755ffca 100644 --- a/Airship/Airship.xcodeproj/project.pbxproj +++ b/Airship/Airship.xcodeproj/project.pbxproj @@ -1456,9 +1456,6 @@ 998572BF2B3CF95D0091E9C9 /* DefaultAssetDownloader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 998572BE2B3CF95D0091E9C9 /* DefaultAssetDownloader.swift */; }; 998572C12B3CF97B0091E9C9 /* DefaultAssetFileManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 998572C02B3CF97B0091E9C9 /* DefaultAssetFileManager.swift */; }; 999DC85E2B5B721D0048C6AF /* HTMLView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 999DC85D2B5B721D0048C6AF /* HTMLView.swift */; }; - 99AB3D5C2CD1B6E6008916BD /* WrappingLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99AB3D5B2CD1B6E6008916BD /* WrappingLayout.swift */; }; - 99AB3D5D2CD1B6EC008916BD /* WrappingLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99AB3D5B2CD1B6E6008916BD /* WrappingLayout.swift */; }; - 99AB3D5E2CD1B6ED008916BD /* WrappingLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99AB3D5B2CD1B6E6008916BD /* WrappingLayout.swift */; }; 99C3CC762BCF23DF00B5BED5 /* SMSValidator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99C3CC752BCF23DF00B5BED5 /* SMSValidator.swift */; }; 99C3CC792BCF3E5B00B5BED5 /* SMSValidatorAPIClientTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99C3CC772BCF3DF700B5BED5 /* SMSValidatorAPIClientTest.swift */; }; 99C3CC7A2BCF3FA200B5BED5 /* SMSValidator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99C3CC752BCF23DF00B5BED5 /* SMSValidator.swift */; }; @@ -2988,7 +2985,6 @@ 998572BE2B3CF95D0091E9C9 /* DefaultAssetDownloader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DefaultAssetDownloader.swift; sourceTree = ""; }; 998572C02B3CF97B0091E9C9 /* DefaultAssetFileManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DefaultAssetFileManager.swift; sourceTree = ""; }; 999DC85D2B5B721D0048C6AF /* HTMLView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HTMLView.swift; sourceTree = ""; }; - 99AB3D5B2CD1B6E6008916BD /* WrappingLayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WrappingLayout.swift; sourceTree = ""; }; 99C3CC752BCF23DF00B5BED5 /* SMSValidator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SMSValidator.swift; sourceTree = ""; }; 99C3CC772BCF3DF700B5BED5 /* SMSValidatorAPIClientTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SMSValidatorAPIClientTest.swift; sourceTree = ""; }; 99C3CC7C2BCF401B00B5BED5 /* SMSValidatorTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SMSValidatorTest.swift; sourceTree = ""; }; @@ -5000,7 +4996,6 @@ 6EF27DE22730E6F900548DA3 /* RadioInputController.swift */, 6EF27DE82730E85700548DA3 /* RadioInput.swift */, A6849386273290520021675E /* Score.swift */, - 99AB3D5B2CD1B6E6008916BD /* WrappingLayout.swift */, ); name = Forms; sourceTree = ""; @@ -6366,7 +6361,6 @@ 6E1CBD812BA3A30300519D9C /* AirshipEmbeddedInfo.swift in Sources */, 6E4325CE2B7AD5A200A9B000 /* AirshipComponent.swift in Sources */, 6EC7E48226A60C060038CFDD /* ChannelProtocol.swift in Sources */, - 99AB3D5C2CD1B6E6008916BD /* WrappingLayout.swift in Sources */, 6E2F5A8A2A66088100CABD3D /* AudienceDeviceInfoProvider.swift in Sources */, 6E664BDD26C4CD8700A2C8E5 /* OpenExternalURLAction.swift in Sources */, 6E75F50529C4EAF600E3585A /* AudienceOverridesProvider.swift in Sources */, @@ -7266,7 +7260,6 @@ A6722A64281A9EB80033F54D /* ChannelAPIClient.swift in Sources */, 6E299FE128D14258001305A7 /* AirshipRequestSession.swift in Sources */, A6722A66281A9EB80033F54D /* ChannelRegistrar.swift in Sources */, - 99AB3D5E2CD1B6ED008916BD /* WrappingLayout.swift in Sources */, 6E9B4876288F0CE000C905B1 /* RateAppAction.swift in Sources */, A6722A67281A9EB80033F54D /* ChannelProtocol.swift in Sources */, A6722A68281A9EB80033F54D /* ChannelBulkUpdateAPIClient.swift in Sources */, @@ -7667,7 +7660,6 @@ 6E1CBD822BA3A30300519D9C /* AirshipEmbeddedInfo.swift in Sources */, 6E4325CF2B7AD5A200A9B000 /* AirshipComponent.swift in Sources */, 6EF27DDC27306CA600548DA3 /* AirshipCheckboxToggleStyle.swift in Sources */, - 99AB3D5D2CD1B6EC008916BD /* WrappingLayout.swift in Sources */, 6E2F5A8B2A66088100CABD3D /* AudienceDeviceInfoProvider.swift in Sources */, 6E6ED1602683DBC300A2CBD0 /* AirshipCoreResources.swift in Sources */, 6E91E45028EF423400B6F25E /* AirshipWorkerType.swift in Sources */, diff --git a/Airship/AirshipCore/Source/Score.swift b/Airship/AirshipCore/Source/Score.swift index 00c30a9f1..2baa211ba 100644 --- a/Airship/AirshipCore/Source/Score.swift +++ b/Airship/AirshipCore/Source/Score.swift @@ -3,7 +3,9 @@ import Foundation import SwiftUI + struct Score: View { + let info: ThomasViewInfo.Score let constraints: ViewConstraints @@ -11,60 +13,28 @@ struct Score: View { @EnvironmentObject var formState: FormState @Environment(\.colorScheme) var colorScheme - @ViewBuilder - private func makeNumberRangeScoreItems(style: ThomasViewInfo.Score.ScoreStyle.NumberRange, constraints: ViewConstraints) -> some View { - ForEach((style.start...style.end), id: \.self) { index in - let isOn = Binding( - get: { self.score == index }, - set: { if $0 { updateScore(index) } } - ) - Toggle(isOn: isOn.animation()) {} - .toggleStyle( - AirshipNumberRangeToggleStyle( - style: style, - viewConstraints: constraints, - value: index, - colorScheme: colorScheme, - disabled: !formState.isFormInputEnabled - ) - ) - } - } - @ViewBuilder private func createScore(_ constraints: ViewConstraints) -> some View { switch self.info.properties.style { case .numberRange(let style): - if #available(iOS 16.0, macOS 13.0, tvOS 16.0, watchOS 9.0, *), style.wrapping != nil { - let minTappableSize = CGSize( - width: max(constraints.width ?? 0, 44), - height: max(constraints.height ?? 0, 44) - ) - let itemSpacing = CGFloat(style.spacing ?? 0) - let lineSpacing = CGFloat(style.wrapping?.lineSpacing ?? 0) - let maxItemsPerLine = style.wrapping?.maxItemsPerLine - WrappingLayout( - viewConstraints: constraints, - itemSpacing: itemSpacing, - lineSpacing: lineSpacing, - maxItemsPerLine: maxItemsPerLine - ) { - let constraints = ViewConstraints( - width: max(minTappableSize.width, constraints.width ?? 0), - height: max(minTappableSize.height, constraints.height ?? 0), - maxWidth: constraints.maxWidth, - maxHeight: constraints.maxHeight, - isHorizontalFixedSize: constraints.isHorizontalFixedSize, - isVerticalFixedSize: constraints.isVerticalFixedSize, - safeAreaInsets: constraints.safeAreaInsets + HStack(spacing: style.spacing ?? 0) { + ForEach((style.start...style.end), id: \.self) { index in + let isOn = Binding( + get: { self.score == index }, + set: { if $0 { updateScore(index) } } ) - makeNumberRangeScoreItems(style: style, constraints: constraints) - } - } else { - HStack(spacing: style.spacing ?? 0) { - makeNumberRangeScoreItems(style: style, constraints: constraints) + + Toggle(isOn: isOn.animation()) {} + .toggleStyle( + AirshipNumberRangeToggleStyle( + style: style, + viewConstraints: constraints, + value: index, + colorScheme: colorScheme, + disabled: !formState.isFormInputEnabled + ) + ) } - .constraints(constraints) } } } @@ -72,6 +42,7 @@ struct Score: View { var body: some View { let constraints = modifiedConstraints() createScore(constraints) + .constraints(constraints) .thomasCommon(self.info, formInputID: self.info.properties.identifier) .accessible(self.info.accessible) .formElement() @@ -98,11 +69,12 @@ struct Score: View { } func calculateHeight(style: ThomasViewInfo.Score.ScoreStyle.NumberRange, width: CGFloat?) - -> CGFloat? + -> CGFloat? { guard let width = width else { return nil } + let count = Double((style.start...style.end).count) let spacing = (count - 1.0) * (style.spacing ?? 0.0) let remainingSpace = width - spacing @@ -146,10 +118,12 @@ struct Score: View { self.score = value } + } private struct AirshipNumberRangeToggleStyle: ToggleStyle { + let style: ThomasViewInfo.Score.ScoreStyle.NumberRange let viewConstraints: ViewConstraints let value: Int @@ -174,12 +148,14 @@ private struct AirshipNumberRangeToggleStyle: ToggleStyle { .opacity(isOn ? 1 : 0) } Text(String(self.value)) - .textAppearance(style.bindings.selected.textAppearance) + .textAppearance(style.bindings.selected.textAppearance + ) } .opacity(isOn ? 1 : 0) .airshipApplyIf(disabled) { view in view.colorMultiply(ThomasConstants.disabledColor) } + Group { if let shapes = style.bindings.unselected.shapes { ForEach(0.. CGSize { - guard !subviews.isEmpty else { - AirshipLogger.debug("WrappingLayout - subviews are empty. Returning zero size.") - return .zero - } - - // Get the maximum width and height of the subviews - let itemSizes = subviews.map { $0.sizeThatFits(.unspecified) } - let itemWidth = itemSizes.map { $0.width }.max() ?? 0 - let itemHeight = itemSizes.map { $0.height }.max() ?? 0 - - let totalItems = subviews.count - -#if os(watchOS) - // Determine the maximum width from viewConstraints or proposal - let maxWidth = viewConstraints.width ?? proposal.width ?? WKInterfaceDevice.current().screenBounds.size.width -#else - // Determine the maximum width from viewConstraints or proposal - let maxWidth = viewConstraints.width ?? proposal.width ?? UIScreen.main.bounds.width -#endif - - // Calculate the number of items per line - let itemsInLine = calculateItemsInLine( - totalItems: totalItems, - maxItemsPerLine: maxItemsPerLine, - itemWidth: itemWidth, - itemSpacing: itemSpacing, - maxWidth: maxWidth - ) - - let linesNeeded = calculateLinesNeeded(totalItems: totalItems, itemsInLine: itemsInLine) - - // Calculate total height - let totalHeight = calculateTotalHeight(linesNeeded: linesNeeded, itemHeight: itemHeight, lineSpacing: lineSpacing) - - // Apply viewConstraints maxHeight if available - let finalHeight = min(totalHeight, viewConstraints.maxHeight ?? totalHeight) - let finalWidth = min(maxWidth, viewConstraints.maxWidth ?? maxWidth) - - return CGSize(width: finalWidth, height: finalHeight) - } - - func placeSubviews( - in bounds: CGRect, - proposal: ProposedViewSize, - subviews: Subviews, - cache: inout () - ) { - guard !subviews.isEmpty else { - AirshipLogger.debug("WrappingLayout - subviews are empty.") - return - } - - // Get the maximum width and height of the subviews - let itemSizes = subviews.map { $0.sizeThatFits(.unspecified) } - let itemWidth = itemSizes.map { $0.width }.max() ?? 0 - let itemHeight = itemSizes.map { $0.height }.max() ?? 0 - - let totalItems = subviews.count - - // Use bounds width and height directly - let availableWidth = bounds.width - let availableHeight = bounds.height - - // Calculate the number of items per line - let itemsInLine = calculateItemsInLine( - totalItems: totalItems, - maxItemsPerLine: maxItemsPerLine, - itemWidth: itemWidth, - itemSpacing: itemSpacing, - maxWidth: availableWidth - ) - - let linesNeeded = calculateLinesNeeded(totalItems: totalItems, itemsInLine: itemsInLine) - - // Calculate total content height - let totalContentHeight = calculateTotalHeight(linesNeeded: linesNeeded, itemHeight: itemHeight, lineSpacing: lineSpacing) - - // Adjust yPosition to center content vertically - var yPosition = bounds.minY + (availableHeight - totalContentHeight) / 2.0 - - var currentIndex = 0 - - for _ in 0..= subviews.count { break } - let subview = subviews[currentIndex] - let subviewProposal = ProposedViewSize(width: itemWidth, height: itemHeight) - subview.place( - at: CGPoint(x: xPosition, y: yPosition), - anchor: .topLeading, - proposal: subviewProposal - ) - xPosition += itemWidth + itemSpacing - currentIndex += 1 - } - yPosition += itemHeight + lineSpacing - } - } - - // MARK: - Utilities - private func calculateLinesNeeded( - totalItems: Int, - itemsInLine: Int - ) -> Int { - let safeItemsInLine = itemsInLine > 0 ? itemsInLine : 1 - return max(minLines, Int(ceil(Double(totalItems) / Double(safeItemsInLine)))) - } - - private func calculateTotalHeight( - linesNeeded: Int, - itemHeight: CGFloat, - lineSpacing: CGFloat - ) -> CGFloat { - return CGFloat(linesNeeded) * itemHeight + CGFloat(linesNeeded - 1) * lineSpacing - } - - private func calculateItemsInLine( - totalItems: Int, - maxItemsPerLine: Int, - itemWidth: CGFloat, - itemSpacing: CGFloat, - maxWidth: CGFloat - ) -> Int { - var itemsInLine = min(totalItems, maxItemsPerLine) - while (CGFloat(itemsInLine) * itemWidth + CGFloat(itemsInLine - 1) * itemSpacing) > maxWidth && itemsInLine > 1 { - itemsInLine -= 1 - } - return itemsInLine - } - -} diff --git a/Thomas/Thomas/Resources/Messages/Modal/accessibility-modal.json b/Thomas/Thomas/Resources/Messages/Modal/accessibility-modal.json deleted file mode 100644 index 60dee4421..000000000 --- a/Thomas/Thomas/Resources/Messages/Modal/accessibility-modal.json +++ /dev/null @@ -1,514 +0,0 @@ -{ - "in_app_message": { - "message": { - "name": "Ryan heading test", - "display_type": "layout", - "display": { - "layout": { - "version": 1, - "presentation": { - "type": "modal", - "placement_selectors": [ - { - "placement": { - "ignore_safe_area": true, - "device": { - "lock_orientation": "landscape" - }, - "size": { - "width": "70%", - "height": "50%" - }, - "position": { - "horizontal": "center", - "vertical": "center" - }, - "shade_color": { - "default": { - "type": "hex", - "hex": "#09BE25", - "alpha": 0.2 - }, - "selectors": [ - { - "platform": "ios", - "dark_mode": false, - "color": { - "type": "hex", - "hex": "#09BE25", - "alpha": 0.2 - } - }, - { - "platform": "ios", - "dark_mode": true, - "color": { - "type": "hex", - "hex": "#09BE25", - "alpha": 0.2 - } - }, - { - "platform": "android", - "dark_mode": false, - "color": { - "type": "hex", - "hex": "#09BE25", - "alpha": 0.2 - } - }, - { - "platform": "android", - "dark_mode": true, - "color": { - "type": "hex", - "hex": "#09BE25", - "alpha": 0.2 - } - }, - { - "platform": "web", - "dark_mode": false, - "color": { - "type": "hex", - "hex": "#09BE25", - "alpha": 0.2 - } - }, - { - "platform": "web", - "dark_mode": true, - "color": { - "type": "hex", - "hex": "#09BE25", - "alpha": 0.2 - } - } - ] - }, - "web": {}, - "border": { - "radius": 15 - } - }, - "window_size": "small", - "orientation": "landscape" - } - ], - "android": { - "disable_back_button": false - }, - "dismiss_on_touch_outside": false, - "default_placement": { - "ignore_safe_area": false, - "device": { - "lock_orientation": "portrait" - }, - "size": { - "width": "100%", - "height": "100%" - }, - "position": { - "horizontal": "center", - "vertical": "center" - }, - "shade_color": { - "default": { - "type": "hex", - "hex": "#000000", - "alpha": 0.2 - } - }, - "web": { - "ignore_shade": true - } - } - }, - "view": { - "type": "pager_controller", - "identifier": "a37a1196-ee19-4323-96f3-11b526f6dc80", - "view": { - "type": "linear_layout", - "direction": "vertical", - "items": [ - { - "size": { - "width": "100%", - "height": "100%" - }, - "view": { - "type": "container", - "items": [ - { - "position": { - "horizontal": "center", - "vertical": "center" - }, - "size": { - "width": "100%", - "height": "100%" - }, - "view": { - "type": "pager", - "disable_swipe": true, - "items": [ - { - "identifier": "47f4ec52-1f67-4e97-8394-f796a7f1e842", - "type": "pager_item", - "view": { - "type": "container", - "items": [ - { - "size": { - "width": "100%", - "height": "100%" - }, - "position": { - "horizontal": "center", - "vertical": "center" - }, - "ignore_safe_area": false, - "view": { - "type": "container", - "items": [ - { - "margin": { - "bottom": 0, - "top": 0, - "end": 0, - "start": 0 - }, - "position": { - "horizontal": "center", - "vertical": "center" - }, - "size": { - "width": "100%", - "height": "100%" - }, - "view": { - "type": "linear_layout", - "direction": "vertical", - "items": [ - { - "identifier": "scroll_container", - "size": { - "width": "100%", - "height": "100%" - }, - "view": { - "type": "scroll_layout", - "direction": "vertical", - "view": { - "type": "linear_layout", - "direction": "vertical", - "items": [ - { - "identifier": "acd7c4a2-9684-46a1-9247-7749472025e6", - "size": { - "width": "100%", - "height": "auto" - }, - "margin": { - "top": 48, - "bottom": 8, - "start": 16, - "end": 16 - }, - "view": { - "type": "label", - "text": "Cool beans", - "content_description": "Cool beans", - "text_appearance": { - "font_size": 24, - "color": { - "default": { - "type": "hex", - "hex": "#000000", - "alpha": 1 - }, - "selectors": [ - { - "platform": "ios", - "dark_mode": false, - "color": { - "type": "hex", - "hex": "#000000", - "alpha": 1 - } - }, - { - "platform": "ios", - "dark_mode": true, - "color": { - "type": "hex", - "hex": "#FFFFFF", - "alpha": 1 - } - }, - { - "platform": "android", - "dark_mode": false, - "color": { - "type": "hex", - "hex": "#000000", - "alpha": 1 - } - }, - { - "platform": "android", - "dark_mode": true, - "color": { - "type": "hex", - "hex": "#FFFFFF", - "alpha": 1 - } - }, - { - "platform": "web", - "dark_mode": false, - "color": { - "type": "hex", - "hex": "#000000", - "alpha": 1 - } - }, - { - "platform": "web", - "dark_mode": true, - "color": { - "type": "hex", - "hex": "#FFFFFF", - "alpha": 1 - } - } - ] - }, - "alignment": "start", - "styles": [ - "bold" - ], - "font_families": [ - "more fancy fonts MORE" - ] - }, - "accessibility_role": { - "type": "heading", - "level": 1 - } - } - }, - { - "size": { - "width": "100%", - "height": "100%" - }, - "view": { - "type": "linear_layout", - "direction": "horizontal", - "items": [] - } - } - ] - } - } - } - ] - } - } - ] - } - } - ], - "background_color": { - "default": { - "type": "hex", - "hex": "#BFBFB0", - "alpha": 1 - }, - "selectors": [ - { - "platform": "ios", - "dark_mode": false, - "color": { - "type": "hex", - "hex": "#BFBFB0", - "alpha": 1 - } - }, - { - "platform": "ios", - "dark_mode": true, - "color": { - "type": "hex", - "hex": "#BFBFB0", - "alpha": 1 - } - }, - { - "platform": "android", - "dark_mode": false, - "color": { - "type": "hex", - "hex": "#BFBFB0", - "alpha": 1 - } - }, - { - "platform": "android", - "dark_mode": true, - "color": { - "type": "hex", - "hex": "#BFBFB0", - "alpha": 1 - } - }, - { - "platform": "web", - "dark_mode": false, - "color": { - "type": "hex", - "hex": "#BFBFB0", - "alpha": 1 - } - }, - { - "platform": "web", - "dark_mode": true, - "color": { - "type": "hex", - "hex": "#BFBFB0", - "alpha": 1 - } - } - ] - } - } - } - ] - }, - "ignore_safe_area": false - }, - { - "position": { - "horizontal": "end", - "vertical": "top" - }, - "size": { - "width": 48, - "height": 48 - }, - "view": { - "type": "image_button", - "image": { - "scale": 0.4, - "type": "icon", - "icon": "close", - "color": { - "default": { - "type": "hex", - "hex": "#CD5C5C", - "alpha": 1 - }, - "selectors": [ - { - "platform": "ios", - "dark_mode": false, - "color": { - "type": "hex", - "hex": "#CD5C5C", - "alpha": 1 - } - }, - { - "platform": "ios", - "dark_mode": true, - "color": { - "type": "hex", - "hex": "#F08080", - "alpha": 1 - } - }, - { - "platform": "android", - "dark_mode": false, - "color": { - "type": "hex", - "hex": "#CD5C5C", - "alpha": 1 - } - }, - { - "platform": "android", - "dark_mode": true, - "color": { - "type": "hex", - "hex": "#F08080", - "alpha": 1 - } - }, - { - "platform": "web", - "dark_mode": false, - "color": { - "type": "hex", - "hex": "#CD5C5C", - "alpha": 1 - } - }, - { - "platform": "web", - "dark_mode": true, - "color": { - "type": "hex", - "hex": "#F08080", - "alpha": 1 - } - } - ] - } - }, - "identifier": "dismiss_button", - "button_click": [ - "dismiss" - ] - } - } - ] - } - } - ] - } - } - } - }, - "audience": { - "miss_behavior": "penalize", - "tags": { - "and": [ - { - "tag": "ryan" - } - ] - } - } - }, - "triggers": [ - { - "type": "active_session", - "goal": 1 - } - ], - "edit_grace_period": 14, - "scopes": [ - "app" - ], - "reporting_context": { - "content_types": [ - "scene" - ], - "experiment_id": "" - }, - "message_type": "transactional" - } -} \ No newline at end of file diff --git a/Thomas/Thomas/Resources/Scenes/Modal/accessibility-actions-modal-pager-fullsize.yml b/Thomas/Thomas/Resources/Scenes/Modal/accessibility-actions-modal-pager-fullsize.yml index 82db7a32a..46955c6c8 100644 --- a/Thomas/Thomas/Resources/Scenes/Modal/accessibility-actions-modal-pager-fullsize.yml +++ b/Thomas/Thomas/Resources/Scenes/Modal/accessibility-actions-modal-pager-fullsize.yml @@ -80,89 +80,16 @@ view: height: auto width: auto view: - type: nps_form_controller - identifier: page_1_nps_form - nps_identifier: score_identifier_1 - submit: submit_event - view: - type: linear_layout - direction: vertical - items: - - size: - width: auto - height: auto - margin: - start: 8 - end: 8 - view: - type: score - identifier: score_identifier_1 - required: true - style: - type: number_range - start: 0 - end: 10 - spacing: 0 - wrapping: - line_spacing: 0 - max_items_per_line: 11 - spacing: 2 - bindings: - selected: - shapes: - - type: ellipse - color: - default: - hex: "#FFFFFF" - alpha: 0 - text_appearance: - font_size: 14 - color: - default: - hex: "#000000" - alpha: 1 - unselected: - shapes: - - type: ellipse - color: - default: - hex: "#000000" - alpha: 1 - text_appearance: - font_size: 14 - color: - default: - hex: "#ffffff" - alpha: 1 - content_description: "Rate your experience from 0 to 10" - - size: - width: auto - height: auto - margin: - start: 16 - end: 16 - view: - type: label_button - identifier: submit_button - background_color: - default: - hex: "#ffffff" - alpha: 1 - button_click: ["form_submit", "cancel"] - enabled: ["form_validation"] - display_actions: - add_tags_action: 'pager-page-1-form-submit' - label: - type: label - text: width:auto height:auto - text_appearance: - font_size: 14 - alignment: center - color: - default: - hex: "#000000" - alpha: 1 - content_description: "Submit button" + type: label + text: This is the first page about stuff. + text_appearance: + alignment: center + color: + default: + hex: "#000000" + alpha: 1 + font_size: 14 + content_description: "First page content" - position: horizontal: end vertical: top @@ -188,6 +115,16 @@ view: display_actions: add_tags_action: 'pager-page-2x' accessibility_actions: + - type: default + reporting_metadata: + key: "page_2_next" + localized_content_description: + fallback: "Next Page" + ref: "ua_next" + actions: + - add_tags_action: "page_2_next_action" + behaviors: + - pager_next - type: default reporting_metadata: key: "page_2_previous" @@ -226,89 +163,37 @@ view: height: auto width: auto view: - type: nps_form_controller - identifier: page_2_nps_form - nps_identifier: score_identifier_2 - submit: submit_event - view: - type: linear_layout - direction: vertical - items: - - size: - width: 200 - height: auto - margin: - start: 8 - end: 8 - view: - type: score - identifier: score_identifier_2 - required: true - style: - type: number_range - start: 0 - end: 10 - spacing: 0 - wrapping: - line_spacing: 0 - max_items_per_line: 11 - spacing: 2 - bindings: - selected: - shapes: - - type: ellipse - color: - default: - hex: "#FFFFFF" - alpha: 0 - text_appearance: - font_size: 14 - color: - default: - hex: "#000000" - alpha: 1 - unselected: - shapes: - - type: ellipse - color: - default: - hex: "#000000" - alpha: 1 - text_appearance: - font_size: 14 - color: - default: - hex: "#ffffff" - alpha: 1 - content_description: "Rate your experience from 0 to 10" - - size: - width: auto - height: auto - margin: - start: 16 - end: 16 - view: - type: label_button - identifier: submit_button - background_color: - default: - hex: "#ffffff" - alpha: 1 - button_click: ["form_submit", "cancel"] - enabled: ["form_validation"] - display_actions: - add_tags_action: 'pager-page-2-form-submit' - label: - type: label - text: width:200 height:auto - text_appearance: - font_size: 14 - alignment: center - color: - default: - hex: "#000000" - alpha: 1 - content_description: "Submit button" + type: label + text: More stuff is here on the second page. + text_appearance: + alignment: center + color: + default: + hex: "#000000" + alpha: 1 + font_size: 14 + content_description: "Second page content" + - position: + horizontal: end + vertical: top + size: + height: 24 + width: 24 + margin: + top: 8 + end: 8 + view: + type: image_button + identifier: close_button_2 + button_click: [ dismiss ] + image: + type: icon + icon: close + color: + default: + hex: "#000000" + alpha: 1 + content_description: "Close button" - identifier: "pager-page-3-id" display_actions: add_tags_action: 'pager-page-3x' @@ -321,7 +206,7 @@ view: ref: "ua_previous" actions: - add_tags_action: "page_3_previous_action" - behaviors: + behaviors: - pager_previous - type: escape reporting_metadata: @@ -331,7 +216,7 @@ view: ref: "ua_escape" actions: - add_tags_action: "page_3_dismiss_action" - behaviors: + behaviors: - dismiss automated_actions: - identifier: "auto_announce_page_3" @@ -341,7 +226,7 @@ view: type: container background_color: default: - hex: "#00FFF0" + hex: "#0000FF" alpha: 0.5 items: - position: @@ -352,31 +237,27 @@ view: width: auto view: type: nps_form_controller - identifier: page_2_nps_form - nps_identifier: score_identifier_2 + identifier: page_3_nps_form + nps_identifier: score_identifier submit: submit_event view: type: linear_layout direction: vertical items: - size: - width: 50 + width: 100% height: auto margin: start: 8 end: 8 view: type: score - identifier: score_identifier_2 + identifier: score_identifier required: true style: type: number_range start: 0 end: 10 - spacing: 0 - wrapping: - line_spacing: 0 - max_items_per_line: 11 spacing: 2 bindings: selected: @@ -422,10 +303,10 @@ view: button_click: ["form_submit", "cancel"] enabled: ["form_validation"] display_actions: - add_tags_action: 'pager-page-2-form-submit' + add_tags_action: 'pager-page-3-form-submit' label: type: label - text: width:50 height:auto + text: SuBmIt!1!1@ text_appearance: font_size: 14 alignment: center @@ -445,7 +326,7 @@ view: end: 8 view: type: image_button - identifier: close_button_2 + identifier: close_button_3 button_click: [ dismiss ] image: type: icon diff --git a/Thomas/Thomas/Resources/Scenes/Modal/wrapping-modal-score.yml b/Thomas/Thomas/Resources/Scenes/Modal/wrapping-modal-score.yml deleted file mode 100644 index a283f6ac5..000000000 --- a/Thomas/Thomas/Resources/Scenes/Modal/wrapping-modal-score.yml +++ /dev/null @@ -1,372 +0,0 @@ ---- -version: 1 -presentation: - type: modal - default_placement: - size: - width: 100% - height: auto - shade_color: - default: - hex: "#000000" - alpha: 0.75 -view: - type: form_controller - identifier: parent_form - submit: submit_event - view: - type: scroll_layout - direction: vertical - view: - type: linear_layout - direction: vertical - background_color: - default: - hex: "#ffffff" - alpha: 1 - items: - - - size: - width: 100% - height: auto - margin: - top: 16 - bottom: 8 - start: 16 - end: 16 - view: - type: label - text: "size: 100% x auto\nmaxItemsPerLine: 11" - text_appearance: - font_size: 12 - alignment: start - color: - default: - hex: "#000000" - alpha: 1 - - # Score 1 (0 - 10) - - size: - width: 100% - height: auto - margin: - start: 16 - end: 16 - view: - type: nps_form_controller - identifier: nps_zero_to_ten_form - nps_identifier: nps_zero_to_ten - view: - type: score - identifier: "nps_zero_to_ten" - required: true - style: - type: number_range - spacing: 24 - start: 0 - end: 10 - wrapping: - max_items_per_line: 11 - line_spacing: 24 - bindings: - selected: - shapes: - - type: ellipse - color: - default: - hex: "#000000" - alpha: 1 - text_appearance: - font_size: 14 - styles: - - bold - color: - default: - hex: "#ffffff" - alpha: 1 - unselected: - shapes: - - type: ellipse - border: - stroke_width: 1 - stroke_color: - default: - hex: "#999999" - alpha: 1 - color: - default: - hex: "#dedede" - alpha: 1 - text_appearance: - font_size: 14 - color: - default: - hex: "#666666" - alpha: 1 - - - size: - width: 100% - height: auto - margin: - top: 8 - bottom: 8 - start: 16 - end: 16 - view: - type: label - text: "size: auto x auto\nmaxItemsPerLine: 6" - text_appearance: - font_size: 12 - alignment: start - color: - default: - hex: "#000000" - alpha: 1 - - # Score 2 (0 - 10) - - size: - width: auto - height: auto - margin: - start: 16 - end: 16 - view: - type: nps_form_controller - identifier: nps_zero_to_ten_form - nps_identifier: nps_zero_to_ten - view: - type: score - identifier: "nps_zero_to_ten" - required: true - style: - type: number_range - spacing: 0 - start: 0 - end: 10 - wrapping: - max_items_per_line: 6 - line_spacing: 0 - bindings: - selected: - shapes: - - type: ellipse - color: - default: - hex: "#000000" - alpha: 1 - text_appearance: - font_size: 14 - styles: - - bold - color: - default: - hex: "#ffffff" - alpha: 1 - unselected: - shapes: - - type: ellipse - border: - stroke_width: 1 - stroke_color: - default: - hex: "#999999" - alpha: 1 - color: - default: - hex: "#dedede" - alpha: 1 - text_appearance: - font_size: 14 - color: - default: - hex: "#666666" - alpha: 1 - - - size: - width: 100% - height: auto - margin: - top: 8 - bottom: 8 - start: 16 - end: 16 - view: - type: label - text: "size: 100% x auto\nmaxItemsPerLine: 11" - text_appearance: - font_size: 12 - alignment: start - color: - default: - hex: "#000000" - alpha: 1 - - # Score 3 (0 - 10) - - size: - width: 100% - height: auto - margin: - top: 8 - bottom: 8 - start: 16 - end: 16 - view: - type: nps_form_controller - identifier: nps_zero_to_ten_form - nps_identifier: nps_zero_to_ten - view: - type: score - identifier: "nps_zero_to_ten" - required: true - style: - type: number_range - spacing: 0 - start: 0 - end: 10 - wrapping: - max_items_per_line: 11 - line_spacing: 0 - bindings: - selected: - shapes: - - type: ellipse - color: - default: - hex: "#000000" - alpha: 1 - text_appearance: - font_size: 14 - styles: - - bold - color: - default: - hex: "#ffffff" - alpha: 1 - unselected: - shapes: - - type: rectangle - border: - stroke_width: 1 - stroke_color: - default: - hex: "#999999" - alpha: 1 - color: - default: - hex: "#dedede" - alpha: 1 - text_appearance: - font_size: 14 - color: - default: - hex: "#666666" - alpha: 1 - - - size: - width: 100% - height: auto - margin: - top: 8 - bottom: 8 - start: 16 - end: 16 - view: - type: label - text: "size: 100% x auto\nmaxItemsPerLine: 6" - text_appearance: - font_size: 12 - alignment: start - color: - default: - hex: "#000000" - alpha: 1 - - # Score 4 (0 - 10) - - size: - width: 100% - height: auto - margin: - top: 8 - bottom: 8 - start: 16 - end: 16 - view: - type: nps_form_controller - identifier: nps_zero_to_ten_form - nps_identifier: nps_zero_to_ten - view: - type: score - identifier: "nps_zero_to_ten" - required: true - style: - type: number_range - spacing: 0 - start: 0 - end: 10 - wrapping: - max_items_per_line: 6 - line_spacing: 0 - bindings: - selected: - shapes: - - type: rectangle - color: - default: - hex: "#000000" - alpha: 1 - text_appearance: - font_size: 14 - styles: - - bold - color: - default: - hex: "#ffffff" - alpha: 1 - unselected: - shapes: - - type: rectangle - border: - stroke_width: 1 - stroke_color: - default: - hex: "#999999" - alpha: 1 - color: - default: - hex: "#dedede" - alpha: 1 - text_appearance: - font_size: 14 - color: - default: - hex: "#666666" - alpha: 1 - - # BOTTOM-PINNED BUTTON - - size: - width: 100% - height: auto - margin: - top: 16 - bottom: 16 - start: 16 - end: 16 - view: - type: label_button - identifier: SUBMIT_BUTTON - background_color: - default: - hex: "#000000" - alpha: 1 - button_click: ["form_submit", "cancel"] - enabled: ["form_validation"] - label: - type: label - text: 'SEND IT!' - text_appearance: - font_size: 14 - alignment: center - color: - default: - hex: "#ffffff" - alpha: 1 diff --git a/Thomas/Thomas/Resources/Scenes/Modal/wrapping-multi-page.yml b/Thomas/Thomas/Resources/Scenes/Modal/wrapping-multi-page.yml deleted file mode 100644 index 49a4225dc..000000000 --- a/Thomas/Thomas/Resources/Scenes/Modal/wrapping-multi-page.yml +++ /dev/null @@ -1,517 +0,0 @@ ---- -version: 1 -presentation: - type: modal - default_placement: - size: - width: 90% - height: 80% - shade_color: - default: - hex: '#000000' - alpha: 0.6 -view: - type: pager_controller - identifier: "pager-controller-id" - view: - type: container - border: - radius: 30 - stroke_width: 2 - stroke_color: - default: - hex: "#333333" - alpha: 0.8 - background_color: - default: - hex: "#ffffff" - alpha: 1 - items: - - position: - vertical: center - horizontal: center - size: - height: 100% - width: 100% - border: - radius: 25 - view: - type: pager - items: - - identifier: "pager-page-1-id" - accessibility_actions: - - type: default - reporting_metadata: - key: "page_1_next" - localized_content_description: - fallback: "Next Page" - ref: "ua_next" - actions: - - add_tags_action: "page_1_next_action" - behaviors: - - pager_next - - type: escape - reporting_metadata: - key: "page_1_escape" - localized_content_description: - fallback: "Dismiss" - ref: "ua_escape" - actions: - - add_tags_action: "page_1_dismiss_action" - behaviors: - - dismiss - automated_actions: - - identifier: "auto_announce_page_1" - delay: 0.5 - behaviors: ["pager_pause"] - view: - type: container - background_color: - default: - hex: "#FF0000" - alpha: 0.5 - items: - - position: - vertical: center - horizontal: center - size: - height: auto - width: auto - view: - type: nps_form_controller - identifier: page_1_nps_form - nps_identifier: score_identifier_1 - submit: submit_event - view: - type: linear_layout - direction: vertical - items: - - size: - width: auto - height: auto - margin: - start: 8 - end: 8 - view: - type: score - identifier: score_identifier_1 - required: true - style: - type: number_range - start: 989 - end: 1000 - spacing: 42 - wrapping: - line_spacing: 10 - max_items_per_line: 11 - bindings: - selected: - shapes: - - type: ellipse - color: - default: - hex: "#FFFFFF" - alpha: 0 - text_appearance: - font_size: 42 - color: - default: - hex: "#0F0FF0" - alpha: 1 - unselected: - shapes: - - type: ellipse - color: - default: - hex: "#000000" - alpha: 1 - text_appearance: - font_size: 42 - color: - default: - hex: "#ffffff" - alpha: 1 - content_description: "Rate your experience from 0 to 10" - - size: - width: auto - height: auto - margin: - start: 16 - end: 16 - view: - type: label_button - identifier: submit_button - background_color: - default: - hex: "#ffffff" - alpha: 1 - button_click: ["form_submit", "cancel"] - enabled: ["form_validation"] - display_actions: - add_tags_action: 'pager-page-1-form-submit' - label: - type: label - text: width:auto height:auto - text_appearance: - font_size: 14 - alignment: center - color: - default: - hex: "#000000" - alpha: 1 - content_description: "Submit button" - - position: - horizontal: end - vertical: top - size: - height: 24 - width: 24 - margin: - top: 8 - end: 8 - view: - type: image_button - identifier: close_button_1 - button_click: [ dismiss ] - image: - type: icon - icon: close - color: - default: - hex: "#000000" - alpha: 1 - content_description: "Close button" - - identifier: "pager-page-2-id" - display_actions: - add_tags_action: 'pager-page-2x' - accessibility_actions: - - type: default - reporting_metadata: - key: "page_2_previous" - localized_content_description: - fallback: "Previous Page" - ref: "ua_previous" - actions: - - add_tags_action: "page_2_previous_action" - behaviors: - - pager_previous - - type: escape - reporting_metadata: - key: "page_2_escape" - localized_content_description: - fallback: "Dismiss" - ref: "ua_escape" - actions: - - add_tags_action: "page_2_dismiss_action" - behaviors: - - dismiss - automated_actions: - - identifier: "auto_announce_page_2" - delay: 0.5 - behaviors: ["pager_pause"] - view: - type: container - background_color: - default: - hex: "#00FF00" - alpha: 0.5 - items: - - position: - vertical: center - horizontal: center - size: - height: auto - width: auto - view: - type: nps_form_controller - identifier: page_2_nps_form - nps_identifier: score_identifier_2 - submit: submit_event - view: - type: linear_layout - direction: vertical - items: - - size: - width: 200 - height: auto - margin: - start: 8 - end: 8 - view: - type: score - identifier: score_identifier_2 - required: true - style: - type: number_range - start: 0 - end: 10 - spacing: 0 - wrapping: - line_spacing: 0 - max_items_per_line: 11 - spacing: 8 - bindings: - selected: - shapes: - - type: ellipse - color: - default: - hex: "#FFFFFF" - alpha: 0 - text_appearance: - font_size: 14 - color: - default: - hex: "#000000" - alpha: 1 - unselected: - shapes: - - type: ellipse - color: - default: - hex: "#000000" - alpha: 1 - text_appearance: - font_size: 14 - color: - default: - hex: "#ffffff" - alpha: 1 - content_description: "Rate your experience from 0 to 10" - - size: - width: auto - height: auto - margin: - start: 16 - end: 16 - view: - type: label_button - identifier: submit_button - background_color: - default: - hex: "#ffffff" - alpha: 1 - button_click: ["form_submit", "cancel"] - enabled: ["form_validation"] - display_actions: - add_tags_action: 'pager-page-2-form-submit' - label: - type: label - text: width:200 height:auto - text_appearance: - font_size: 14 - alignment: center - color: - default: - hex: "#000000" - alpha: 1 - content_description: "Submit button" - - identifier: "pager-page-3-id" - display_actions: - add_tags_action: 'pager-page-3x' - accessibility_actions: - - type: default - reporting_metadata: - key: "page_3_previous" - localized_content_description: - fallback: "Previous Page" - ref: "ua_previous" - actions: - - add_tags_action: "page_3_previous_action" - behaviors: - - pager_previous - - type: escape - reporting_metadata: - key: "page_3_escape" - localized_content_description: - fallback: "Dismiss" - ref: "ua_escape" - actions: - - add_tags_action: "page_3_dismiss_action" - behaviors: - - dismiss - automated_actions: - - identifier: "auto_announce_page_3" - delay: 0.5 - behaviors: ["pager_pause"] - view: - type: container - background_color: - default: - hex: "#00FFF0" - alpha: 0.5 - items: - - position: - vertical: center - horizontal: center - size: - height: auto - width: auto - view: - type: nps_form_controller - identifier: page_2_nps_form - nps_identifier: score_identifier_2 - submit: submit_event - view: - type: linear_layout - direction: vertical - items: - - size: - width: 50 - height: auto - margin: - start: 8 - end: 8 - view: - type: score - identifier: score_identifier_2 - required: true - style: - type: number_range - start: 0 - end: 10 - spacing: 0 - wrapping: - line_spacing: 0 - max_items_per_line: 11 - spacing: 2 - bindings: - selected: - shapes: - - type: ellipse - color: - default: - hex: "#FFFFFF" - alpha: 0 - text_appearance: - font_size: 14 - color: - default: - hex: "#000000" - alpha: 1 - unselected: - shapes: - - type: ellipse - color: - default: - hex: "#000000" - alpha: 1 - text_appearance: - font_size: 14 - color: - default: - hex: "#ffffff" - alpha: 1 - content_description: "Rate your experience from 0 to 10" - - size: - width: auto - height: auto - margin: - start: 16 - end: 16 - view: - type: label_button - identifier: submit_button - background_color: - default: - hex: "#ffffff" - alpha: 1 - button_click: ["form_submit", "cancel"] - enabled: ["form_validation"] - display_actions: - add_tags_action: 'pager-page-2-form-submit' - label: - type: label - text: width:50 height:auto - text_appearance: - font_size: 14 - alignment: center - color: - default: - hex: "#000000" - alpha: 1 - content_description: "Submit button" - - position: - horizontal: end - vertical: top - size: - height: 24 - width: 24 - margin: - top: 8 - end: 8 - view: - type: image_button - identifier: close_button_2 - button_click: [ dismiss ] - image: - type: icon - icon: close - color: - default: - hex: "#000000" - alpha: 1 - content_description: "Close button" - gestures: - - type: swipe - identifier: "swipe_next" - direction: up - behavior: - behaviors: ["pager_next"] - - type: tap - identifier: "tap_next" - location: end - behavior: - behaviors: ["pager_next"] - - size: - height: 16 - width: auto - position: - vertical: bottom - horizontal: center - margin: - bottom: 8 - view: - type: pager_indicator - spacing: 4 - bindings: - selected: - shapes: - - type: rectangle - aspect_ratio: 2.25 - scale: 0.9 - border: - radius: 3 - stroke_width: 1 - stroke_color: - default: - hex: "#ffffff" - alpha: 0.7 - color: - default: - hex: "#ffffff" - alpha: 1 - unselected: - shapes: - - type: rectangle - aspect_ratio: 2.25 - scale: .9 - border: - radius: 3 - stroke_width: 1 - stroke_color: - default: - hex: "#ffffff" - alpha: 0.7 - color: - default: - hex: "#000000" - alpha: 0 - automated_accessibility_actions: - - type: announce - background_color: - default: - hex: "#333333" - alpha: 0.7 - border: - radius: 8 diff --git a/Thomas/Thomas/Resources/Scenes/Modal/wrapping-nps-test-2.yml b/Thomas/Thomas/Resources/Scenes/Modal/wrapping-nps-test-2.yml deleted file mode 100644 index 960f03357..000000000 --- a/Thomas/Thomas/Resources/Scenes/Modal/wrapping-nps-test-2.yml +++ /dev/null @@ -1,210 +0,0 @@ ---- -version: 1 -presentation: - type: modal - dismiss_on_touch_outside: true - default_placement: - size: - width: 90% - height: auto - shade_color: - default: - hex: "#000000" - alpha: 0.75 -view: - type: form_controller - identifier: parent_form - submit: submit_event - view: - type: linear_layout - direction: vertical - background_color: - default: - hex: "#ffffff" - alpha: 1 - items: - # Score 1 (0 - 10) - - size: - width: auto - height: 40 - margin: - top: 8 - bottom: 8 - start: 16 - end: 16 - view: - type: nps_form_controller - identifier: nps_zero_to_ten_form - nps_identifier: nps_zero_to_ten - view: - type: score - identifier: "nps_zero_to_ten" - required: true - style: - type: number_range - spacing: 2 - start: 0 - end: 10 - bindings: - selected: - shapes: - - type: rectangle - color: - default: - hex: "#000000" - alpha: 1 - text_appearance: - font_size: 24 - styles: - - bold - color: - default: - hex: "#ffffff" - alpha: 1 - unselected: - shapes: - - type: rectangle - border: - stroke_width: 1 - stroke_color: - default: - hex: "#999999" - alpha: 1 - color: - default: - hex: "#dedede" - alpha: 1 - text_appearance: - font_size: 24 - color: - default: - hex: "#666666" - alpha: 1 - # Score 2 (1 - 5) - - size: - width: auto - height: 24 - margin: - top: 8 - bottom: 8 - start: 16 - end: 16 - view: - type: nps_form_controller - identifier: nps_zero_to_ten_form - nps_identifier: nps_zero_to_ten - view: - type: score - identifier: "nps_zero_to_ten" - required: true - style: - type: number_range - spacing: 8 - start: 1 - end: 5 - bindings: - selected: - shapes: - - type: ellipse - color: - default: - hex: "#FFDD33" - alpha: 1 - text_appearance: - font_size: 24 - color: - default: - hex: "#000000" - alpha: 1 - unselected: - shapes: - - type: ellipse - color: - default: - hex: "#3333ff" - alpha: 1 - text_appearance: - font_size: 24 - color: - default: - hex: "#ffffff" - alpha: 1 - - # Score 3 (97 - 105) - - size: - width: auto - height: 32 - margin: - top: 8 - bottom: 8 - start: 16 - end: 16 - view: - type: nps_form_controller - identifier: nps_zero_to_ten_form - nps_identifier: nps_zero_to_ten - view: - type: score - identifier: "nps_zero_to_ten" - required: true - style: - type: number_range - spacing: 8 - start: 97 - end: 105 - bindings: - selected: - shapes: - - type: ellipse - color: - default: - hex: "#FF0000" - alpha: 1 - text_appearance: - font_size: 24 - color: - default: - hex: "#000000" - alpha: 1 - unselected: - shapes: - - type: ellipse - color: - default: - hex: "#0000FF" - alpha: 1 - text_appearance: - font_size: 24 - color: - default: - hex: "#ffffff" - alpha: 1 - - # BOTTOM-PINNED BUTTON - - size: - width: 100% - height: auto - margin: - top: 16 - bottom: 16 - start: 16 - end: 16 - view: - type: label_button - identifier: SUBMIT_BUTTON - background_color: - default: - hex: "#000000" - alpha: 1 - button_click: ["form_submit", "cancel"] - enabled: ["form_validation"] - label: - type: label - text: 'SEND IT!' - text_appearance: - font_size: 14 - alignment: center - color: - default: - hex: "#ffffff" - alpha: 1 diff --git a/Thomas/Thomas/Resources/Scenes/Modal/wrapping-nps-test-3.yml b/Thomas/Thomas/Resources/Scenes/Modal/wrapping-nps-test-3.yml deleted file mode 100644 index 69c1eceb1..000000000 --- a/Thomas/Thomas/Resources/Scenes/Modal/wrapping-nps-test-3.yml +++ /dev/null @@ -1,372 +0,0 @@ ---- -version: 1 -presentation: - type: modal - default_placement: - size: - width: 100% - height: auto - shade_color: - default: - hex: "#000000" - alpha: 0.75 -view: - type: form_controller - identifier: parent_form - submit: submit_event - view: - type: scroll_layout - direction: vertical - view: - type: linear_layout - direction: vertical - background_color: - default: - hex: "#ffffff" - alpha: 1 - items: - - - size: - width: 100% - height: auto - margin: - top: 16 - bottom: 8 - start: 16 - end: 16 - view: - type: label - text: "size: 100% x auto\nmaxItemsPerLine: 11" - text_appearance: - font_size: 12 - alignment: start - color: - default: - hex: "#000000" - alpha: 1 - - # Score 1 (0 - 10) - - size: - width: 100% - height: auto - margin: - start: 16 - end: 16 - view: - type: nps_form_controller - identifier: nps_zero_to_ten_form - nps_identifier: nps_zero_to_ten - view: - type: score - identifier: "nps_zero_to_ten" - required: true - style: - type: number_range - spacing: 24 - start: 0 - end: 10 - wrapping: - max_items_per_line: 11 - item_padding: 24 - bindings: - selected: - shapes: - - type: ellipse - color: - default: - hex: "#000000" - alpha: 1 - text_appearance: - font_size: 14 - styles: - - bold - color: - default: - hex: "#ffffff" - alpha: 1 - unselected: - shapes: - - type: ellipse - border: - stroke_width: 1 - stroke_color: - default: - hex: "#999999" - alpha: 1 - color: - default: - hex: "#dedede" - alpha: 1 - text_appearance: - font_size: 14 - color: - default: - hex: "#666666" - alpha: 1 - - - size: - width: 100% - height: auto - margin: - top: 8 - bottom: 8 - start: 16 - end: 16 - view: - type: label - text: "size: auto x auto\nmaxItemsPerLine: 6" - text_appearance: - font_size: 12 - alignment: start - color: - default: - hex: "#000000" - alpha: 1 - - # Score 2 (0 - 10) - - size: - width: auto - height: auto - margin: - start: 16 - end: 16 - view: - type: nps_form_controller - identifier: nps_zero_to_ten_form - nps_identifier: nps_zero_to_ten - view: - type: score - identifier: "nps_zero_to_ten" - required: true - style: - type: number_range - spacing: 0 - start: 0 - end: 10 - wrapping: - max_items_per_line: 6 - item_padding: 0 - bindings: - selected: - shapes: - - type: ellipse - color: - default: - hex: "#000000" - alpha: 1 - text_appearance: - font_size: 14 - styles: - - bold - color: - default: - hex: "#ffffff" - alpha: 1 - unselected: - shapes: - - type: ellipse - border: - stroke_width: 1 - stroke_color: - default: - hex: "#999999" - alpha: 1 - color: - default: - hex: "#dedede" - alpha: 1 - text_appearance: - font_size: 14 - color: - default: - hex: "#666666" - alpha: 1 - - - size: - width: 100% - height: auto - margin: - top: 8 - bottom: 8 - start: 16 - end: 16 - view: - type: label - text: "size: 100% x auto\nmaxItemsPerLine: 11" - text_appearance: - font_size: 12 - alignment: start - color: - default: - hex: "#000000" - alpha: 1 - - # Score 3 (0 - 10) - - size: - width: 100% - height: auto - margin: - top: 8 - bottom: 8 - start: 16 - end: 16 - view: - type: nps_form_controller - identifier: nps_zero_to_ten_form - nps_identifier: nps_zero_to_ten - view: - type: score - identifier: "nps_zero_to_ten" - required: true - style: - type: number_range - spacing: 0 - start: 0 - end: 10 - wrapping: - max_items_per_line: 11 - item_padding: 0 - bindings: - selected: - shapes: - - type: ellipse - color: - default: - hex: "#000000" - alpha: 1 - text_appearance: - font_size: 14 - styles: - - bold - color: - default: - hex: "#ffffff" - alpha: 1 - unselected: - shapes: - - type: rectangle - border: - stroke_width: 1 - stroke_color: - default: - hex: "#999999" - alpha: 1 - color: - default: - hex: "#dedede" - alpha: 1 - text_appearance: - font_size: 14 - color: - default: - hex: "#666666" - alpha: 1 - - - size: - width: 100% - height: auto - margin: - top: 8 - bottom: 8 - start: 16 - end: 16 - view: - type: label - text: "size: 100% x auto\nmaxItemsPerLine: 6" - text_appearance: - font_size: 12 - alignment: start - color: - default: - hex: "#000000" - alpha: 1 - - # Score 4 (0 - 10) - - size: - width: 100% - height: auto - margin: - top: 8 - bottom: 8 - start: 16 - end: 16 - view: - type: nps_form_controller - identifier: nps_zero_to_ten_form - nps_identifier: nps_zero_to_ten - view: - type: score - identifier: "nps_zero_to_ten" - required: true - style: - type: number_range - spacing: 0 - start: 0 - end: 10 - wrapping: - max_items_per_line: 6 - item_padding: 0 - bindings: - selected: - shapes: - - type: rectangle - color: - default: - hex: "#000000" - alpha: 1 - text_appearance: - font_size: 14 - styles: - - bold - color: - default: - hex: "#ffffff" - alpha: 1 - unselected: - shapes: - - type: rectangle - border: - stroke_width: 1 - stroke_color: - default: - hex: "#999999" - alpha: 1 - color: - default: - hex: "#dedede" - alpha: 1 - text_appearance: - font_size: 14 - color: - default: - hex: "#666666" - alpha: 1 - - # BOTTOM-PINNED BUTTON - - size: - width: 100% - height: auto - margin: - top: 16 - bottom: 16 - start: 16 - end: 16 - view: - type: label_button - identifier: SUBMIT_BUTTON - background_color: - default: - hex: "#000000" - alpha: 1 - button_click: ["form_submit", "cancel"] - enabled: ["form_validation"] - label: - type: label - text: 'SEND IT!' - text_appearance: - font_size: 14 - alignment: center - color: - default: - hex: "#ffffff" - alpha: 1 diff --git a/Thomas/Thomas/Resources/Scenes/Modal/wrapping-nps-test-4.yml b/Thomas/Thomas/Resources/Scenes/Modal/wrapping-nps-test-4.yml deleted file mode 100644 index 87246ef4e..000000000 --- a/Thomas/Thomas/Resources/Scenes/Modal/wrapping-nps-test-4.yml +++ /dev/null @@ -1,427 +0,0 @@ -# MOBILE-3069 ---- -version: 1 -presentation: - type: modal - android: - disable_back_button: false - dismiss_on_touch_outside: false - default_placement: - ignore_safe_area: false - device: - lock_orientation: portrait - size: - max_width: 100% - max_height: 100% - width: 100% - min_width: 100% - height: 100% - min_height: 100% - position: - horizontal: center - vertical: center - shade_color: - default: - type: hex - hex: "#000000" - alpha: 0.2 -view: - type: pager_controller - identifier: ea47eaac-4865-428a-bdfc-b512b899cc51 - view: - identifier: 6d4062aa-16ff-4234-aa70-014dc0e1de88 - nps_identifier: 58c4f1c2-99f5-4a9a-998c-e5561abf056a - type: nps_form_controller - submit: submit_event - response_type: nps - view: - type: container - items: - - position: - horizontal: center - vertical: center - size: - width: 100% - height: 100% - view: - type: pager - disable_swipe: true - items: - - identifier: '068715c7-6b86-4530-a930-8546607e3776' - type: pager_item - view: - type: linear_layout - direction: vertical - items: - - identifier: scroll_container - size: - width: 100% - height: 100% - view: - type: scroll_layout - direction: vertical - view: - type: linear_layout - direction: vertical - items: - - size: - width: 100% - height: auto - margin: - top: 48 - bottom: 8 - start: 16 - end: 16 - view: - type: linear_layout - direction: vertical - items: - - size: - width: 100% - height: auto - view: - type: linear_layout - direction: vertical - items: - - margin: - top: 20 - bottom: 8 - size: - width: 100% - height: auto - view: - type: label - text: How likely is it that you would recommend [your - company, product, etc.] to a friend or colleague? - text_appearance: - font_size: 20 - color: - default: - type: hex - hex: "#111111" - alpha: 1 - alignment: center - styles: - - underlined - - bold - - italic - font_families: - - sans-serif - - size: - width: 100% - height: auto - margin: - top: 0 - bottom: 0 - view: - type: linear_layout - direction: vertical - items: - - size: - width: 100% - height: auto - view: - type: linear_layout - direction: horizontal - items: - - size: - width: 50% - height: auto - margin: - bottom: 4 - view: - type: label - text: Not Likely - text_appearance: - font_size: 16 - color: - default: - type: hex - hex: "#111111" - alpha: 1 - alignment: start - styles: - - underlined - - bold - - italic - font_families: - - sans-serif - - size: - width: 50% - height: auto - margin: - bottom: 4 - view: - type: label - text: Very Likely - text_appearance: - font_size: 16 - color: - default: - type: hex - hex: "#111111" - alpha: 1 - alignment: end - styles: - - underlined - - bold - - italic - font_families: - - sans-serif - - size: - width: 100% - height: auto - view: - type: linear_layout - direction: horizontal - items: - - size: - height: 50 - width: 100% - view: - type: score - style: - type: number_range - start: 0 - end: 10 - spacing: 2 - bindings: - selected: - shapes: - - type: rectangle - scale: 1 - border: - radius: 2 - stroke_width: 1 - stroke_color: - default: - type: hex - hex: "#000000" - alpha: 1 - color: - default: - type: hex - hex: "#DDDDDD" - alpha: 1 - text_appearance: - alignment: center - font_size: 12 - color: - default: - type: hex - hex: "#000000" - alpha: 1 - unselected: - shapes: - - type: rectangle - scale: 1 - border: - radius: 2 - stroke_width: 1 - stroke_color: - default: - type: hex - hex: "#000000" - alpha: 1 - color: - default: - type: hex - hex: "#FFFFFF" - alpha: 1 - text_appearance: - font_size: 12 - color: - default: - type: hex - hex: "#000000" - alpha: 1 - identifier: 58c4f1c2-99f5-4a9a-998c-e5561abf056a - required: true - - size: - height: 100% - width: 100% - view: - type: media - media_fit: center_inside - url: https://dl-staging.urbanairship.com/binary/public/Vl0wyG8kSyCyOUW98Wj4xg/9e13236f-de64-49ef-b77b-3140fa7a1f03 - media_type: image - margin: - top: 0 - bottom: 8 - start: 0 - end: 0 - - margin: - top: 8 - bottom: 0 - start: 16 - end: 16 - size: - height: auto - width: 100% - view: - type: linear_layout - direction: horizontal - items: - - margin: - top: 4 - bottom: 16 - start: 0 - end: 0 - size: - width: 100% - height: 48 - view: - type: label_button - identifier: submit_feedback--Submit - label: - type: label - text: Submit - text_appearance: - font_size: 14 - color: - default: - type: hex - hex: "#FFFFFF" - alpha: 1 - alignment: center - styles: [ ] - font_families: - - sans-serif - actions: { } - enabled: - - form_validation - button_click: - - form_submit - - pager_next - background_color: - default: - type: hex - hex: "#222222" - alpha: 1 - border: - radius: 0 - stroke_width: 1 - stroke_color: - default: - type: hex - hex: "#222222" - alpha: 1 - background_color: - default: - type: hex - hex: "#FFFFFF" - alpha: 1 - background_color: - default: - type: hex - hex: "#FFFFFF" - alpha: 1 - - identifier: a232866d-dcc1-45f9-83e1-a6b5df90f40a - type: pager_item - view: - type: container - items: - - margin: - start: 0 - end: 0 - position: - horizontal: center - vertical: center - size: - width: 100% - height: 100% - view: - type: linear_layout - direction: horizontal - items: [ ] - background_color: - default: - type: hex - hex: "#FFFFFF" - alpha: 1 - - margin: - start: 0 - end: 0 - position: - horizontal: center - vertical: center - size: - width: 100% - height: 100% - view: - type: media - media_fit: center_crop - url: https://dl-staging.urbanairship.com/binary/public/Vl0wyG8kSyCyOUW98Wj4xg/84bdd2d5-f345-431a-aacc-dc246072ddb5 - media_type: image - - margin: - top: 0 - bottom: 0 - start: 16 - end: 16 - position: - horizontal: center - vertical: center - size: - width: 100% - height: 100% - view: - type: linear_layout - direction: vertical - items: - - identifier: scroll_container - size: - width: 100% - height: 100% - view: - type: linear_layout - direction: vertical - items: - - size: - height: 100% - width: 100% - view: - type: container - items: - - margin: - bottom: 16 - position: - horizontal: center - vertical: center - size: - width: 100% - height: 100% - view: - type: linear_layout - direction: vertical - items: - - identifier: scroll_container - size: - width: 100% - height: 100% - view: - type: scroll_layout - direction: vertical - view: - type: linear_layout - direction: vertical - items: [ ] - - position: - horizontal: end - vertical: top - size: - width: 48 - height: 48 - view: - type: image_button - image: - scale: 0.4 - type: icon - icon: close - color: - default: - type: hex - hex: "#F07ADC" - alpha: 1 - identifier: dismiss_button - button_click: - - dismiss diff --git a/Thomas/Thomas/Resources/Scenes/Modal/wrapping-nps-test.yml b/Thomas/Thomas/Resources/Scenes/Modal/wrapping-nps-test.yml deleted file mode 100644 index 02fe3acbb..000000000 --- a/Thomas/Thomas/Resources/Scenes/Modal/wrapping-nps-test.yml +++ /dev/null @@ -1,517 +0,0 @@ ---- -version: 1 -presentation: - type: modal - default_placement: - size: - width: 90% - height: 80% - shade_color: - default: - hex: '#000000' - alpha: 0.6 -view: - type: pager_controller - identifier: "pager-controller-id" - view: - type: container - border: - radius: 30 - stroke_width: 2 - stroke_color: - default: - hex: "#333333" - alpha: 0.8 - background_color: - default: - hex: "#ffffff" - alpha: 1 - items: - - position: - vertical: center - horizontal: center - size: - height: 100% - width: 100% - border: - radius: 25 - view: - type: pager - items: - - identifier: "pager-page-1-id" - # display_actions: - # add_tags_action: 'pager-page-1x' - accessibility_actions: - - type: default - reporting_metadata: - key: "page_1_next" - localized_content_description: - fallback: "Next Page" - ref: "ua_next" - actions: - - add_tags_action: "page_1_next_action" - behaviors: - - pager_next - - type: escape - reporting_metadata: - key: "page_1_escape" - localized_content_description: - fallback: "Dismiss" - ref: "ua_escape" - actions: - - add_tags_action: "page_1_dismiss_action" - behaviors: - - dismiss -# automated_actions: -# - identifier: "auto_announce_page_1" -# delay: 0.5 -# behaviors: ["pager_pause"] - view: - type: container - background_color: - default: - hex: "#FF0000" - alpha: 0.5 - items: - - position: - vertical: center - horizontal: center - size: - height: auto - width: auto - view: - type: nps_form_controller - identifier: page_1_nps_form - nps_identifier: score_identifier_1 - submit: submit_event - view: - type: linear_layout - direction: vertical - items: - - size: - width: auto - height: auto - margin: - start: 8 - end: 8 - view: - type: score - identifier: score_identifier_1 - required: true - style: - type: number_range - start: 990 - end: 1000 - spacing: 120 - wrapping: - line_spacing: 10 - max_items_per_line: 11 - bindings: - selected: - shapes: - - type: ellipse - color: - default: - hex: "#FFFFFF" - alpha: 0 - text_appearance: - font_size: 14 - color: - default: - hex: "#000000" - alpha: 1 - unselected: - shapes: - - type: ellipse - color: - default: - hex: "#000000" - alpha: 1 - text_appearance: - font_size: 14 - color: - default: - hex: "#ffffff" - alpha: 1 - content_description: "Rate your experience from 0 to 10" - - size: - width: auto - height: auto - margin: - start: 16 - end: 16 - view: - type: label_button - identifier: submit_button - background_color: - default: - hex: "#ffffff" - alpha: 1 - button_click: ["form_submit", "cancel"] - enabled: ["form_validation"] - # display_actions: - # add_tags_action: 'pager-page-1-form-submit' - label: - type: label - text: width:auto height:auto - text_appearance: - font_size: 14 - alignment: center - color: - default: - hex: "#000000" - alpha: 1 - content_description: "Submit button" - - position: - horizontal: end - vertical: top - size: - height: 24 - width: 24 - margin: - top: 8 - end: 8 - view: - type: image_button - identifier: close_button_1 - button_click: [ dismiss ] - image: - type: icon - icon: close - color: - default: - hex: "#000000" - alpha: 1 - content_description: "Close button" - - identifier: "pager-page-2-id" - # display_actions: - # add_tags_action: 'pager-page-2x' - accessibility_actions: - - type: default - reporting_metadata: - key: "page_2_previous" - localized_content_description: - fallback: "Previous Page" - ref: "ua_previous" - actions: - - add_tags_action: "page_2_previous_action" - behaviors: - - pager_previous - - type: escape - reporting_metadata: - key: "page_2_escape" - localized_content_description: - fallback: "Dismiss" - ref: "ua_escape" - actions: - - add_tags_action: "page_2_dismiss_action" - behaviors: - - dismiss -# automated_actions: -# - identifier: "auto_announce_page_2" -# delay: 0.5 -# behaviors: ["pager_pause"] - view: - type: container - background_color: - default: - hex: "#00FF00" - alpha: 0.5 - items: - - position: - vertical: center - horizontal: center - size: - height: auto - width: auto - view: - type: nps_form_controller - identifier: page_2_nps_form - nps_identifier: score_identifier_2 - submit: submit_event - view: - type: linear_layout - direction: vertical - items: - - size: - width: 200 - height: auto - margin: - start: 8 - end: 8 - view: - type: score - identifier: score_identifier_2 - required: true - style: - type: number_range - start: 0 - end: 10 - spacing: 0 - wrapping: - line_spacing: 0 - max_items_per_line: 11 - bindings: - selected: - shapes: - - type: ellipse - color: - default: - hex: "#FFFFFF" - alpha: 0 - text_appearance: - font_size: 42 - color: - default: - hex: "#000000" - alpha: 1 - unselected: - shapes: - - type: ellipse - color: - default: - hex: "#000000" - alpha: 1 - text_appearance: - font_size: 42 - color: - default: - hex: "#ffffff" - alpha: 1 - content_description: "Rate your experience from 0 to 10" - - size: - width: auto - height: auto - margin: - start: 16 - end: 16 - view: - type: label_button - identifier: submit_button - background_color: - default: - hex: "#ffffff" - alpha: 1 - button_click: ["form_submit", "cancel"] - enabled: ["form_validation"] - # display_actions: - # add_tags_action: 'pager-page-2-form-submit' - label: - type: label - text: width:200 height:auto - text_appearance: - font_size: 14 - alignment: center - color: - default: - hex: "#000000" - alpha: 1 - content_description: "Submit button" - - identifier: "pager-page-3-id" - # display_actions: - # add_tags_action: 'pager-page-3x' - accessibility_actions: - - type: default - reporting_metadata: - key: "page_3_previous" - localized_content_description: - fallback: "Previous Page" - ref: "ua_previous" - actions: - - add_tags_action: "page_3_previous_action" - behaviors: - - pager_previous - - type: escape - reporting_metadata: - key: "page_3_escape" - localized_content_description: - fallback: "Dismiss" - ref: "ua_escape" - actions: - - add_tags_action: "page_3_dismiss_action" - behaviors: - - dismiss -# automated_actions: -# - identifier: "auto_announce_page_3" -# delay: 0.5 -# behaviors: ["pager_pause"] - view: - type: container - background_color: - default: - hex: "#00FFF0" - alpha: 0.5 - items: - - position: - vertical: center - horizontal: center - size: - height: auto - width: auto - view: - type: nps_form_controller - identifier: page_2_nps_form - nps_identifier: score_identifier_2 - submit: submit_event - view: - type: linear_layout - direction: vertical - items: - - size: - width: 50 - height: auto - margin: - start: 8 - end: 8 - view: - type: score - identifier: score_identifier_2 - required: true - style: - type: number_range - start: 0 - end: 10 - spacing: 0 - wrapping: - line_spacing: 0 - max_items_per_line: 11 - bindings: - selected: - shapes: - - type: ellipse - color: - default: - hex: "#FFFFFF" - alpha: 0 - text_appearance: - font_size: 14 - color: - default: - hex: "#000000" - alpha: 1 - unselected: - shapes: - - type: ellipse - color: - default: - hex: "#000000" - alpha: 1 - text_appearance: - font_size: 14 - color: - default: - hex: "#ffffff" - alpha: 1 - content_description: "Rate your experience from 0 to 10" - - size: - width: auto - height: auto - margin: - start: 16 - end: 16 - view: - type: label_button - identifier: submit_button - background_color: - default: - hex: "#ffffff" - alpha: 1 - button_click: ["form_submit", "cancel"] - enabled: ["form_validation"] - # display_actions: - # add_tags_action: 'pager-page-2-form-submit' - label: - type: label - text: width:50 height:auto - text_appearance: - font_size: 14 - alignment: center - color: - default: - hex: "#000000" - alpha: 1 - content_description: "Submit button" - - position: - horizontal: end - vertical: top - size: - height: 24 - width: 24 - margin: - top: 8 - end: 8 - view: - type: image_button - identifier: close_button_2 - button_click: [ dismiss ] - image: - type: icon - icon: close - color: - default: - hex: "#000000" - alpha: 1 - content_description: "Close button" - gestures: - - type: swipe - identifier: "swipe_next" - direction: up - behavior: - behaviors: ["pager_next"] - - type: tap - identifier: "tap_next" - location: end - behavior: - behaviors: ["pager_next"] - - size: - height: 16 - width: auto - position: - vertical: bottom - horizontal: center - margin: - bottom: 8 - view: - type: pager_indicator - spacing: 4 - bindings: - selected: - shapes: - - type: rectangle - aspect_ratio: 2.25 - scale: 0.9 - border: - radius: 3 - stroke_width: 1 - stroke_color: - default: - hex: "#ffffff" - alpha: 0.7 - color: - default: - hex: "#ffffff" - alpha: 1 - unselected: - shapes: - - type: rectangle - aspect_ratio: 2.25 - scale: .9 - border: - radius: 3 - stroke_width: 1 - stroke_color: - default: - hex: "#ffffff" - alpha: 0.7 - color: - default: - hex: "#000000" - alpha: 0 - automated_accessibility_actions: - - type: announce - background_color: - default: - hex: "#333333" - alpha: 0.7 - border: - radius: 8