diff --git a/docs/conf.py b/docs/conf.py index 3f7f267..cc0d513 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -32,6 +32,7 @@ # 3rd party "myst_parser", "sphinx_copybutton", + "sphinxcontrib.mermaid", ] @@ -48,7 +49,7 @@ # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = None +# language = None # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. @@ -82,6 +83,17 @@ "qgis": ("https://qgis.org/pyqgis/master/", None), } +# mermaid +mermaid_d3_zoom = True +mermaid_params = [ + "--theme", + "forest", + "--backgroundColor", + "transparent", +] +# TODO: remove next line when the mermaid version shipped with sphinxcontrib-mermaid is 11.4+ +mermaid_version = "11.4.1" + # MyST Parser myst_enable_extensions = [ "amsmath", diff --git a/docs/development/development.md b/docs/development/setup.md similarity index 100% rename from docs/development/development.md rename to docs/development/setup.md diff --git a/docs/how_does_it_works.md b/docs/how_does_it_works.md new file mode 100644 index 0000000..47b1a12 --- /dev/null +++ b/docs/how_does_it_works.md @@ -0,0 +1,24 @@ +# How does it work? + +```{mermaid} +--- +title: "How Layers Menu From Project behaves during QGIS launch" +--- +flowchart TD + A@{ shape: circle, label: "QGIS starts" } -->|splash screen displayed| B(load GUI and plugins) + + subgraph "QGIS UI main thread" + B -->|GUI is initialized| C@{ shape: curv-trap, label: "QGIS main UI displayed" } + C ==> Q((("QGIS is mainly usable"))) + end + + subgraph "LMFP thread (QgsTask)" + C -.->|threaded LMFP| D[[read projects configuration]] + D -.-> E[[check project's cache]] + E -.->|cache still valid| F(create menus from caches JSON files) + F == menus appear in the main UI ==> Q + E -.->|cache has expired or is invalid| G(download/copy remote files) + G -.->|store cache|H("{path_to_qgis_profile}/cache/menu_from_project") + H --> F + end +``` diff --git a/docs/index.md b/docs/index.md index 8038f15..ca65ba8 100644 --- a/docs/index.md +++ b/docs/index.md @@ -25,6 +25,7 @@ caption: Usage --- usage/en_use usage/fr_use +how_does_it_works ``` ```{toctree} @@ -33,7 +34,7 @@ maxdepth: 1 caption: Contributing --- development/contribute -development/environment +development/setup development/documentation development/translation development/packaging diff --git a/requirements/documentation.txt b/requirements/documentation.txt index ed5910b..156463d 100644 --- a/requirements/documentation.txt +++ b/requirements/documentation.txt @@ -5,3 +5,4 @@ furo>=2024 myst-parser[linkify]>=2 sphinx-autobuild>=2024 sphinx-copybutton>=0.5 +sphinxcontrib-mermaid>=1,<2