Skip to content

Add Leaderboard nav + linkout icons (current-tab) + sitemap fix#14

Merged
radinhamidi merged 1 commit intochore/copy-polishfrom
chore/nav-and-sitemap-stacked
Apr 30, 2026
Merged

Add Leaderboard nav + linkout icons (current-tab) + sitemap fix#14
radinhamidi merged 1 commit intochore/copy-polishfrom
chore/nav-and-sitemap-stacked

Conversation

@radinhamidi
Copy link
Copy Markdown
Member

Summary

Three user-requested polish items.

1. Marketing nav: add Leaderboard alongside Dashboard

Both render an external-link icon and open in the current tab (not a new tab). Users can middle-click / cmd-click for a new tab when they want one — silently opening tabs is a worse default.

2. Leaderboard nav: Toolkit gets the linkout icon, current-tab

Same treatment for the cross-link to `querygym.com`.

3. Sitemap visibility

`sitemap-index.xml` is the standard top-level entry per Sitemaps protocol — it only points at `sitemap-0.xml`, where the actual URLs live. Visiting the index in a browser looks empty.

Updated:

  • `` in the layout now points at `/sitemap-0.xml` (the populated file).
  • `robots.txt` lists both `sitemap-0.xml` and `sitemap-index.xml` (crawlers handle either).

Header component change

Added a `newTab` prop separate from `external`:

  • `external: true` → renders the linkout icon (visual cue).
  • `newTab: true` → adds `target="_blank"` + `rel="noopener noreferrer"`.

These are independent because most cross-site links should show "I lead off-site" without forcing a new tab.

Stacked on #13

Base is `chore/copy-polish` (PR #13). Once that merges this PR's diff narrows to the five files actually changed here.

Test plan

  • `pnpm -F @qg/site build`: marketing nav has Install/Methods/Reproducibility/Cite/Docs↗/Leaderboard↗/Dashboard↗ — none with `target="_blank"`.
  • `pnpm -F @qg/leaderboard build`: leaderboard nav has Datasets/Methods/Models/About/Toolkit↗ with icon, no `target="_blank"`.
  • `` points at `/sitemap-0.xml`.
  • `robots.txt` lists both sitemap URLs.
  • Post-deploy: `https://querygym.com/sitemap-0.xml\` shows all 6 URLs when visited directly.

🤖 Generated with Claude Code

Three pieces of user-requested polish:

1. Marketing nav: add Leaderboard alongside Dashboard, both with the
   linkout arrow icon and opening in the current tab. Drop the
   trailing "↗" from the old "Dashboard ↗" label since the icon now
   conveys it.

2. Leaderboard nav: keep the Toolkit link (re-added earlier), with
   the same linkout icon, current-tab.

3. Header component: add a `newTab` prop separate from `external`.
   `external` controls icon rendering only; `newTab` controls
   target/rel. Default behavior is current-tab — let users
   middle-click / cmd-click for a new tab when they want one.

Also propagate same-tab to EcosystemMap cards (they were forcing
_blank for any http link).

Sitemap visibility: `sitemap-index.xml` is one level above the URLs
(it just points at sitemap-0.xml — standard Sitemaps protocol). When
visited directly it looks empty. Updated <link rel="sitemap"> to
point at /sitemap-0.xml so anything inspecting the page lands on the
populated file. robots.txt now lists both URLs (crawlers handle
either form).

Stacked on chore/copy-polish (PR #13). Once that merges, this PR's
diff narrows to just these files.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@radinhamidi radinhamidi force-pushed the chore/nav-and-sitemap-stacked branch from 6e6ed64 to fa6953f Compare April 30, 2026 01:57
@radinhamidi radinhamidi merged commit d550237 into chore/copy-polish Apr 30, 2026
3 checks passed
radinhamidi added a commit that referenced this pull request Apr 30, 2026
User feedback: Dashboard and Leaderboard links should open in the
current tab, not a new one. The nav links were already clean (PR
#14 work in this stack), but two more stragglers were forcing _blank:

- Footer (Dashboard, GitHub, Docs, Paper) — flat link strip with
  target=_blank on every entry. Removed.
- Leaderboard EmptyState's "How to submit a result →" CTA pointing
  at the contributor guide on RTD. Removed _blank for consistency
  with the rest of the leaderboard's links.

Remaining target=_blank instances (intentionally kept) are on
external research references: arXiv paper links on /methods, /cite,
and /about; GitHub source-file links on /about and /reproducibility;
RTD docs link on /install. These are research-citation conventions
where readers expect parallel-tab reading. Happy to flip globally if
that's the actual preference — just say.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
radinhamidi added a commit that referenced this pull request Apr 30, 2026
Recover orphaned PRs #14 + #15 (nav links + leaderboard sitemap)
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.

1 participant