hlxsites / sunstar-foundation

Apache License 2.0
0 stars 2 forks source link

Issue 214 Open link in new tab logic #219

Closed shrotia closed 9 months ago

shrotia commented 9 months ago

open links in a new window when user navigates from /en or /dentistry and vice versa.

Fixes #214

Test URLs:

aem-code-sync[bot] commented 9 months ago

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.

Commits * [49319ef](https://github.com/hlxsites/sunstar-foundation/pull/219/commits/49319ef461963542637db47eb56d27323d4f8fdc) :white_check_mark: (latest) * [61c750f](https://github.com/hlxsites/sunstar-foundation/pull/219/commits/61c750f72586adc93b0684886c73ba2a7fc9cb7b) :white_check_mark: * [c752cba](https://github.com/hlxsites/sunstar-foundation/pull/219/commits/c752cba6ec30ed41fb01030541c2e6c237af6674) :white_check_mark:
aem-code-sync[bot] commented 9 months ago
Page Scores Audits Google
/ PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
bosschaert commented 9 months ago

Note that these changes would benefit from unit tests, especially since its not so easy to spot if it breaks.

shrotia commented 9 months ago

Note that these changes would benefit from unit tests, especially since its not so easy to spot if it breaks.

Yes, I agree. Let me add test cases as well.

RitwikSrivastava commented 9 months ago

@shrotia On dentistry site, if a user navigates to the dentistry nav items, that also opens in a new page. (behaviour differs form the original site)

github-actions[bot] commented 9 months ago

:small_orange_diamond: 1 visual difference detected

The diff images are attached in the artifact

shrotia commented 9 months ago

@shrotia On dentistry site, if a user navigates to the dentistry nav items, that also opens in a new page. (behaviour differs form the original site)

Yes, right, that is happening on the main branch too: https://main--sunstar-foundation--hlxsites.hlx.live/dentistry

The reason of that is in the code (not related to this PR) : https://github.com/hlxsites/sunstar-foundation/blob/49319ef461963542637db47eb56d27323d4f8fdc/scripts/scripts.js#L365-L368 and it will work fine once site will be opened with the final domain i.e. https://www.sunstar-foundation.org/