You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR proposes to modify dash-renderer to check whether the stack trace being sent up by the backend includes the string <!DOCTYPE HTML. If it does, the content is embedded within an iframe to avoid CSS leaking caused by the Werkzeug HTML which Dash for Python provides.
If it does not, the content is included in a simple nested div instead, with customized CSS to properly line-wrap the preformatted content, and to automatically use a scrollbar if the stack trace is sufficiently long.
After merging, the stack trace within the dev tools UI for Dash for R apps will look like this:
The reason will be displayed to describe this comment to others. Learn more.
I kept them because we used them previously, but it might be ok to 🔪 from both R and Python. The important bits are in the FrontEndError.css file anyhow.
The reason will be displayed to describe this comment to others. Learn more.
The <iframe> needs explicit sizing because the containing page doesn't know what's in it, and border because perhaps iframes have a border by default. But the unframed string version should be closer to the front-end version, which gets most of its styling from .dash-fe-error__info.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR proposes to modify
dash-rendererto check whether the stack trace being sent up by the backend includes the string<!DOCTYPE HTML. If it does, the content is embedded within aniframeto avoid CSS leaking caused by the Werkzeug HTML which Dash for Python provides.If it does not, the content is included in a simple nested
divinstead, with customized CSS to properly line-wrap the preformatted content, and to automatically use a scrollbar if the stack trace is sufficiently long.After merging, the stack trace within the dev tools UI for Dash for R apps will look like this:
To be merged concurrently with plotly/dashR#137. Fixes#994.