Replace jinja2
with markdown
for loading the warning message document
#189
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 fixes an instability with using
jinja2
andIPython.display.Markdown
to load the warning message document. Here we instead usemarkdown.Markdown
to convert the markdown document to HTML and render it using anipywidget.HTML
widget, which is simpler to work with (noipywidgets.Output
widgets required!).When I add the
.aiidalab/home_app_warning.md
file, instead of adding the message after the home's control panel, it replaces the panel.Before adding file
![image](https://private-user-images.githubusercontent.com/45081142/395754703-684a87d9-d89c-4088-bf9b-a847e0c3f582.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyMjYxNjIsIm5iZiI6MTczOTIyNTg2MiwicGF0aCI6Ii80NTA4MTE0Mi8zOTU3NTQ3MDMtNjg0YTg3ZDktZDg5Yy00MDg4LWJmOWItYTg0N2UwYzNmNTgyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDIyMTc0MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWU0ZWIxNGM5N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