Skip to content

Conversation

@ANAMASGARD
Copy link
Contributor

Fixes #280

Problem

Old code in animint.js tries to parse all URL hash fragments as animint selector format (#variable={value}), but R Markdown creates simple anchors like #section-1 for headings. This causes JavaScript errors.

Changes

  • Added failing test that detects the problematic code (this commit)
  • Next commit will remove the untested hash parsing block (lines 2753-2799)

##Test

Screenshot From 2025-11-29 11-09-34

Status

  • Test fails on current code (expected)
  • Will pass after removing problematic code

@ANAMASGARD ANAMASGARD requested a review from tdhock November 29, 2025 06:49
@ANAMASGARD
Copy link
Contributor Author

Sir @tdhock I found that test-renderer1-url-fragment.R tests the URL fragment feature.
Should we:=>

  1. Remove this test along with the feature?
  2. Or fix the hash parsing to only handle animint format (#var={value}) and ignore simple HTML anchors (#section-1)?

Please advise before I proceed.

@tdhock
Copy link
Collaborator

tdhock commented Dec 1, 2025

please remove test

ANAMASGARD and others added 2 commits December 3, 2025 16:42
The URL fragment test is no longer needed since the window.location.hash
parsing feature has been removed.

@tdhock feedback I took before doing it
@codecov
Copy link

codecov bot commented Dec 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.06%. Comparing base (ddb3e1f) to head (33bee73).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #282      +/-   ##
==========================================
+ Coverage   72.77%   73.06%   +0.28%     
==========================================
  Files         164      164              
  Lines        8805     8758      -47     
==========================================
- Hits         6408     6399       -9     
+ Misses       2397     2359      -38     
Flag Coverage Δ
javascript 80.75% <ø> (+1.03%) ⬆️
r 69.53% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tdhock
Copy link
Collaborator

tdhock commented Dec 3, 2025

also please add NEWS item

@ANAMASGARD ANAMASGARD requested a review from tdhock December 3, 2025 15:38
@tdhock tdhock changed the title Remove window.location.hash parsing code #280 Remove window.location.hash parsing code Dec 3, 2025
@ANAMASGARD ANAMASGARD requested a review from tdhock December 4, 2025 10:48
@ANAMASGARD ANAMASGARD requested a review from tdhock December 4, 2025 16:11
@tdhock tdhock merged commit 68b074e into master Dec 4, 2025
6 checks passed
@tdhock
Copy link
Collaborator

tdhock commented Dec 4, 2025

thanks

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.

remove id window.location.hash

3 participants