Skip to content

Commit

Permalink
resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Pravin Prakash Kumar authored and Pravin Prakash Kumar committed Oct 5, 2023
2 parents d994e31 + 4941e22 commit 2c98e31
Show file tree
Hide file tree
Showing 4 changed files with 122 additions and 73 deletions.
122 changes: 49 additions & 73 deletions src/@adobe/gatsby-theme-aio/components/InlineAlert/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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 (
<div
role="alert"
Expand All @@ -44,82 +73,29 @@ const InlineAlert = ({ variant = 'info', header, text }) => {
margin-left: var(--spectrum-global-dimension-size-175) !important;
}
`}>
<Icon className="spectrum-InLineAlert-icon" />
<div
className="spectrum-InLineAlert-header"
css={css`
<Icon
className="spectrum-Icon spectrum-Icon--sizeM spectrum-InLineAlert-icon"
css={css`
display: inline-block !important;
`} />
<div>
{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;
`
})}
</div>
<div
className="spectrum-InLineAlert-content"
css={css`
margin-top: 0;
margin-left: var(--spectrum-global-dimension-size-300);
p {
margin: 0;
}
`}>
{cloneElement(text, {
className: ' ',
css: css`
margin: 0 !important;
margin-bottom: 0.5rem;
font-size: 1rem;
line-height: 1.3rem;
`
})}
</div>
</div>
);
}
else {
return (
<div
role="alert"
className={`spectrum-InLineAlert spectrum-InLineAlert--${variant}`}
css={css`
display: block !important;
min-width: 0 !important;
width: 100%;
margin-top: var(--spectrum-global-dimension-size-300);
svg {
left: 0;
margin-left: var(--spectrum-global-dimension-size-175) !important;
}
`}>
<Icon className="spectrum-InLineAlert-icon" />
<div
className="spectrum-InLineAlert-content"
css={css`
margin-top: 0;
margin-left: var(--spectrum-global-dimension-size-300);
p {
margin: 0;
}
`}>
{cloneElement(text, {
className: ' ',
css: css`
margin: 0 !important;
`
})}
</div>
</div>
);
}
<InlineAlertTexts texts={props} />
</div>
);
};

};

InlineAlert.propTypes = {
variant: PropTypes.string,
Expand Down
32 changes: 32 additions & 0 deletions src/pages/documentation/consent-for-edge-network/api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,36 @@ iOS

<Tabs query="platform=ios&api=update-consents"/>

<InlineAlert variant="info" slots="text1, text2, text3, text4, text5"/>

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.

The following example shows when `Consent.update` is called to set collect consent to `y`:

```swift
// Example in iOS (Swift), updating user's collect consent to 'yes'
let collectConsent = ["collect": ["val": "y"]]
let currentConsents = ["consents": collectConsent]
Consent.update(with: currentConsents)
```

Bellow you can see the snippet of the request payload sent to the Edge Network:

```json
"consent": [
{
"standard": "Adobe",
"version": "2.0",
"value": {
"metadata": {
"time" : "2023-10-03T17:23:04.443Z"
},
"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).
4 changes: 4 additions & 0 deletions src/pages/documentation/consent-for-edge-network/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

<InlineAlert variant="info" slots="text"/>

The Consent extension uses Adobe Standard 2.0 when communicating with the Edge Network.

<InlineAlert variant="warning" slots="text"/>

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.
Expand Down
37 changes: 37 additions & 0 deletions src/pages/documentation/release-notes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,43 @@ Keywords:

# Release notes

## October 3, 2023

### Android BOM 2.5.0

* This BOM ([Bill of Materials](https://central.sonatype.com/artifact/com.adobe.marketing.mobile/sdk-bom)) release includes changes to the following Android extensions.

<Accordion>

<AccordionItem header='Expand'>

| Extension artifact | BOM (2.4.1) | BOM (2.5.0) |
|-----|-----|-----|
| **com.adobe.marketing.mobile:core** | **2.4.0** | **2.5.0**|
| **com.adobe.marketing.mobile:messaging** | **2.1.4** | **2.2.0**|
| com.adobe.marketing.mobile:analytics | 2.0.3 | 2.0.3 |
| com.adobe.marketing.mobile:assurance | 2.1.1 | 2.1.1 |
| com.adobe.marketing.mobile:audience | 2.0.0 | 2.0.0 |
| com.adobe.marketing.mobile:campaign | 2.0.6 | 2.0.6 |
| com.adobe.marketing.mobile:campaignclassic | 2.0.1 | 2.0.1 |
| com.adobe.marketing.mobile:edge | 2.3.0 | 2.3.0 |
| com.adobe.marketing.mobile:edgebridge | 2.1.0 | 2.1.0 |
| com.adobe.marketing.mobile:edgeconsent | 2.0.0 | 2.0.0 |
| com.adobe.marketing.mobile:edgeidentity | 2.0.1 | 2.0.1 |
| com.adobe.marketing.mobile:edgemedia | 2.0.0 | 2.0.0 |
| com.adobe.marketing.mobile:identity | 2.0.3 | 2.0.3 |
| com.adobe.marketing.mobile:lifecycle | 2.0.4 | 2.0.4 |
| com.adobe.marketing.mobile:media | 3.0.0 | 3.0.0 |
| com.adobe.marketing.mobile:optimize | 2.0.1 | 2.0.1 |
| com.adobe.marketing.mobile:places | 2.1.0 | 2.1.0 |
| com.adobe.marketing.mobile:signal | 2.0.1 | 2.0.1 |
| com.adobe.marketing.mobile:target | 2.0.1 | 2.0.1 |
| com.adobe.marketing.mobile:userprofile | 2.0.1 | 2.0.1 |

</AccordionItem>

</Accordion>

## September 28, 2023

### Android Core 2.5.0
Expand Down

0 comments on commit 2c98e31

Please sign in to comment.