From f219652817bf0765f28a141ddcf79eed0a2e4c76 Mon Sep 17 00:00:00 2001 From: Calise Cheung Date: Tue, 3 Oct 2023 09:00:24 -0700 Subject: [PATCH 1/6] Add Adobe standard 2.0 info in the Consent doc Add Adobe uses standard 2.0 and metadata time info in the Consent doc. --- .../consent-for-edge-network/api-reference.md | 21 +++++++++++++++++++ .../consent-for-edge-network/index.md | 4 ++++ 2 files changed, 25 insertions(+) diff --git a/src/pages/documentation/consent-for-edge-network/api-reference.md b/src/pages/documentation/consent-for-edge-network/api-reference.md index 2bb7425957..77081e1c24 100644 --- a/src/pages/documentation/consent-for-edge-network/api-reference.md +++ b/src/pages/documentation/consent-for-edge-network/api-reference.md @@ -65,4 +65,25 @@ iOS + + +The updateConsents API automatically includes the following properties in its request to Edge Network: `standard` with the value `Adobe` and `version` with the value `2.0`. Additionally, the property `metadata` is set to the time at which the API is called. + +In the following, you can see an example in a request that set collect consent to `y`: +```json + "consent": [ + { + "standard": "Adobe", + "version": "2.0", + "value": { + "metadata": { + "time": "xxxx-xx-xxxxx:xx:xx.xxxx" + }, + "collect": { + "val": "y" + } + } + } + ] +``` For additional information about the management of consent preferences, please refer to the [Privacy and GDPR documentation](../resources/privacy-and-gdpr.md#using-experience-platform-sdks-for-edge-network). diff --git a/src/pages/documentation/consent-for-edge-network/index.md b/src/pages/documentation/consent-for-edge-network/index.md index 19d9dd12b4..63eb135fbb 100644 --- a/src/pages/documentation/consent-for-edge-network/index.md +++ b/src/pages/documentation/consent-for-edge-network/index.md @@ -27,6 +27,10 @@ The Adobe Experience Platform Consent mobile extension enables consent preferenc In order to ingest and use the data collected by this extension, follow the guide on [ingesting data using the Consents and Preferences data type](https://experienceleague.adobe.com/docs/experience-platform/xdm/data-types/consents.html#ingest). + + +The Consent extension uses Adobe Standard 2.0 when communicating with the Edge Network. + The use of this extension is currently limited to the setting (and enforcement) of client-side, macro consent flags. While SDK APIs allow for granular and global consent preference collection, flags are not consistently enforced with upstream applications and therefore will not accommodate use cases that rely on global/granular consent preferences. From 67db45e4f1a403e89c26842d0a4a41b3099b5231 Mon Sep 17 00:00:00 2001 From: Calise Cheung Date: Tue, 3 Oct 2023 09:34:27 -0700 Subject: [PATCH 2/6] Update format Update format --- .../documentation/consent-for-edge-network/api-reference.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pages/documentation/consent-for-edge-network/api-reference.md b/src/pages/documentation/consent-for-edge-network/api-reference.md index 77081e1c24..20eecc8397 100644 --- a/src/pages/documentation/consent-for-edge-network/api-reference.md +++ b/src/pages/documentation/consent-for-edge-network/api-reference.md @@ -70,6 +70,7 @@ iOS The updateConsents API automatically includes the following properties in its request to Edge Network: `standard` with the value `Adobe` and `version` with the value `2.0`. Additionally, the property `metadata` is set to the time at which the API is called. In the following, you can see an example in a request that set collect consent to `y`: + ```json "consent": [ { @@ -86,4 +87,5 @@ In the following, you can see an example in a request that set collect consent t } ] ``` + For additional information about the management of consent preferences, please refer to the [Privacy and GDPR documentation](../resources/privacy-and-gdpr.md#using-experience-platform-sdks-for-edge-network). From 3c41da70b059f73b87e9a8dec846c584a71d411f Mon Sep 17 00:00:00 2001 From: Calise Cheung Date: Tue, 3 Oct 2023 10:33:40 -0700 Subject: [PATCH 3/6] Update Adobe Standard 2.0 info example Update Adobe Standard 2.0 info example --- .../consent-for-edge-network/api-reference.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/pages/documentation/consent-for-edge-network/api-reference.md b/src/pages/documentation/consent-for-edge-network/api-reference.md index 20eecc8397..a5d0b33783 100644 --- a/src/pages/documentation/consent-for-edge-network/api-reference.md +++ b/src/pages/documentation/consent-for-edge-network/api-reference.md @@ -67,9 +67,20 @@ iOS -The updateConsents API automatically includes the following properties in its request to Edge Network: `standard` with the value `Adobe` and `version` with the value `2.0`. Additionally, the property `metadata` is set to the time at which the API is called. +The Consent extension uses Adobe Standard 2.0 when communicating with the Edge Network, when the updateConsents API is called. Additionally, the property `metadata` is set to the time at which the API is called. -In the following, you can see an example in a request that set collect consent to `y`: +Here is an example where updateConsents is called to set collect consent to y and bellow you can see the snippet of the request payload sent to the Edge Network. + +**Set and update Consent** + +```swift +// Example in iOS (Swift), updating users collect consent to 'yes' +let collectConsent = ["collect": ["val": "y"]] +let currentConsents = ["consents": collectConsent] +Consent.update(with: currentConsents) +``` + +**Request payload sent to the Edge Network** ```json "consent": [ @@ -78,7 +89,7 @@ In the following, you can see an example in a request that set collect consent t "version": "2.0", "value": { "metadata": { - "time": "xxxx-xx-xxxxx:xx:xx.xxxx" + "time" : "2023-10-03T17:23:04.443Z" }, "collect": { "val": "y" From d3abd64331b380fc18a62c6069537c142bfa3b84 Mon Sep 17 00:00:00 2001 From: Calise Cheung Date: Tue, 3 Oct 2023 18:27:39 -0700 Subject: [PATCH 4/6] Update Info alert format Update Info alert format --- .../components/InlineAlert/index.js | 122 +++++++----------- .../consent-for-edge-network/api-reference.md | 10 +- 2 files changed, 53 insertions(+), 79 deletions(-) diff --git a/src/@adobe/gatsby-theme-aio/components/InlineAlert/index.js b/src/@adobe/gatsby-theme-aio/components/InlineAlert/index.js index 7d34a06199..f1550d50e6 100644 --- a/src/@adobe/gatsby-theme-aio/components/InlineAlert/index.js +++ b/src/@adobe/gatsby-theme-aio/components/InlineAlert/index.js @@ -16,6 +16,12 @@ import * as Icons from '@adobe/gatsby-theme-aio/src/components/Icons'; import PropTypes from 'prop-types'; import '@spectrum-css/inlinealert'; +const commonCss = css` + font-size: 1rem; + line-height: 1.3rem; + padding-right: 30px; +`; + const getIconName = (variant) => { let icon = variant; @@ -26,10 +32,33 @@ const getIconName = (variant) => { return `${icon.charAt(0).toUpperCase()}${icon.slice(1)}Medium`; }; -const InlineAlert = ({ variant = 'info', header, text }) => { - const Icon = Icons[getIconName(variant)]; + const InlineAlertTexts = ({ texts }) => { + const textKeys = Object.keys(texts).filter((key) => key.startsWith('text')); + return textKeys.map((textKey, index) => + index === 0 + ? cloneElement(texts[textKey], { + className: 'spectrum-InLineAlert-content', + css: css` + margin-top: 0; + margin-left: var(--spectrum-global-dimension-size-300) !important; + ${commonCss}; + ` + }) + : cloneElement(texts[textKey], { + className: 'spectrum-InLineAlert-content', + css: css` + margin-top: var(--spectrum-global-dimension-size-150); + margin-left: var(--spectrum-global-dimension-size-300) !important; + ${commonCss}; + ` + }) + ); + }; - if (header){ + const InlineAlert = ({ variant = 'info', header, ...props }) => { + const Icon = Icons[getIconName(variant)] ? Icons[getIconName(variant)] : Icons.NeutralMedium; + variant = variant === 'warning' ? 'negative' : variant; + return (
{ margin-left: var(--spectrum-global-dimension-size-175) !important; } `}> - -
+
+ {header && + cloneElement(header, { + className: 'spectrum-InLineAlert-header', + css: css` margin-top: 0; - margin-bottom: var(--spectrum-global-dimension-size-300); margin-left: var(--spectrum-global-dimension-size-300); - p { - font-size: larger; - } - `}> - {cloneElement(header, { - className: ' ', - css: css` - margin: 0 !important; - ` - })} -
-
- {cloneElement(text, { - className: ' ', - css: css` - margin: 0 !important; + margin-bottom: 0.5rem; + font-size: 1rem; + line-height: 1.3rem; ` })} -
- ); - } - else { - return ( -
- -
- {cloneElement(text, { - className: ' ', - css: css` - margin: 0 !important; - ` - })} -
-
- ); - } + +
+ ); + }; -}; InlineAlert.propTypes = { variant: PropTypes.string, diff --git a/src/pages/documentation/consent-for-edge-network/api-reference.md b/src/pages/documentation/consent-for-edge-network/api-reference.md index a5d0b33783..7ec3ca5c4b 100644 --- a/src/pages/documentation/consent-for-edge-network/api-reference.md +++ b/src/pages/documentation/consent-for-edge-network/api-reference.md @@ -65,13 +65,11 @@ iOS - + -The Consent extension uses Adobe Standard 2.0 when communicating with the Edge Network, when the updateConsents API is called. Additionally, the property `metadata` is set to the time at which the API is called. +When `Consent.update` API is called, the Consent extension uses Adobe Standard 2.0 to communicate with the Edge Network. Additionally, the property `metadata` is set to the time at which the API is called. -Here is an example where updateConsents is called to set collect consent to y and bellow you can see the snippet of the request payload sent to the Edge Network. - -**Set and update Consent** +Here is an example where `Consent.update` is called to set collect consent to y: ```swift // Example in iOS (Swift), updating users collect consent to 'yes' @@ -80,7 +78,7 @@ let currentConsents = ["consents": collectConsent] Consent.update(with: currentConsents) ``` -**Request payload sent to the Edge Network** +Bellow you can see the snippet of the request payload sent to the Edge Network: ```json "consent": [ From 4f40bff62f6d0f8f3924bac08665d23bcab6f809 Mon Sep 17 00:00:00 2001 From: Calise Cheung Date: Wed, 4 Oct 2023 15:48:00 -0700 Subject: [PATCH 5/6] Update a phrase per review comment Update a phrase per review comment --- .../documentation/consent-for-edge-network/api-reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/documentation/consent-for-edge-network/api-reference.md b/src/pages/documentation/consent-for-edge-network/api-reference.md index 7ec3ca5c4b..e3ed1b8f0a 100644 --- a/src/pages/documentation/consent-for-edge-network/api-reference.md +++ b/src/pages/documentation/consent-for-edge-network/api-reference.md @@ -69,7 +69,7 @@ iOS When `Consent.update` API is called, the Consent extension uses Adobe Standard 2.0 to communicate with the Edge Network. Additionally, the property `metadata` is set to the time at which the API is called. -Here is an example where `Consent.update` is called to set collect consent to y: +The following example shows when `Consent.update` is called to set collect consent to `y`: ```swift // Example in iOS (Swift), updating users collect consent to 'yes' From 8c97d1107257688396d8ae5d7b802d40464e346a Mon Sep 17 00:00:00 2001 From: Calise Cheung Date: Wed, 4 Oct 2023 17:12:57 -0700 Subject: [PATCH 6/6] update typo update typo --- .../documentation/consent-for-edge-network/api-reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/documentation/consent-for-edge-network/api-reference.md b/src/pages/documentation/consent-for-edge-network/api-reference.md index e3ed1b8f0a..0a044d1e2d 100644 --- a/src/pages/documentation/consent-for-edge-network/api-reference.md +++ b/src/pages/documentation/consent-for-edge-network/api-reference.md @@ -72,7 +72,7 @@ When `Consent.update` API is called, the Consent extension uses Adobe Standard 2 The following example shows when `Consent.update` is called to set collect consent to `y`: ```swift -// Example in iOS (Swift), updating users collect consent to 'yes' +// Example in iOS (Swift), updating user's collect consent to 'yes' let collectConsent = ["collect": ["val": "y"]] let currentConsents = ["consents": collectConsent] Consent.update(with: currentConsents)