Skip to content

Replace jinja2 with markdown for loading the warning message document#189

Merged
edan-bainglass merged 1 commit into
aiidalab:mainfrom
edan-bainglass:warning-message-fix
Dec 15, 2024
Merged

Replace jinja2 with markdown for loading the warning message document#189
edan-bainglass merged 1 commit into
aiidalab:mainfrom
edan-bainglass:warning-message-fix

Conversation

@edan-bainglass

@edan-bainglass edan-bainglass commented Dec 14, 2024

Copy link
Copy Markdown
Member

This PR fixes an instability with using jinja2 and IPython.display.Markdown to load the warning message document. Here we instead use markdown.Markdown to convert the markdown document to HTML and render it using an ipywidget.HTML widget, which is simpler to work with (no ipywidgets.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

After adding file
image

In this PR:

image

@danielhollas danielhollas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants