Skip to content
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-134103 Fix Blog Regex #132

Merged
merged 1 commit into from
Jul 26, 2023
Merged

MWPW-134103 Fix Blog Regex #132

merged 1 commit into from
Jul 26, 2023

Conversation

Brandon32
Copy link
Contributor

  • Updating the html exclude regular expression to include /blog with no trailing slash
  • Previously appendHtmlPostfix was only called durring loadArea, but now that html postfix has been updated appendHtmlToLink is called more frequently with decorateLinks. [MWPW-131409] Update .html postfix milo#927
  • The Experience Cloud blog, https://business.adobe.com/blog, does not have a trailing slash and since gnav is loading fragments, fragments/gnav/resources.plain.html, the appendHtmlToLink function is now ran against the blog link.
    • Note, stage works correctly because the domains do not match.

Resolves: MWPW-134103

Test URLs:
N/A

@Brandon32 Brandon32 added the bug Something isn't working label Jul 26, 2023
@aem-code-sync
Copy link

aem-code-sync bot commented Jul 26, 2023

Hello, I'm Franklin Bot and I will run some test suites that validate the page speed.
In case there are problems, just click the checkbox below to rerun the respective action.

  • Re-run PSI Checks

@codecov-commenter
Copy link

Codecov Report

Merging #132 (8a556f5) into main (8bdf271) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #132   +/-   ##
=======================================
  Coverage   96.36%   96.36%           
=======================================
  Files           6        6           
  Lines         468      468           
=======================================
  Hits          451      451           
  Misses         17       17           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link

@overmyheadandbody overmyheadandbody left a comment

Choose a reason for hiding this comment

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

Is there no test URL that can be provided here?

@@ -127,8 +127,7 @@ const CONFIG = {
{ iframe: 'https://adobe.ideacloud.com' },
],
htmlExclude: [
/business\.adobe\.com\/blog\/.*/,
/business\.adobe\.com\/(\w\w|(\w\w_\w\w))\/blog\/.*/,
/business\.adobe\.com\/(\w\w(_\w\w)?\/)?blog(\/.*)?/,

Choose a reason for hiding this comment

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

Is it safe to assume that blog will not have pages for the africa, mena_en or mena_ar regions? This regex would not pass for those.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is it safe to assume that blog will not have pages for the africa, mena_en or mena_ar regions? This regex would not pass for those.

the dx blog only supports regions au, uk, de, fr, ko, jp, so it should be okay in this instance!

@Brandon32
Copy link
Contributor Author

Brandon32 commented Jul 26, 2023

Is there no test URL that can be provided here?

We only add .html extension in Stage and Prod so a branch is not going to show the this issue. There's the early return with DOT_HTML_PATH on line 280 so it will not reach the regex test on non-html pages.

Also you can see if you click on "Resources" in the gnav and click "Experience Cloud Blog" that the issue only appears in production, this is because the origins also have to match before it reaches the regex test, line 291.

You can take a look at the branch but the only way to test is in production or with an online regex tester.

@Brandon32 Brandon32 merged commit 10d7736 into main Jul 26, 2023
6 of 7 checks passed
@Brandon32 Brandon32 deleted the bmarshal/blog-exclude branch July 26, 2023 20:15
@Dli3 Dli3 added the verified it's been E2E tested by someone (that isn't the PR requestor) label Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working verified it's been E2E tested by someone (that isn't the PR requestor)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants