-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MWPW-155566 [MEP] Changing from a new action to just expanding power of existing actions #2764
Conversation
… simplified selectors
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## MWPW-148284 #2764 +/- ##
===============================================
- Coverage 95.86% 95.86% -0.01%
===============================================
Files 173 173
Lines 45823 45847 +24
===============================================
+ Hits 43930 43950 +20
- Misses 1893 1897 +4 ☔ View full report in Codecov by Sentry. |
…L instead of just fragments (#2683) * getSelectedElement - V2 * getSelectedElement - V2 * getSelectedElement - V2 * getSelectedElement - V2 * getSelectedElement - V2 * added test coverage for action * cleanup * added comments * comments * comments * fixes erroring but still has failure * rooEl fix * fixed tests * added modifier * eslint * lint * removed reduncant try catch * Add target analytics for update action * removed test-results and added to .gitignore * reverted a deletion of a prependtosection validation code * removed comments * updated validation for appendtosdection * removed comments and eslint escapes * change modifier to an array that is not a separate column * add highight for update * add timeout to merch-card highlight * remove setTimeout and move preview.js call from loadPostLCP to loadDeferred * update unit test * remove update to git ignore * add temp console message for easy QA * MWPW-155566 [MEP] Changing from a new action to just expanding power of existing actions (#2764) * stash * use replace instead of update, allow html for create commands, update simplified selectors * streamline * remove export on MILO_BLOCKS * change prependToSection and appendToSection to just prepend and append * remove unused function param * change from includes to === * remove use of .parentElement * move spoof param test so you can reload the other tests * account for number used after dot notation * add test to insertbefore and insert after href * more coverage * more coverage * hopefully final coverage * remove console * rename checkSelectorType to getSelectorType * move parts of createContent into sub functions * small big fix * update modifySelectorTerm function per suggestion * update modifyNonFragmentSelector per suggestion * update to getSelectedElement * change equal to not equal * fix end number update * codecov * no longer require fragments be in URL for fragments because of gnav * call getModifiers in modifyNonFragmentSelector instead * require space before first flag * update unit tests to need space before flags * handle adding flags to fragment selectors * revert for demo * put back * remove utils update so it does not conflict --------- Co-authored-by: Denys Fedotov <dfedotov@Denyss-MacBook-Pro.local> Co-authored-by: vgoodric <vgoodric@adobe.com> Co-authored-by: markpadbe <markp@adobe.com> Co-authored-by: Vivian A Goodrich <101133187+vgoodric@users.noreply.github.com>
Made a new branch and PR so we can compare the 2 and decide what we want to change.
split and join the selector to add spaces around > and , for consistency
split the selector by whitespace
loop through each "term" in the selector to figure out if it starts with a simplified selector and/or ends in a child number
benefits to this approach: can recognize consumer blocks, can enforce sections are direct children of main but still handle if main is in the selector from manifest
Resolves: MWPW-148284
Since I'm no longer using a new action name, I made a new page that pulls in a new manifest. So it's easiest to compare the original page with original libs to my page with the new libs.
Also, I added the same console message to both branches so you can easily see the exact way the selector is modified for some fringe cases.
Test URLs: