From fddcc63e3ee5946525d2c02ff68fe34d9630a9c6 Mon Sep 17 00:00:00 2001 From: fkakatie Date: Thu, 5 Feb 2026 10:32:13 -0800 Subject: [PATCH 1/5] feat!: remove decorateButtons export --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index abc76c1..7a4f0f8 100644 --- a/src/index.js +++ b/src/index.js @@ -22,7 +22,7 @@ export { decorateTemplateAndTheme, wrapTextNodes, } from './dom-utils.js'; -export { decorateButtons, decorateIcons, decorateSections } from './decorate.js'; +export { decorateIcons, decorateSections } from './decorate.js'; export { sampleRUM } from '@adobe/helix-rum-js'; export { buildBlock, From a691de7346e66d7c3ab844a1fc6c3bade98f4b25 Mon Sep 17 00:00:00 2001 From: fkakatie Date: Thu, 5 Feb 2026 10:32:45 -0800 Subject: [PATCH 2/5] feat!: remove decorateButtons function --- src/decorate.js | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/src/decorate.js b/src/decorate.js index b4a951f..ac43a54 100644 --- a/src/decorate.js +++ b/src/decorate.js @@ -13,36 +13,6 @@ import { toCamelCase, toClassName } from './utils.js'; import { readBlockConfig } from './block-utils.js'; -/** - * Decorates paragraphs containing a single link as buttons. - * @param {Element} element container element - */ -export function decorateButtons(element) { - element.querySelectorAll('a').forEach((a) => { - a.title = a.title || a.textContent; - if (a.href !== a.textContent) { - const up = a.parentElement; - const twoup = a.parentElement.parentElement; - if (!a.querySelector('img')) { - if (up.childNodes.length === 1 && (up.tagName === 'P' || up.tagName === 'DIV')) { - a.className = 'button'; // default - up.classList.add('button-container'); - } - if (up.childNodes.length === 1 && up.tagName === 'STRONG' - && twoup.childNodes.length === 1 && twoup.tagName === 'P') { - a.className = 'button primary'; - twoup.classList.add('button-container'); - } - if (up.childNodes.length === 1 && up.tagName === 'EM' - && twoup.childNodes.length === 1 && twoup.tagName === 'P') { - a.className = 'button secondary'; - twoup.classList.add('button-container'); - } - } - } - }); -} - /** * Add for icon, prefixed with codeBasePath and optional prefix. * @param {Element} [span] span element with icon classes From 6cd38e19fb956636584e5ff4b72959525557b1cc Mon Sep 17 00:00:00 2001 From: fkakatie Date: Thu, 5 Feb 2026 10:33:46 -0800 Subject: [PATCH 3/5] chore: remove decorateButtons tests --- test/decorate/decorateButtons.test.html | 117 ------------------------ 1 file changed, 117 deletions(-) delete mode 100644 test/decorate/decorateButtons.test.html diff --git a/test/decorate/decorateButtons.test.html b/test/decorate/decorateButtons.test.html deleted file mode 100644 index 8f18d8d..0000000 --- a/test/decorate/decorateButtons.test.html +++ /dev/null @@ -1,117 +0,0 @@ - - - -
-

Congrats, you are ready to go!

-

Your forked repo is setup as an AEM project and you are ready to start developing.
The content you are looking at is served from this gdrive

Adjust the fstab.yaml to point to a folder either in your shared sharepoint or your shared gdrive. See the full tutorial here:

https://www.aem.live/tutorial

-

This is another headline here for more content

-
-
-
-

Columns block

-
    -
  • One
  • -
  • Two
  • -
  • Three
  • -
-

Button

-
-
-

Live

-

Preview

-
-
-
-
-
-

Boilerplate Highlights?

-

Find some of our favorite staff picks below:

-
-
-
-

Unmatched speed

-

The fastest way to publish, create, and serve websites

-
-
-
-
-

Content at scale

-

Publish more content in shorter time with smaller teams

-
-
-
-
-

Uncertainty eliminated

-

Preview content at 100% fidelity, get predictable content velocity, and shorten project durations

-
-
-
-
-

Widen the talent pool

-

Authors use Microsoft Word, Excel or Google Docs and need no training

-
-
-
-
-

The low-code way to developer productivity

-

Say goodbye to complex APIs spanning multiple languages. Anyone with a little bit of HTML, CSS, and JS can build a site.

-
-
-
-
-

Headless is here

-

Go directly from Microsoft Excel or Google Sheets to the web in mere seconds. Sanitize and collect form data at extreme scale forms.

-
-
-
-
-

Peak performance

-

Use serverless architecture to meet any traffic need. Use the PageSpeed Insights Github action to evaluate every Pull-Request for Lighthouse Score.

-
-
-
- -
- - - From f0318933e9204e668026d6b629f7318373bfc4a2 Mon Sep 17 00:00:00 2001 From: fkakatie Date: Thu, 12 Feb 2026 11:40:03 -0700 Subject: [PATCH 4/5] docs: add migration guide for v3.0.0 BREAKING CHANGE: The decorateButtons function has been removed. See MIGRATION.md for upgrade instructions. Ref: adobe/aem-boilerplate#585 --- MIGRATION.md | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 MIGRATION.md diff --git a/MIGRATION.md b/MIGRATION.md new file mode 100644 index 0000000..77dc1f2 --- /dev/null +++ b/MIGRATION.md @@ -0,0 +1,71 @@ +# Migration Guide + +Migration instructions for breaking changes in `@adobe/aem-lib`. + +**Note:** This guide is for projects that **manually update `aem.js`**. + +--- + +## [3.0.0](https://github.com/adobe/aem-lib/compare/v2.10.6...v3.0.0) (TBD) + +### BREAKING CHANGE: Removed `decorateButtons` function + +The `decorateButtons` function has been completely removed. ([view removal](https://github.com/adobe/aem-lib/commit/a691de7)) + +**Why:** Button decoration is presentation logic that belongs in customizable project code, not in a shared library. + +**Related:** [adobe/aem-boilerplate#585](https://github.com/adobe/aem-boilerplate/pull/585) + +--- + +#### What breaks + +If you upgrade `aem.js` to v3.x: + +- Imports of `decorateButtons` will fail +- Calls to `decorateButtons()` will fail +- Links will not get button CSS classes (`.button`, `.button-container`, `.primary`, `.secondary`) + +If you're **not** manually upgrading `aem.js`, nothing breaks. + +--- + +#### How to fix it + +**Option 1: Use the new implementation** (Recommended) + +New opt-in pattern where authors format links to indicate button intent. + +1. Copy new `decorateButtons` to `scripts.js`: [View code](https://github.com/adobe/aem-boilerplate/pull/585/files) +2. Update imports to reference `scripts.js` instead of `aem.js` +3. **Optional:** Adopt new button styles: [View styles](https://github.com/adobe/aem-boilerplate/pull/585/files) +4. **Important:** Plain links will NOT auto-buttonize. If your content relies on auto-buttonization, you'll need to update your content. Authors must format links to create buttons: + - **Bold** = Primary button + - *Italic* = Secondary button + - ***Bold + italic*** = Accent button + - Plain link = Stays a link + +--- + +**Option 2: Use the old implementation** + +Keeps everything working exactly as before. + +1. Copy old `decorateButtons` to `scripts.js`: [View code](https://github.com/adobe/aem-lib/blob/fddcc63e3ee5946525d2c02ff68fe34d9630a9c6/src/decorate.js#L16-L44) +2. Update imports to reference `scripts.js` instead of `aem.js` +3. No other changes needed (CSS and content stay the same) + +--- + +**Option 3: Remove button decoration** + +1. Remove all imports of `decorateButtons` +2. Remove all calls to `decorateButtons()` +3. No other changes needed (links stay as links, button CSS won't apply) + +--- + +#### Need help? + +- See [boilerplate PR #585](https://github.com/adobe/aem-boilerplate/pull/585) for implementation details +- [Open an issue](https://github.com/adobe/aem-lib/issues) From 2148e4eeea23a27a7b33bbff1631e7184e71c89f Mon Sep 17 00:00:00 2001 From: Katie Sexton Date: Thu, 19 Feb 2026 09:09:45 -0700 Subject: [PATCH 5/5] docs: update migration guide for version 3.0.0 Updated version number and removal date for migration guide. --- MIGRATION.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MIGRATION.md b/MIGRATION.md index 77dc1f2..7d15c29 100644 --- a/MIGRATION.md +++ b/MIGRATION.md @@ -6,7 +6,7 @@ Migration instructions for breaking changes in `@adobe/aem-lib`. --- -## [3.0.0](https://github.com/adobe/aem-lib/compare/v2.10.6...v3.0.0) (TBD) +## [3.0.0](https://github.com/adobe/aem-lib/compare/v2.10.6...v3.0.0) (19/02/2026) ### BREAKING CHANGE: Removed `decorateButtons` function