Skip to content

Commit dc712f9

Browse files
committed
Merge remote-tracking branch 'origin/main' into AC-14314
2 parents 725a544 + 4e287e3 commit dc712f9

File tree

683 files changed

+4734
-4237
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

683 files changed

+4734
-4237
lines changed

.remarkrc.mjs

Lines changed: 0 additions & 42 deletions
This file was deleted.

.remarkrc.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
plugins:
2+
- remark-heading-id
3+
- remark-validate-links
4+
- remark-frontmatter
5+
- - remark-lint-frontmatter-schema
6+
- schemas:
7+
./.github/linters/metadata.schema.yml:
8+
- ./src/pages/**/*.md

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,28 @@ To build the site locally:
2727
yarn dev
2828
```
2929

30+
## Components
31+
32+
To achieve specific user experience goals for Commerce documentation, this repo overrides the original [`Edition`](https://github.com/adobe/aio-theme/blob/main/packages/gatsby-theme-aio/src/components/Edition/index.js) component from the upstream [`aio-theme`](https://github.com/adobe/aio-theme/) repo that we use as a dependency.
33+
34+
### Edition
35+
36+
The custom `Edition` component in this repo displays a badge indicating whether a feature or functionality is available in specific Adobe Commerce environments. It has been customized to align with the badges that we use in Experience League docs.
37+
38+
#### Usage
39+
40+
```yaml
41+
# Page-level (metadata)
42+
edition: saas # For SaaS-only features
43+
edition: paas # For PaaS-only features
44+
```
45+
46+
```md
47+
<!-- Section-level (inline) -->
48+
<Edition name="paas" /> <!-- For PaaS-only features -->
49+
<Edition name="saas" /> <!-- For SaaS-only features -->
50+
```
51+
3052
## Resources
3153

3254
See the following resources to learn more about using the theme:

gatsby-browser.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* Copyright 2020 Adobe. All rights reserved.
3+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
4+
* you may not use this file except in compliance with the License. You may obtain a copy
5+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
6+
*
7+
* Unless required by applicable law or agreed to in writing, software distributed under
8+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9+
* OF ANY KIND, either express or implied. See the License for the specific language
10+
* governing permissions and limitations under the License.
11+
*/
12+
13+
import React from 'react';
14+
import { MDXProvider } from '@mdx-js/react';
15+
import { Edition } from './src/@adobe/gatsby-theme-aio/components/Edition';
16+
17+
// Define the components that will be available in MDX files
18+
const components = {
19+
// Register the Edition component for inline use
20+
Edition
21+
};
22+
23+
// Wrap the root element with the MDXProvider
24+
export const wrapRootElement = ({ element }) => {
25+
return <MDXProvider components={components}>{element}</MDXProvider>;
26+
};

gatsby-ssr.js

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2021 Adobe. All rights reserved.
2+
* Copyright 2020 Adobe. All rights reserved.
33
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
44
* you may not use this file except in compliance with the License. You may obtain a copy
55
* of the License at http://www.apache.org/licenses/LICENSE-2.0
@@ -11,10 +11,16 @@
1111
*/
1212

1313
import React from 'react';
14-
import {withPrefix} from 'gatsby';
14+
import { MDXProvider } from '@mdx-js/react';
15+
import { Edition } from './src/@adobe/gatsby-theme-aio/components/Edition';
1516

16-
export const onRenderBody = ({setHeadComponents}) => {
17-
setHeadComponents([
18-
<script src={withPrefix('/redirections.js')}></script>
19-
]);
20-
};
17+
// Define the components that will be available in MDX files
18+
const components = {
19+
// Register the Edition component for inline use
20+
Edition
21+
};
22+
23+
// Wrap the root element with the MDXProvider
24+
export const wrapRootElement = ({ element }) => {
25+
return <MDXProvider components={components}>{element}</MDXProvider>;
26+
};

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
"remark-frontmatter": "^5.0.0",
1717
"remark-heading-id": "^1.0.1",
1818
"remark-lint-frontmatter-schema": "^3.15.4",
19-
"remark-lint-no-dead-urls": "^1.1.0",
20-
"remark-validate-links": "^13.0.1"
19+
"remark-validate-links": "13.0.1"
2120
},
2221
"scripts": {
2322
"start": "NODE_OPTIONS='--max-old-space-size=8192' gatsby build && gatsby serve",
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
/*
2+
* Copyright 2021 Adobe. All rights reserved.
3+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
4+
* you may not use this file except in compliance with the License. You may obtain a copy
5+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
6+
*
7+
* Unless required by applicable law or agreed to in writing, software distributed under
8+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9+
* OF ANY KIND, either express or implied. See the License for the specific language
10+
* governing permissions and limitations under the License.
11+
*/
12+
13+
import React from 'react';
14+
import PropTypes from 'prop-types';
15+
import '@spectrum-css/badge';
16+
import '@spectrum-css/link';
17+
import '@spectrum-css/tooltip';
18+
19+
let editionText = '';
20+
let editionColor = '';
21+
let editionTooltip = '';
22+
const EDITIONS_LINK = 'https://experienceleague.adobe.com/en/docs/commerce/user-guides/product-solutions';
23+
24+
const Edition = ({ ...props }) => {
25+
switch (props.name) {
26+
case 'paas':
27+
editionText = 'PaaS only';
28+
editionColor = 'spectrum-Badge--informative';
29+
editionTooltip = 'Applies to Adobe Commerce on Cloud (Adobe-managed PaaS infrastructure) and on-premises projects only.';
30+
break;
31+
case 'saas':
32+
editionText = 'SaaS only';
33+
editionColor = 'spectrum-Badge--positive';
34+
editionTooltip = 'Applies to Adobe Commerce as a Cloud Service and Adobe Commerce Optimizer projects only (Adobe-managed SaaS infrastructure).';
35+
break;
36+
default:
37+
editionText = 'Create an Edition tag';
38+
editionColor = 'spectrum-Badge--yellow';
39+
editionTooltip = '';
40+
}
41+
42+
return (
43+
<a
44+
href={EDITIONS_LINK}
45+
className="spectrum-Link"
46+
target="_blank"
47+
rel="noreferrer"
48+
style={{
49+
textDecoration: 'none',
50+
display: 'inline-block',
51+
marginTop: '1rem',
52+
marginRight: '0.5rem',
53+
position: 'relative'
54+
}}
55+
title={editionTooltip}
56+
>
57+
<span
58+
className={`spectrum-Badge spectrum-Badge--sizeS ${editionColor}`}
59+
style={{ paddingBottom: '4px', cursor: 'pointer' }}
60+
>
61+
{editionText}
62+
</span>
63+
</a>
64+
);
65+
};
66+
67+
Edition.propTypes = {
68+
name: PropTypes.string
69+
};
70+
71+
export { Edition };

src/_includes/backward-incompatible-changes/commerce/2.4.0-2.4.1.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#### Class changes {#ee-240-241-class}
1+
### Class changes {#ee-240-241-class}
22

33
| What changed | How it changed |
44
| -------------------------------------------------------------------- | ------------------------------------ |
@@ -11,7 +11,7 @@
1111
| Magento\ReCaptchaValidationApi\Model\ValidationErrorMessagesProvider | Class was added. |
1212
| Magento\User\Model\User::$\_cacheTag | [protected] Property has been added. |
1313

14-
#### Interface changes {#ee-240-241-interface}
14+
### Interface changes {#ee-240-241-interface}
1515

1616
| What changed | How it changed |
1717
| -------------------------------------------------------------------------------- | --------------------------------- |
@@ -22,22 +22,22 @@
2222
| Magento\Eav\Api\AttributeOptionUpdateInterface | Interface was added. |
2323
| Magento\ReCaptchaUi\Model\ErrorMessageConfigInterface | Interface was added. |
2424

25-
#### Database changes {#ee-240-241-database}
25+
### Database changes {#ee-240-241-database}
2626

2727
| What changed | How it changed |
2828
| ------------------------------------------------------------------------- | -------------------------------------------------------------------- |
2929
| login_as_customer_assistance_allowed | Table was added |
3030
| media_gallery_asset/MEDIA_GALLERY_ID_PATH_TITLE_CONTENT_TYPE_WIDTH_HEIGHT | Unique key was removed |
3131
| media_gallery_asset/constraint | Module db schema whitelist reduced (media_gallery_asset/constraint). |
3232

33-
#### Di changes {#ee-240-241-di}
33+
### Di changes {#ee-240-241-di}
3434

3535
| What changed | How it changed |
3636
| ---------------------- | ------------------------ |
3737
| mediaGalleryFilterPool | Virtual Type was removed |
3838
| mediaGalleryReporting | Virtual Type was removed |
3939

40-
#### System changes {#ee-240-241-system}
40+
### System changes {#ee-240-241-system}
4141

4242
| What changed | How it changed |
4343
| --------------------------------------------------------------- | ----------------------------------- |
@@ -60,14 +60,14 @@
6060
| recaptcha_frontend/type_recaptcha_v3/validation_failure_message | A field-node was removed |
6161
| system.xml | System configuration file was added |
6262

63-
#### XSD changes {#ee-240-241-xsd}
63+
### Xsd changes {#ee-240-241-xsd}
6464

6565
| What changed | How it changed |
6666
| ------------------ | ------------------------------ |
6767
| /etc/overrides.xsd | A schema declaration was added |
6868
| global | An optional node was added |
6969

70-
#### Class API membership changes {#ee-240-241-class-api-membership}
70+
### Class API membership changes {#ee-240-241-class-api-membership}
7171

7272
| What changed | How it changed |
7373
| -------------------------------------------------------- | ---------------- |

src/_includes/backward-incompatible-changes/commerce/2.4.1-2.4.2.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#### Class changes {#ee-241-242-class}
1+
### Class changes {#ee-241-242-class}
22

33
| What changed | How it changed |
44
| ---------------------------------------------------------------------------------------------------- | ----------------------------------------- |
@@ -18,13 +18,13 @@
1818
| Magento\Sales\Block\Order\Recent::\_\_construct | [public] Method parameter typing changed. |
1919
| Magento\Wishlist\Block\AddToWishlist::\_toHtml | [protected] Method has been removed. |
2020

21-
#### Interface changes {#ee-241-242-interface}
21+
### Interface changes {#ee-241-242-interface}
2222

2323
| What changed | How it changed |
2424
| -------------------------------------------------------------------------- | -------------------------------------- |
2525
| Magento\AdobeStockAssetApi\Api\Data\AssetInterface::getExtensionAttributes | [public] Method return typing changed. |
2626

27-
#### Database changes {#ee-241-242-database}
27+
### Database changes {#ee-241-242-database}
2828

2929
| What changed | How it changed |
3030
| ------------------------------------------------------------------------------ | ------------------------------------------------ |
@@ -38,13 +38,13 @@
3838
| test_table_one | Table was added |
3939
| test_table_two | Table was added |
4040

41-
#### Di changes {#ee-241-242-di}
41+
### Di changes {#ee-241-242-di}
4242

4343
| What changed | How it changed |
4444
| ------------------------------ | ------------------------ |
4545
| EmptyOmsTableNameArrayIterator | Virtual Type was removed |
4646

47-
#### System changes {#ee-241-242-system}
47+
### System changes {#ee-241-242-system}
4848

4949
| What changed | How it changed |
5050
| ------------------------------------------------ | ---------------------- |
@@ -57,7 +57,7 @@
5757
| web/url | A group-node was added |
5858
| web/url/catalog_media_url_format | A field-node was added |
5959

60-
#### XSD changes {#ee-241-242-xsd}
60+
### Xsd changes {#ee-241-242-xsd}
6161

6262
| What changed | How it changed |
6363
| ------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------- |
@@ -68,7 +68,7 @@
6868
| module-page-builder/etc/content_type.xsd | A schema declaration was removed |
6969
| module-page-builder/etc/content_type_merged.xsd | A schema declaration was removed |
7070

71-
#### Class API membership changes {#ee-241-242-class-api-membership}
71+
### Class API membership changes {#ee-241-242-class-api-membership}
7272

7373
| What changed | How it changed |
7474
| ------------------------------------------------------------------ | ------------------ |
@@ -81,7 +81,7 @@
8181
| Magento\ImportExport\Model\AbstractModel | Class was added. |
8282
| Magento\Review\Block\Adminhtml\Grid | Class was added. |
8383

84-
#### Interface API membership changes {#ee-241-242-interface-api-membership}
84+
### Interface API membership changes {#ee-241-242-interface-api-membership}
8585

8686
| What changed | How it changed |
8787
| ------------------------------------------------ | -------------------- |

0 commit comments

Comments
 (0)