MEP Next v1#6201
Open
AdobeLinhart wants to merge 75 commits into
Open
Conversation
Pure rename to preserve git history under the new mep-next/ structure. Import path updates follow in the next commit.
Clears the path so the upcoming `git mv preview.js → mep-next.js` will be detected as a rename rather than a modification.
Pure rename to preserve full git history under mep-next/. The empty mep-next.js placeholder was removed in the prior commit so git detects this as a clean rename (100% similarity), not a modification. Import path updates follow in the next commit.
Updates 5 external callers + the moved files' own relative paths after moving preview.js/.css/.test to libs/features/mep/mep-next/mep-next.{js,css,test.js}.
Splits the 466-line M@S section (MAS_OSI_SELECTOR, market detection, card action stacks, badge injection, content observer) module. mep-next.js shrinks from 1805 → 1340 lines.
Extracts the 54-line CaaS section (CAAS_BADGE_CLASS, derivePathsForCards, injectCaasBadges, removeCaasBadges, caasObserver, watchForCaasBlocks, unwatchForCaasBlocks) into its own module. mep-next.js shrinks from 1340 → 1286 lines. Preview-host rewrite helpers (PREVIEW_HOST_RE, BLOG_PATH_RE, PREVIEW_REPO_HOST_RE, rewriteForPreviewHost, rewriteBlogPreviewHost) stay in mep-next.js — they were physically adjacent to CaaS code but are shared utilities used by the popup logic elsewhere in the file. Imports: - mep-next.js: drops mepCaasConfigUrls (only used in CaaS); adds import block from ./mep-caas.js for the 4 identifiers still referenced (injectCaasBadges, removeCaasBadges, watchForCaasBlocks, unwatchForCaasBlocks) - mep-caas.js: imports createTag from utils and mepCaasConfigUrls from caas/utils Single commit so `git log -C --find-copies-harder mep-caas.js` traces provenance back through mep-next.js → preview.js. Tests: no test file changes needed (no test references CaaS internals). mep-next (118), mep-mas-subcollection (34), and mmm tests all pass.
…observers - Remove mock-auth URL param and console.log of auth state from checkAuthAndBuild - Narrow auth gate envs from ['prod', 'stage'] to ['prod'] - Add drawer-open gate to setMasObserver callback (skip refresh work when drawer closed) - Bind MutationObservers to variables in setMasObserver and the module-scope highlight observer so future teardown is possible Addresses review comments 3439360609 (TEMP), 3463811758 (drawer gate + vaf binding), 3439387563 / 3463849068 (observer hygiene).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a complete rewrite of the MEP button.
The primary objective is to clean up the code base, decouple functions and maintain readability for future edits while implementing new features. All overlay code should live in the mep-overlay folder with shared functions eventually being moved into mep-next.js as needed.
GENERAL
AUTHENTICATION
Logged in
Logged out
MEP TAB
DRAWER
Mep Logo
Close Icon
Tabs
ACTIONS
MEP Manifest List
Highlight Toggles
Toggles
Spoof Geo
Load Manifest
Preview button
SUMMARY
Should have Page, Consent, Lingo, M@S and CaaS cards with the following data.
Page
Consent
Lingo
Resolves: MWPW-195019
Test URLs:
(Any Milo page, compare old MEP button to new MEP button.)
Psi: https://mep-next-v1--milo--adobecom.aem.page/?martech=off