Skip to content

Conversation

@echen-adobe
Copy link
Contributor

@echen-adobe echen-adobe commented Dec 12, 2025

Summary

Briefly describe the features or fixes introduced in this PR.

Replaces fragile CSS selectors such as :first-of-type in blocks to prevent certain edge cases caused by MEP overwriting content.


Jira Ticket

Resolves: https://jira.corp.adobe.com/browse/MWPW-184504


Test URLs

Env URL
Before https://main--da-express-milo--adobecom.aem.page/express/
After https://mep-audit--da-express-milo--adobecom.aem.page/docs/library/kitchen-sink/ax-columns
After https://mep-audit--da-express-milo--adobecom.aem.page/docs/library/kitchen-sink/template-x
After https://mep-audit--da-express-milo--adobecom.aem.page/docs/library/kitchen-sink/pricing-cards-v2

Verification Steps

  • Steps to reproduce the issue or view the new feature.
  • What to expect before and after the change.

Potential Regressions

  • https://--da-express-milo--adobecom.aem.live/express/?martech=off

Additional Notes

(If applicable) Add context, related PRs, or known issues here.

commit ba3fb90
Author: Eric Chen <159481679+echen-adobe@users.noreply.github.com>
Date:   Thu Dec 4 13:37:38 2025 -0600

    updated selectors for template-x

    removed usage of div first child, last child, first of type, last of type
commit c95aaca1da09e33513f9c601c98cefde15264804
Author: Eric Chen <159481679+echen-adobe@users.noreply.github.com>
Date:   Fri Dec 5 10:37:31 2025 -0600

    Update quotes.js

commit ef2ec70
Merge: de89a62 e1d0bd2
Author: Haris Bijli <all46558@adobe.com>
Date:   Thu Dec 4 10:59:56 2025 -0800

    Merge pull request #808 from adobecom/test-gen-blocks

    Test gen blocks

commit e1d0bd2
Merge: 66b62bf de89a62
Author: Haris Bijli <all46558@adobe.com>
Date:   Thu Dec 4 09:22:28 2025 -0800

    Merge branch 'stage' into test-gen-blocks

commit 66b62bf
Merge: 4e6feae c977780
Author: Haris Bijli <all46558@adobe.com>
Date:   Thu Dec 4 05:27:13 2025 -0800

    additional blocks and merge with stage

commit 4e6feae
Author: Haris Bijli <all46558@adobe.com>
Date:   Tue Dec 2 13:37:38 2025 -0800

    link-list-v2 and pricing-table

commit 190f25c
Author: Haris Bijli <all46558@adobe.com>
Date:   Sun Nov 30 20:23:05 2025 -0800

    more blocks

commit 3183867
Author: Haris Bijli <all46558@adobe.com>
Date:   Thu Nov 20 08:46:42 2025 -0800

    new blocks:

commit a4ad610
Merge: aecbecc e80982c
Author: Haris Bijli <all46558@adobe.com>
Date:   Fri Nov 14 23:27:56 2025 -0800

    Merge branch 'stage' into test-gen-blocks

    merge from stage

commit aecbecc
Merge: 0a7fc96 b6e14f1
Author: Haris Bijli <all46558@adobe.com>
Date:   Thu Nov 13 15:15:20 2025 -0800

    Merge branch 'stage' into test-gen-blocks

commit 0a7fc96
Merge: cd17dd0 5c1475d
Author: Haris Bijli <all46558@adobe.com>
Date:   Thu Nov 13 14:27:03 2025 -0800

    Merge branch 'stage' into test-gen-blocks

commit cd17dd0
Author: Haris Bijli <all46558@adobe.com>
Date:   Thu Nov 13 12:44:29 2025 -0800

    test-gen blocks
@aem-code-sync
Copy link

aem-code-sync bot commented Dec 12, 2025

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

@echen-adobe echen-adobe marked this pull request as draft December 12, 2025 18:11
@github-actions github-actions bot added the Ready for Review Ready for peer review. label Dec 12, 2025
@aem-code-sync
Copy link

aem-code-sync bot commented Dec 15, 2025

@nateyolles nateyolles added this to the Express-26.2 milestone Dec 15, 2025
@nateyolles nateyolles removed the Ready for Review Ready for peer review. label Dec 15, 2025
@echen-adobe echen-adobe changed the title Mep audit Remove Instances of first-of-type selectors Jan 5, 2026
@echen-adobe echen-adobe marked this pull request as ready for review January 12, 2026 17:52
@echen-adobe echen-adobe added the Ready for Review Ready for peer review. label Jan 12, 2026
block.querySelector('.column')?.prepend(logo);
}
}
const sections = Array.from(document.querySelectorAll('main > div > div ')).filter((section) => section.dataset.manifestId === undefined);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const sections = Array.from(document.querySelectorAll('main > div > div ')).filter((section) => section.dataset.manifestId === undefined);
const sections = Array.from(document.querySelectorAll('main > div > div')).filter((section) => section.dataset.manifestId === undefined);

function adjustTemplateDimensions(block, props, tmplt, isPlaceholder) {
const overlayCell = tmplt.querySelector(':scope > div:last-of-type');
const divs = tmplt.querySelectorAll(':scope > div');
const overlayCell = divs[2];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we always accounting there would be three divs? would it be safer to get the last one instead: const overlayCell = divs[divs.length - 1];

@fullcolorcoder
Copy link
Contributor

Can you add a more reliable list of regression testing links here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ready for Review Ready for peer review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants