-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: Add ADR for handling frontend plugin fallback #541
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
How to Handle Frontend iFrame Plugin Fallback | ||
====================================================================================== | ||
|
||
Status | ||
------ | ||
|
||
Draft | ||
|
||
Context | ||
------- | ||
The Frontend Plugin Framework's iFrame class implementation will live in Frontend Platform, | ||
but the question of how we want to handle the case where the iFrame fails to render needs to | ||
handled. | ||
|
||
Given that this is a new feature that is being made available to the frontend, we | ||
can't anticipate all of the ways that the plugin will be used for a given repo, nor do we | ||
have any intention to limit the scope of how it can be used. Because we don't know all of the use | ||
cases for the plugin, we also don't know the desired fallback method that is desired for any | ||
given plugin. | ||
|
||
Decision | ||
-------- | ||
For the above reasons, we will have failing iFrame plugins return an H1 tag that | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm fully aware that this is likely not the best way to deliver an error, but in hopes of stirring enough of the pot to bring people into the conversation, I'll leave it here (see Constructive Controversy) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we log this in a way that the teams can determine how often this fails for their host site? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How will the host MFE know that the iFrame has failed to render? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [curious] Is there an opportunity to use an There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah! You know, I should update this to name that there is a In short, the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
says "There was an error.". By doing so, it is up to the engineer/team that implements the plugin | ||
to handle the desired fallback however they would like. | ||
Comment on lines
+24
to
+25
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How will we do that? By checking for the element returned by the pluginSlot? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How we will be able to check the element returned by the pluginSlot? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hey all! huge apologies for the delay on these responses. After having written this ADR draft, I realized that the PR I was taking on wasn't in any state for me to confidently know what worked and thus a lack of confidence in the ways we could handle the fallback. I will be editing this draft to reflect my findings and we'll ideally have a clearer picture to work off of. |
||
|
||
Rejected Alternatives | ||
--------------------- | ||
|
||
The initial assumption was that we should determine what the fallback would be | ||
if the iFrame plugin render failed. The extent of what this handling could look like | ||
ranges from taking in a fallback argument to providing the same fallback image no matter | ||
how the plugin was being used. These options limit the possibilities for how the fallback | ||
-- and the plugin itself -- would present itself by assuming each plugin implementation | ||
or desired fallback method will be the same for all plugins. | ||
|
||
.. _oepXXXX: https://github.com/openedx/open-edx-proposals/pull/287 | ||
.. _frontend_plugin_roadmap: https://github.com/openedx/platform-roadmap/issues/27 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.