openedx / openedx/frontend-plugin-framework

Handle broken URL in iframe

Open
#71 0 comments 0 reactions 0 assignees View on GitHub

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.

loading spinner in an iframe slot

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.