Skip to content

fix: open the new-design banner link in the same tab (#151) - #1894

Merged
Gauravjeetsingh merged 4 commits into
KhalisFoundation:devfrom
divyanshugarg36:fix/new-design-banner-same-tab
Oct 9, 2026
Merged

Gauravjeetsingh merged 4 commits into
KhalisFoundation:devfrom
divyanshugarg36:fix/new-design-banner-same-tab

Conversation

@divyanshugarg36

Copy link
Copy Markdown
Collaborator

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

  • Banner takes an optional sameTab, which renders a plain <a>. react-router's <Link> would treat an external URL opened in the same tab as an in-app route.
  • NewDesignBanner passes sameTab. 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.org pointed at it, in a clean headless Chromium:

  • The banner link has no target. Clicking it goes to next in the same tab, with no new tab opened.
  • It still sets sttm_design=new on .sikhitothemax.org, and the old site then redirects /shabad?id=1 to next.
  • Unit tests pass (pre-commit hook).

Gauravjeetsingh and others added 4 commits September 22, 2026 12:56
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.
@Gauravjeetsingh
Gauravjeetsingh changed the base branch from master to dev October 9, 2026 20:28
@Gauravjeetsingh
Gauravjeetsingh merged commit 6f723d0 into KhalisFoundation:dev Oct 9, 2026
1 of 2 checks passed
@divyanshugarg36
divyanshugarg36 deleted the fix/new-design-banner-same-tab branch October 12, 2026 08:52
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