|
93 | 93 | { "id": "call_text_column", "component": { "Column": { "children": { "explicitList": ["call_primary_text", "call_secondary_text"]} , "distribution": "start", "alignment": "start"} } } , |
94 | 94 | { "id": "info_row_4", "component": { "Row": { "children": { "explicitList": ["call_icon", "call_text_column"]} , "distribution": "start", "alignment": "start"} } } , |
95 | 95 | { "id": "info_rows_column", "weight": 1, "component": { "Column": { "children": { "explicitList": ["info_row_1", "info_row_2", "info_row_3", "info_row_4"]} , "alignment": "stretch"} } } , |
96 | | - { "id": "button_1_text", "component": { "Text": { "text": { "literalString": "Follow"} } } } , { "id": "button_1", "component": { "Button": { "child": "button_1_text", "primary": true, "action": { "name": "follow_contact"} } } } , |
97 | | - { "id": "button_2_text", "component": { "Text": { "text": { "literalString": "Message"} } } } , { "id": "button_2", "component": { "Button": { "child": "button_2_text", "primary": false, "action": { "name": "send_message"} } } } , |
| 96 | + { "id": "button_1_text", "component": { "Text": { "text": { "literalString": "Follow"} } } } , { "id": "button_1", "component": { "Button": { "child": "button_1_text", "primary": true, "action": { "name": "follow_contact", "context": [ { "key": "contactName", "value": { "path": "name" } } ] } } } } , |
| 97 | + { "id": "button_2_text", "component": { "Text": { "text": { "literalString": "Message"} } } } , { "id": "button_2", "component": { "Button": { "child": "button_2_text", "primary": false, "action": { "name": "send_message", "context": [ { "key": "contactName", "value": { "path": "name" } } ] } } } } , |
98 | 98 | { "id": "action_buttons_row", "component": { "Row": { "children": { "explicitList": ["button_1", "button_2"]} , "distribution": "center", "alignment": "center"} } } , |
99 | 99 | { "id": "link_text", "component": { "Text": { "text": { "literalString": "[View Full Profile](/profile)"} } } } , |
100 | 100 | { "id": "link_text_wrapper", "component": { "Row": { "children": { "explicitList": ["link_text"]} , "distribution": "center", "alignment": "center"} } } , |
|
121 | 121 |
|
122 | 122 | ---BEGIN ACTION_CONFIRMATION_EXAMPLE--- |
123 | 123 | [ |
124 | | - { "beginRendering": { "surfaceId": "action-modal", "root": "modal-wrapper", "styles": { "primaryColor": "#007BFF", "font": "Roboto" } } }, |
| 124 | + { "beginRendering": { "surfaceId": "contact-card", "root": "message-success-card"} }, |
125 | 125 | { "surfaceUpdate": { |
126 | | - "surfaceId": "action-modal", |
| 126 | + "surfaceId": "contact-card", |
127 | 127 | "components": [ |
128 | | - { "id": "modal-wrapper", "component": { "Modal": { "entryPointChild": "hidden-entry-point", "contentChild": "modal-content-column" } } }, |
129 | | - { "id": "hidden-entry-point", "component": { "Text": { "text": { "literalString": "" } } } }, |
130 | | - { "id": "modal-content-column", "component": { "Column": { "children": { "explicitList": ["modal-title", "modal-message", "dismiss-button"] }, "alignment": "center" } } }, |
131 | | - { "id": "modal-title", "component": { "Text": { "usageHint": "h2", "text": { "path": "actionTitle" } } } }, |
132 | | - { "id": "modal-message", "component": { "Text": { "text": { "path": "actionMessage" } } } }, |
133 | | - { "id": "dismiss-button-text", "component": { "Text": { "text": { "literalString": "Dismiss" } } } }, |
134 | | - { "id": "dismiss-button", "component": { "Button": { "child": "dismiss-button-text", "primary": true, "action": { "name": "dismiss_modal" } } } } |
| 128 | + { "id": "success_icon", "component": { "Icon": { "name": { "literalString": "send"}, "size": 48.0, "color": "#4CAF50"} } }, |
| 129 | + { "id": "success_title", "component": { "Text": { "text": { "path": "actionTitle"}, "usageHint": "h2"} } }, |
| 130 | + { "id": "success_message", "component": { "Text": { "text": { "path": "actionMessage"} } } }, |
| 131 | + { "id": "back_button_text", "component": { "Text": { "text": { "literalString": "Back to Profile"} } } }, |
| 132 | + { "id": "back_button", "component": { "Button": { "child": "back_button_text", "primary": false, "action": { "name": "view_profile", "context": [ { "key": "contactName", "value": { "path": "contactName" } } ] } } } }, |
| 133 | + { "id": "success_column", "component": { "Column": { "children": { "explicitList": ["success_icon", "success_title", "success_message", "back_button"]}, "alignment": "center"} } }, |
| 134 | + { "id": "message-success-card", "component": { "Card": { "child": "success_column"} } } |
135 | 135 | ] |
136 | 136 | } }, |
137 | 137 | { "dataModelUpdate": { |
138 | | - "surfaceId": "action-modal", |
| 138 | + "surfaceId": "contact-card", |
139 | 139 | "path": "/", |
140 | 140 | "contents": [ |
141 | | - { "key": "actionTitle", "valueString": "Action Confirmation" }, |
142 | | - { "key": "actionMessage", "valueString": "Your action has been processed." } |
| 141 | + { "key": "actionTitle", "valueString": "Message Sent" }, |
| 142 | + { "key": "actionMessage", "valueString": "Your message has been sent to." }, |
| 143 | + { "key": "contactName", "valueString": "" } |
143 | 144 | ] |
144 | 145 | } } |
145 | 146 | ] |
|
152 | 153 | "surfaceId": "contact-card", |
153 | 154 | "components": [ |
154 | 155 | { "id": "success_icon", "component": { "Icon": { "name": { "literalString": "check_circle"}, "size": 48.0, "color": "#4CAF50"} } } , |
155 | | - { "id": "success_text", "component": { "Text": { "text": { "literalString": "Successfully Followed"}, "usageHint": "h2"} } } , |
156 | | - { "id": "success_column", "component": { "Column": { "children": { "explicitList": ["success_icon", "success_text"]} , "alignment": "center"} } } , |
| 156 | + { "id": "success_text", "component": { "Text": { "text": { "path": "followMessage"}, "usageHint": "h2"} } } , |
| 157 | + { "id": "back_button_text", "component": { "Text": { "text": { "literalString": "Back to Profile"} } } } , |
| 158 | + { "id": "back_button", "component": { "Button": { "child": "back_button_text", "primary": false, "action": { "name": "view_profile", "context": [ { "key": "contactName", "value": { "path": "contactName" } } ] } } } } , |
| 159 | + { "id": "success_column", "component": { "Column": { "children": { "explicitList": ["success_icon", "success_text", "back_button"]} , "alignment": "center"} } } , |
157 | 160 | { "id": "success_card", "component": { "Card": { "child": "success_column"} } } |
158 | 161 | ] |
| 162 | + } }, |
| 163 | + { "dataModelUpdate": { |
| 164 | + "surfaceId": "contact-card", |
| 165 | + "path": "/", |
| 166 | + "contents": [ |
| 167 | + { "key": "followMessage", "valueString": "Successfully Followed" }, |
| 168 | + { "key": "contactName", "valueString": "" } |
| 169 | + ] |
159 | 170 | } } |
160 | 171 | ] |
161 | 172 | ---END FOLLOW_SUCCESS_EXAMPLE--- |
|
0 commit comments