Skip to content

fix: remove duplicate scroll-top-btn on project page (issue #1878) - #1912

Open
ionfwsrijan wants to merge 1 commit into
komalharshita:mainfrom
ionfwsrijan:fix/1878-scroll-top-dup-id
Open

fix: remove duplicate scroll-top-btn on project page (issue #1878)#1912
ionfwsrijan wants to merge 1 commit into
komalharshita:mainfrom
ionfwsrijan:fix/1878-scroll-top-dup-id

Conversation

@ionfwsrijan

Copy link
Copy Markdown
Contributor

Problem

project.html rendered two buttons with id="scroll-top-btn" — an inline button followed by the partials/scroll_top_btn.html include that defines the same ID. Duplicate IDs are invalid HTML, and document.getElementById("scroll-top-btn") in static/script.js resolves only to the first element, leaving the partial's button (and its expected behavior) inert.

Fix

  • Removed the inline button from project.html and rely on the shared partials/scroll_top_btn.html include — the same pattern explore.html uses.
  • Added tests/test_html_template_duplicate_ids.py — a pure-file CI sanity check that scans every template (including partials) and fails if any element ID is defined more than once, preventing duplicate-ID regressions.

Files changed

  • src/templates/project.html — dropped the duplicate inline scroll button.
  • tests/test_html_template_duplicate_ids.py — new duplicate-ID check across src/templates/**/*.html.

Testing

Closes #1878

@vercel

vercel Bot commented Aug 11, 2026

Copy link
Copy Markdown

@ionfwsrijan is attempting to deploy a commit to the komalsony234-1530's projects Team on Vercel.

A member of the Team first needs to authorize it.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: duplicate id=scroll-top-btn on project.html leaves one scroll-to-top button inert

1 participant