Repository navigation
fix: open the new-design banner link in the same tab (#151) - #1894
Merged
Gauravjeetsingh merged 4 commits intoOct 9, 2026
Merged
Gauravjeetsingh merged 4 commits into
Gauravjeetsingh merged 4 commits into
Conversation
Push to prod: Redirect to newer sttm design, if the user has opened the newer design.
…undation#151) The "Try the new design" banner link opened next.sikhitothemax.org without setting the sttm_design cookie, so users who opted in from the banner were never redirected on later visits. Only the home page's "Try it now" link set it. Banner now takes an optional onLinkClick, and NewDesignBanner passes rememberNewDesign.
…-design-banner-remember fix: remember the new-design choice from the top banner too (KhalisFoundation#151)
…n#151) Match the home page's "Try it now" link. Banner gets an optional sameTab that renders a plain <a>, since react-router's <Link> would treat an external URL opened in the same tab as an in-app route. Other banners still open in a new tab.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The top banner's "Try the new design" link opens next.sikhitothemax.org in a new tab. The home page's "Try it now" link opens it in the same tab. Follow-up to #1893, which made the banner remember the choice.
Fix
Bannertakes an optionalsameTab, which renders a plain<a>. react-router's<Link>would treat an external URL opened in the same tab as an in-app route.NewDesignBannerpassessameTab. The other banners (main page, Shabadavali, shabad page) still open in a new tab.Testing
Ran this branch locally (production build, local server) with
www.sikhitothemax.org/sikhitothemax.orgpointed at it, in a clean headless Chromium:target. Clicking it goes to next in the same tab, with no new tab opened.sttm_design=newon.sikhitothemax.org, and the old site then redirects/shabad?id=1to next.