You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The issue of URL routing has been discussed in the multi-branding strategy. The issue is related to the fact that multiple links within AS.com are hard-routed to www.alaskaair.com
Describe the solution you'd like
Currently, when a user of auro-hyperlink adds a href to the UI, it's not simply passed through to the internal <a> element, but it is run through a series of functions to ensure that the URL is written correctly to meet web security standards.
We can leverage this to dynamically look for the page's hostname. Instead of hard-coding the inserted hostname as we currently do, this would be more aware of the hostname of the page be it alaskaair.com or hawaiian.com, and on page render update the href to be the correct domain.
This update would also address many issues that teams have about testing code on lower QA environments where links are being hard-coded to AS.com and when tests are run, the test leaves the QA environment and causes issues with the tests.
Looking at the current footer, for example, some links look like this:
<auro-hyperlinkondark="true" href="https://www.alaskaair.com/content/about-us" type="nav" external="false">Who we are</auro-hyperlink>
That will have this code in the shadow DOM:
<apart="link" class=" hyperlink hyperlink--nav hyperlink--ondark " href="https://www.alaskaair.com/content/about-us"><slot>Who we are</slot></a>
With this update, authors would not have to update their href code, but on the fly, the https://www.alaskaair.com/ would be converted to be hawaiian.com and the shadow DOM href would look like this.
<apart="link" class=" hyperlink hyperlink--nav hyperlink--ondark " href="https://www.hawaiian.com/content/about-us"><slot>Who we are</slot></a>
Describe alternatives you've considered
Asking all teams to manually update their HREF code.
Additional context
There is another feature request that should be considered be done at the same time.
The default behavior now dynamically adjusts a URL's `hostname` to
match the current page if the `origin` attribute is not specified,
as the new default for `origin` is `dynamic`. Previously, URLs
relied solely on the `hostname` defined in the `href` attribute,
but with this change, links will adapt to the environment
(e.g., development, staging, or production).
The purpose of this update was to allow for dynamic resetting of
absolute HREFs when links are intended to work within the new
multi-theme experiences.
On branch dsande/dynamichostname/243
Changes to be committed:
modified: src/auro-hyperlink.js
modified: src/component-base.mjs
Is your feature request related to a problem? Please describe.
The issue of URL routing has been discussed in the multi-branding strategy. The issue is related to the fact that multiple links within AS.com are hard-routed to www.alaskaair.com
Describe the solution you'd like
Currently, when a user of auro-hyperlink adds a href to the UI, it's not simply passed through to the internal
<a>
element, but it is run through a series of functions to ensure that the URL is written correctly to meet web security standards.We can leverage this to dynamically look for the page's
hostname
. Instead of hard-coding the inserted hostname as we currently do, this would be more aware of the hostname of the page be italaskaair.com
orhawaiian.com
, and on page render update the href to be the correct domain.This update would also address many issues that teams have about testing code on lower QA environments where links are being hard-coded to AS.com and when tests are run, the test leaves the QA environment and causes issues with the tests.
Looking at the current footer, for example, some links look like this:
That will have this code in the shadow DOM:
With this update, authors would not have to update their href code, but on the fly, the
https://www.alaskaair.com/
would be converted to behawaiian.com
and the shadow DOM href would look like this.Describe alternatives you've considered
Asking all teams to manually update their HREF code.
Additional context
There is another feature request that should be considered be done at the same time.
href
attribute #241Exit criteria
Dynamic Hostname Resolution:
auro-hyperlink
dynamically updateshref
based on the page’s hostname (alaskaair.com
,hawaiian.com
, etc.).Shadow DOM Updates:
href
correctly for all domains.Web Security Compliance:
QA Environment Compatibility:
Backward Compatibility:
auro-hyperlink
implementations require no manual updates.Documentation & Testing:
Cross-Team Coordination:
Deployment:
The text was updated successfully, but these errors were encountered: