Skip to content

Emit data-project-interest on project detail page - #1898

Open
ionfwsrijan wants to merge 1 commit into
komalharshita:mainfrom
ionfwsrijan:fix/1859-project-interest-attribute
Open

Emit data-project-interest on project detail page#1898
ionfwsrijan wants to merge 1 commit into
komalharshita:mainfrom
ionfwsrijan:fix/1859-project-interest-attribute

Conversation

@ionfwsrijan

Copy link
Copy Markdown
Contributor

Problem

The "Recently Viewed" panel always shows a meaningless "General" chip because script.js looks for the data-project-interest attribute to record a project's interest, but project.html never emits it. The attribute query falls back to the hardcoded string "General".

Fix

Add data-project-interest="{{ project.interest }}" to the tag of src/templates/project.html. script.js reads document.querySelector("[data-project-interest]"), so the body element (the earliest node in the page) now provides the real interest from the project metadata.

Files changed

  • src/templates/project.html

Testing

  • GET /project/1 renders data-project-interest="Data" on the body tag (matching the dataset interest).
  • Recently-viewed tracking in script.js now records the actual interest instead of "General".
  • Full suite: 522 passed, 19 pre-existing unrelated failures, 3 skipped.

Closes #1859

@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.

@github-actions github-actions Bot added gssoc-2026 type:bug Something isn't working labels Aug 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc-2026 type:bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Recently-viewed always records 'General' - project.html never sets data-project-interest

1 participant