NUKnightLab / NUKnightLab/TimelineJS3
TwitterEmbed mediatype incorrectly assumes there is only one element with className tl-media-twitter
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 3.2k
- Forks
- 645
- PR merge metrics
- No merged PRs in 30d
Description
This must have been around for a long time, but I stumbled onto this bug which is visible using the "all media types" configuration using the local test server (npm start)
Probably the fix is to add a unique ID when the media DOM elements are created and use that in the callback instead of just assuming index there's only one.
But except for backwards compatibility is this something that affects many users? probably not.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start the local test server with npm start and reproduce the issue using the "all media types" configuration. Read src/js/media/types/TwitterEmbed.js around line 80 and inspect how the media DOM elements are created. Done means multiple elements with className tl-media-twitter each trigger the callback for the correct Twitter embed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100