Skip to content

Conversation

@RoyEJohnson
Copy link
Contributor

@RoyEJohnson RoyEJohnson commented Nov 20, 2025

CORE-1382
This is live on Staging. I wasn't expecting it to open in a new tab, but it is programmed so that portal base page links always do.

@RoyEJohnson RoyEJohnson force-pushed the core-1382-book-tile-links-on-portal-page branch from 615a7fd to 6dde5f0 Compare November 25, 2025 15:24
const EXTERNAL = /^([a-z]+:)/;
const ABSOLUTE_OPENSTAX = new RegExp(
`(?:https?://openstax.org|${window.location.origin})(?!/(?:books|accounts|oxauth|blog-feed|documents)/)`
`(?:https?://openstax.org|${window.location.origin})(?!/(?:(?:.*/)?books|accounts|oxauth|blog-feed|documents)/)`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Rex books links may have a portal prefix

className='btn go-to'
{...(track ? {'data-track': track} : {})}
data-variant={lookupVariant(variant)}
data-local="true"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This causes the Rex link to open in the current tab even though it's an "external" link.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants