openedx / openedx/frontend-plugin-framework
Handle broken URL in iframe
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 13
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Description
Currently if we pass a non-existent or broken URL to an iFrame plugin, it will simply render a loading spinner with no indication that a failure has occurred.
There is a network request being made to the URL with a failing response that can be seen in the Network tab of DevTools (CMD + OPTION + I)
Consider finding a way to ping the URL before passing it to the iframe — perhaps using something like an XMLHttpRequest
Acceptance Criteria
- There should be a visual indication that the URL has failed
- The Loading spinner should be hidden at the very least
- Might be valuable to loop in UX expertise on what the best option is for Alert text
- The error should be logged
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 by locating the iframe plugin entry point and reproducing the issue with a non-existent URL while watching the browser Network tab. Trace how the loading spinner responds to the failed request. Done means failed URLs show a visible failure state with the spinner hidden and the error logged.
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