aiidalab / aiidalab-qe

AiiDAlab App for Quantum ESPRESSO
https://aiidalab-qe.readthedocs.io/
MIT License
9 stars 14 forks source link

Implement path for in-app guides #763

Open edan-bainglass opened 1 week ago

edan-bainglass commented 1 week ago

Based on #751

This PR adds a mechanism for adding in-app guides meant as example use-cases for users.

In-app guide widgets can be added anywhere as follows:

from aiidalab_qe.app.infobox import InAppGuide

example = InAppGuide(
    children=[
        ipw.HTML("An example in-app guide."),
    ],
    guide_class="example",
)

The "child" of the widget can be any other widget supported by ipywidgets. This allows developers to customize the content of the guide as they wish. The example CSS class provided via guide_class marks the widget as part of the "example" guide. This is used for toggling between guides. In addition, the class can be added in the custom.scss file under the static directory to provide a custom style to the guide.

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 0% with 88 lines in your changes missing coverage. Please review.

Project coverage is 66.84%. Comparing base (f63da7d) to head (bb16c05). Report is 106 commits behind head on main.

Files Patch % Lines
src/aiidalab_qe/app/wrapper.py 0.00% 75 Missing :warning:
src/aiidalab_qe/app/infobox.py 0.00% 13 Missing :warning:

:exclamation: There is a different number of reports uploaded between BASE (f63da7d) and HEAD (bb16c05). Click for more details.

HEAD has 2 uploads less than BASE | Flag | BASE (f63da7d) | HEAD (bb16c05) | |------|------|------| |python-3.8|2|0|
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #763 +/- ## =========================================== - Coverage 80.73% 66.84% -13.89% =========================================== Files 49 46 -3 Lines 3415 4229 +814 =========================================== + Hits 2757 2827 +70 - Misses 658 1402 +744 ``` | [Flag](https://app.codecov.io/gh/aiidalab/aiidalab-qe/pull/763/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiidalab) | Coverage Δ | | |---|---|---| | [python-3.10](https://app.codecov.io/gh/aiidalab/aiidalab-qe/pull/763/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiidalab) | `66.84% <0.00%> (-13.89%)` | :arrow_down: | | [python-3.8](https://app.codecov.io/gh/aiidalab/aiidalab-qe/pull/763/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiidalab) | `?` | | | [python-3.9](https://app.codecov.io/gh/aiidalab/aiidalab-qe/pull/763/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiidalab) | `66.87% <0.00%> (-13.90%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=aiidalab#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.