rougail/docs/structured_data/mode.rst
gwen 2c1f2e7d9b docs(new-version): add new version of the doc
technical doc and the tutorial
2026-06-21 11:13:06 +02:00

52 lines
2.1 KiB
ReStructuredText

.. _structured_data_mode:
Mode
====
By default, the :term:`mode` is not configured. It is an optional feature.
Definition
---------------
Let's start by defining what we want to do with the :term:`modes <mode>`.
.. questions:: What do you mean by "mode"?
You know, in many applications, in the user interfaces, there are two editing modes:
a basic mode and an advanced mode.
This way, standard users aren't overwhelmed by an overly complex business view,
while domain experts can access more complex views that suit better to their needs.
We designed this mode concept with that idea in mind.
Of course, it can have a broader meaning, and it is possible to define
much more varied modes (beyond just "basic" or "expert").
.. glossary::
mode
At the start of the project, the mode was used to set to variables
some complexity levels. Some variables were seen as "basic",
some other as "normal" (the standard mode) and some variables were seen as "advanced"
(the advanced mode).
It was a way of classifying the variables as follows:
we could have a view grouping the usual variables (normal mode)
and a view of so-called expert (advanced) variables.
Regarding variable documentation, we can therefore have
a variables documentation designed for the usual user,
and a variables documentation designed for advanced users.
Default behavior
------------------
By default, the mode is not configured. It is an optional feature.
We'll present a common example, but you'll need to define your own :term:`modes <mode>` according to your needs.
Here is our classic use case of :term:`mode` definition. We'll use three :term:`modes <mode>`:
- `basic`: automatically sets mandatory variables without default values (in this case, the actor adapting the configuration will have to enter values) and manually sets variables that the actor defining the variables deems necessary.
- `standard`: automatically sets all other variables
- `advanced`: sets variables that the actor defining the variables decides to include. These variables are intended for a knowledgeable audience who know what to do.