Skip to content

Commit 6089f96

Browse files
sdmcraftshsteimerrenovate[bot]tripodsankptdobe
authored
Aem assets plugin (#111)
* add css rules to hide header and footer until they are loaded * chore(deps): update dependency stylelint to v16.1.0 (adobe#314) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update dependency stylelint-config-standard to v36 (adobe#315) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update dependency chai to v5 (adobe#316) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update dependency @babel/core to v7.23.7 (adobe#317) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update dependency semantic-release to v23 (adobe#320) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore: update node version (adobe#321) * chore: update node version * chore: use node 20 * chore: get rid of semantic release (adobe#322) * fix(lib): update scripts/aem.js to [email protected] Test URL: https://update-lib-aem-patch-1-5-1--aem-boilerplate--adobe.hlx.live/ Release Notes: https://github.com/adobe/aem-lib/releases/tag/v1.5.1 * chore(doc): link to cli in README (adobe#330) * chore(deps): update dependency stylelint to v16.2.1 (adobe#324) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update dependency chai to v5.1.0 (adobe#328) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update babel monorepo (adobe#329) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update dependency eslint to v8.57.0 (adobe#333) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update dependency stylelint to v16.3.1 (adobe#341) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update babel monorepo (adobe#340) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * Update cleanup-on-create.yaml * Update cleanup-on-create.yaml * Update cleanup-on-create.yaml * chore(deps): update dependency @babel/core to v7.24.4 (adobe#342) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix: header/footer fragment loading (#13) * chore: unify header/footer decoration * fix(lib): update scripts/aem.js to [email protected] Test URL: https://update-lib-aem-patch-1-5-4--aem-boilerplate--adobe.hlx.live/ Release Notes: https://github.com/adobe/aem-lib/releases/tag/v1.5.4 * fix: cards fail if text contains an icon * fix(404): do not include target, as it is redundant with URL * fix: clarify eslint rules * feat: add quote parity with eslint in stylelint * chore: lint * fix: remove unused rule * fix: remove deprecated root var * feat: added updated fonts * fix: apply s2 font styles * fix: increase body font size * chore: unify color vars against s2 spec * fix: increase color contrast between bg and link * fix: increase contrast between link and text * fix: unify container padding, margins, radius * chore(deps): update dependency stylelint to v16.6.1 (adobe#356) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update babel monorepo to v7.24.6 (adobe#358) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update dependency chai to v5.1.1 (adobe#360) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update babel monorepo to v7.24.7 (adobe#367) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * fix: link color meets background AND text contrast reqs * chore: remove unused dep (adobe#368) * fix: close the nav when it loses focus, e.g keyboard user tabs out of it * fix: manual patch of sampleRUM (adobe#370) * feat: better error tracking (adobe#375) * feat(lib): update scripts/aem.js to [email protected] (adobe#378) Test URL: https://update-lib-aem-minor-2-3-0--aem-boilerplate--adobe.hlx.live/ Release Notes: https://github.com/adobe/aem-lib/releases/tag/v2.3.0 Co-authored-by: semantic-release-bot <[email protected]> * feat: section loader * chore(deps): update dependency stylelint to v16.7.0 (adobe#381) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update dependency @babel/eslint-parser to v7.24.8 (adobe#380) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update dependency stylelint-config-standard to v36.0.1 (adobe#373) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * feat(lib): update scripts/aem.js to [email protected] (adobe#383) Test URL: https://update-lib-aem-minor-2-5-0--aem-boilerplate--adobe.hlx.live/ Release Notes: https://github.com/adobe/aem-lib/releases/tag/v2.5.0 Co-authored-by: semantic-release-bot <[email protected]> * feat: use rum js v2 (adobe#371) * fix: a11y contrast fix * chore: lint * fix: a styles * chore: lint * chore: a11y colors * fix: border color on cards * fix: a11y header, ul > li role * fix(lib): update scripts/aem.js to [email protected] (adobe#388) Test URL: https://update-lib-aem-patch-2-5-1--aem-boilerplate--adobe.hlx.live/ Release Notes: https://github.com/adobe/aem-lib/releases/tag/v2.5.1 Co-authored-by: semantic-release-bot <[email protected]> * chore(deps): update dependency @babel/eslint-parser to v7.25.1 (adobe#385) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore(deps): update dependency stylelint to v16.8.1 (adobe#386) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * chore: add editor config (adobe#353) * updating url to .aem.live from .hlx.live * docs: updating the preview and live urls in readme to .aem.page and .aem.live * fix(lib): update scripts/aem.js to [email protected] (adobe#391) Test URL: https://update-lib-aem-patch-2-5-2--aem-boilerplate--adobe.hlx.live/ Release Notes: https://github.com/adobe/aem-lib/releases/tag/v2.5.2 Co-authored-by: semantic-release-bot <[email protected]> * chore(deps): update dependency stylelint to v16.8.2 (adobe#389) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * docs(readme): use correct AEM Live link * chore(github): update pull request template to use aem.live * Squashed 'plugins/aem-assets-plugin/' content from commit 2bf7be5 git-subtree-dir: plugins/aem-assets-plugin git-subtree-split: 2bf7be5 * feat: Integrate asem-assets plugin * Add linting exception for videojs * Ignore videojs from linting --------- Co-authored-by: Sean Steimer <[email protected]> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Tobias Bocanegra <[email protected]> Co-authored-by: Alexandre Capt <[email protected]> Co-authored-by: semantic-release-bot <[email protected]> Co-authored-by: dylandepass <[email protected]> Co-authored-by: Katie Sexton <[email protected]> Co-authored-by: gargadobe <[email protected]> Co-authored-by: Dirk Rudolph <[email protected]> Co-authored-by: Lars Trieloff <[email protected]> Co-authored-by: adobe-bot <[email protected]> Co-authored-by: David Nuescheler <[email protected]> Co-authored-by: Simon Sippert <[email protected]> Co-authored-by: Kiran Murugulla <[email protected]> Co-authored-by: Satya Deep Maheshwari <[email protected]>
1 parent d778732 commit 6089f96

Some content is hidden

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

51 files changed

+8846
-16591
lines changed

.editorconfig

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[*.js]
2+
indent_size = 2
3+
4+
[*.css]
5+
indent_size = 4

.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
helix-importer-ui
2+
plugins/aem-assets-plugin/blocks/video/videojs
23
blocks/video/videojs

.eslintrc.js

+3-6
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,8 @@ module.exports = {
1111
requireConfigFile: false,
1212
},
1313
rules: {
14-
// allow reassigning param
15-
'no-param-reassign': [2, { props: false }],
16-
'linebreak-style': ['error', 'unix'],
17-
'import/extensions': ['error', {
18-
js: 'always',
19-
}],
14+
'import/extensions': ['error', { js: 'always' }], // require js file extensions in imports
15+
'linebreak-style': ['error', 'unix'], // enforce unix linebreaks
16+
'no-param-reassign': [2, { props: false }], // allow modifying properties of param
2017
},
2118
};

.github/pull_request_template.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ Please always provide the [GitHub issue(s)](../issues) your PR is for, as well a
33
Fix #<gh-issue-id>
44

55
Test URLs:
6-
- Before: https://main--{repo}--{owner}.hlx.live/
7-
- After: https://<branch>--{repo}--{owner}.hlx.live/
6+
- Before: https://main--{repo}--{owner}.aem.live/
7+
- After: https://<branch>--{repo}--{owner}.aem.live/

.github/workflows/cleanup-on-create.yaml

+5-9
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,26 @@ on:
66
create:
77
branches:
88
- main
9+
workflow_dispatch:
910
jobs:
1011
cleanup:
1112
runs-on: ubuntu-latest
1213
permissions:
1314
contents: write
1415
actions: write
1516
# only run if commit message is "Initial commit" on main branch
16-
if: ${{ github.ref == 'refs/heads/main' && github.event.head_commit.message == 'Initial commit' }}
17+
if: ${{ github.event_name == 'workflow_dispatch' || ( github.ref == 'refs/heads/main' && !(contains(github.event, 'head_commit') || github.event.head_commit.message == 'Initial commit' )) }}
1718
steps:
1819
- name: Checkout
1920
uses: actions/checkout@v4
20-
- name: Use Node.js 18
21+
- name: Use Node.js 20
2122
uses: actions/setup-node@v4
2223
with:
23-
node-version: 18
24-
- name: Uninstall dependencies
25-
run: |
26-
npm uninstall --save-dev semantic-release @semantic-release/git @semantic-release/changelog @semantic-release/exec
24+
node-version: 20
2725
- name: Remove Helper Files
2826
run: |
2927
rm -rf \
3028
.github/workflows/cleanup-on-create.yaml \
31-
.github/workflows/semantic-release.yaml \
32-
.releaserc.cjs \
3329
CHANGELOG.md
3430
3531
- name: Initialize README
@@ -47,7 +43,7 @@ jobs:
4743
- name: Commit changes
4844
run: |
4945
git config --local user.email "[email protected]"
50-
git config --local user.name "Helix Bot"
46+
git config --local user.name "AEM Bot"
5147
git add .
5248
git commit -m "chore: cleanup repository template"
5349
git push

.github/workflows/main.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Build
2+
on: [push]
3+
4+
jobs:
5+
build:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v4
9+
- name: Use Node.js 20
10+
uses: actions/setup-node@v4
11+
with:
12+
node-version: 20
13+
- run: npm ci
14+
- run: npm run lint

.github/workflows/run-tests.yaml

-17
This file was deleted.

.github/workflows/semantic-release.yaml

-23
This file was deleted.

.releaserc.cjs

-18
This file was deleted.

.stylelintrc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
22
"extends": ["stylelint-config-standard"]
3-
}
3+
}

404.html

+5-4
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
<meta property="og:title" content="Page not found">
1212
<script src="/scripts/scripts.js" type="module" crossorigin="use-credentials"></script>
1313
<script type="module">
14-
import { sampleRUM } from '/scripts/aem.js';
15-
1614
window.addEventListener('load', () => {
1715
if (document.referrer) {
1816
const { origin, pathname } = new URL(document.referrer);
@@ -26,9 +24,12 @@
2624
btnContainer.append(backBtn);
2725
}
2826
}
29-
sampleRUM('404', { source: document.referrer, target: window.location.href });
3027
});
3128
</script>
29+
<script type="module">
30+
import { sampleRUM } from '/scripts/aem.js';
31+
sampleRUM('404', { source: document.referrer });
32+
</script>
3233
<link rel="stylesheet" href="/styles/styles.css">
3334
<style>
3435
main.error {
@@ -42,7 +43,7 @@
4243
}
4344

4445
main.error .error-number text {
45-
font-family: var(--fixed-font-family);
46+
font-family: monospace;
4647
}
4748
</style>
4849
<link rel="stylesheet" href="/styles/lazy-styles.css">

CHANGELOG.md

-58
This file was deleted.

CONTRIBUTING.md

-1
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,3 @@ One of the maintainers will look at the pull request within one week. Feedback o
7171
The project's committers will release to the [Adobe organization on npmjs.org](https://www.npmjs.com/org/adobe).
7272
Please contact the [Adobe Open Source Advisory Board](https://git.corp.adobe.com/OpenSourceAdvisoryBoard/discuss/issues) to get access to the npmjs organization.
7373

74-
The release process is fully automated using `semantic-release`, increasing the version numbers, etc. based on the contents of the commit messages found.

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ Integration between AEM Asset Selector and AEM Franklin to make AEM assets avail
88
![High Level Flow](/resources/using-asset-selector-with-franklin.jpeg)
99

1010
## Environments
11-
- Preview: https://main--{repo}--{owner}.hlx.page/
12-
- Live: https://main--{repo}--{owner}.hlx.live/
11+
- Preview: https://main--{repo}--{owner}.aem.page/
12+
- Live: https://main--{repo}--{owner}.aem.live/
1313

1414
## Installation
1515

@@ -27,7 +27,7 @@ npm run lint
2727

2828
1. Create a new repository based on the `aem-boilerplate` template and add a mountpoint in the `fstab.yaml`
2929
1. Add the [AEM Code Sync GitHub App](https://github.com/apps/aem-code-sync) to the repository
30-
1. Install the [AEM CLI](https://github.com/adobe/aem-cli): `npm install -g @adobe/aem-cli`
30+
1. Install the [AEM CLI](https://github.com/adobe/helix-cli): `npm install -g @adobe/aem-cli`
3131
1. Start AEM Proxy: `aem up` (opens your browser at `http://localhost:3000`)
3232
1. Open the `{repo}` directory in your favorite IDE and start coding :)
3333

blocks/cards/cards.css

+4-8
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
margin: 0;
44
padding: 0;
55
display: grid;
6-
grid-template-columns: repeat(auto-fill, minmax(278px, 1fr));
7-
grid-gap: 16px;
6+
grid-template-columns: repeat(auto-fill, minmax(257px, 1fr));
7+
grid-gap: 24px;
88
}
99

1010
.cards > ul > li {
11-
border: 1px solid var(--dark-color);
12-
background-color: var(--background-color)
11+
border: 1px solid #dadada;
12+
background-color: var(--background-color);
1313
}
1414

1515
.cards .cards-card-body {
@@ -20,10 +20,6 @@
2020
line-height: 0;
2121
}
2222

23-
.cards .cards-card-body > *:first-child {
24-
margin-top: 0;
25-
}
26-
2723
.cards > ul > li img {
2824
width: 100%;
2925
aspect-ratio: 4 / 3;

blocks/cards/cards.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default function decorate(block) {
1212
});
1313
ul.append(li);
1414
});
15-
ul.querySelectorAll('img').forEach((img) => img.closest('picture').replaceWith(createOptimizedPicture(img.src, img.alt, false, [{ width: '750' }])));
15+
ul.querySelectorAll('picture > img').forEach((img) => img.closest('picture').replaceWith(createOptimizedPicture(img.src, img.alt, false, [{ width: '750' }])));
1616
block.textContent = '';
1717
block.append(ul);
1818
}

blocks/columns/columns.css

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
.columns > div {
2424
align-items: center;
2525
flex-direction: unset;
26-
gap: 32px;
26+
gap: 24px;
2727
}
2828

2929
.columns > div > div {

blocks/footer/footer.css

+10-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
footer {
2-
padding: 2rem;
32
background-color: var(--light-color);
4-
font-size: var(--body-font-size-s);
3+
font-size: var(--body-font-size-xs);
54
}
65

7-
footer .footer {
8-
max-width: 1200px;
6+
footer .footer > div {
97
margin: auto;
8+
max-width: 1200px;
9+
padding: 40px 24px 24px;
1010
}
1111

1212
footer .footer p {
1313
margin: 0;
1414
}
15+
16+
@media (width >= 900px) {
17+
footer .footer > div {
18+
padding: 40px 32px 24px;
19+
}
20+
}

blocks/footer/footer.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,13 @@ import { loadFragment } from '../fragment/fragment.js';
66
* @param {Element} block The footer block element
77
*/
88
export default async function decorate(block) {
9+
// load footer as fragment
910
const footerMeta = getMetadata('footer');
10-
block.textContent = '';
11-
12-
// load footer fragment
13-
const footerPath = footerMeta.footer || '/footer';
11+
const footerPath = footerMeta ? new URL(footerMeta, window.location).pathname : '/footer';
1412
const fragment = await loadFragment(footerPath);
1513

1614
// decorate footer DOM
15+
block.textContent = '';
1716
const footer = document.createElement('div');
1817
while (fragment.firstElementChild) footer.append(fragment.firstElementChild);
1918

blocks/fragment/fragment.css

+1-13
Original file line numberDiff line numberDiff line change
@@ -1,13 +1 @@
1-
/* suppress nested section padding */
2-
.fragment-wrapper > .section {
3-
padding-left: 0;
4-
padding-right: 0;
5-
}
6-
7-
.fragment-wrapper > .section:first-of-type {
8-
padding-top: 0;
9-
}
10-
11-
.fragment-wrapper > .section:last-of-type {
12-
padding-bottom: 0;
13-
}
1+
/* stylelint-disable no-empty-source */

blocks/fragment/fragment.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
} from '../../scripts/scripts.js';
1010

1111
import {
12-
loadBlocks,
12+
loadSections,
1313
} from '../../scripts/aem.js';
1414

1515
/**
@@ -34,7 +34,7 @@ export async function loadFragment(path) {
3434
resetAttributeBase('source', 'srcset');
3535

3636
decorateMain(main);
37-
await loadBlocks(main);
37+
await loadSections(main);
3838
return main;
3939
}
4040
}

0 commit comments

Comments
 (0)