disabled/hidden ok

This commit is contained in:
gwen 2026-01-08 16:31:33 +01:00
parent b1f0e7e3de
commit 7faf7c4310

View file

@ -395,30 +395,6 @@ Here is our new :file:`20-manual.yml` structure file:
variable: __.http_proxy.port variable: __.http_proxy.port
... ...
We have now a `hidden` property assigned to the `https_proxy` family.
A conditional hidden family
----------------------------
.. type-along:: For those who follow the tutorial with the help of the git repository
Now you need to checkout the `v1.1_053` version::
git switch --detach v1.1_053
The variable that drives the hidden/show behavior is the `use_for_https` variable because the `hidden` property has
a `variable` target parameter that points to it: `variable: _.use_for_https`.
.. prerequisites:: Reminder
The underscore and the point before the variable (`_.use_for_https`) points to the variable that lives in the parent
family.
Now we will focus on configuring the HTTPS mode in case of `"Manual proxy configuration"` value has been chosen,
let's have a look at our use case again:
.. image:: images/firefox_manual_https.png
We have added two other variables for the HTTPS use only: We have added two other variables for the HTTPS use only:
.. confval:: https_proxy.address .. confval:: https_proxy.address
@ -431,8 +407,54 @@ We have added two other variables for the HTTPS use only:
This is a port setting for the manual HTTPS configuration This is a port setting for the manual HTTPS configuration
We have now two very similar variables, a `manual.http_proxy.address` variable and a `manual.https_proxy.address` variable. We have now a `hidden` property assigned to the `https_proxy` family, which is
In the same way, we have a `manual.http_proxy.port` variable and a `manual.https_proxy.port` variable. hiding these two variables.
A conditional hidden family
----------------------------
.. type-along:: For those who follow the tutorial with the help of the git repository
Now you need to checkout the `v1.1_053` version::
git switch --detach v1.1_053
Now we will focus on configuring the HTTPS mode in case of `"Manual proxy configuration"` value has been chosen,
let's have a look at our use case again:
.. image:: images/firefox_manual_https.png
Let's have a look at the HTPPS configuration corresponding structure file:
.. extinclude:: https://forge.cloud.silique.fr/stove/rougail-tutorials/raw/commit/v1.1_053/firefox/20-manual.yml
:linenos:
:language: yaml
:caption: the :file:`firefox/20-manual.yml` structure file
..
%YAML 1.2
---
version: 1.1
manual:
use_for_https: true # Also use this proxy for HTTPS
https_proxy:
description: HTTPS Proxy
hidden:
variable: _.use_for_https
address:
description: HTTPS address
default:
variable: __.http_proxy.address
port:
description: HTTPS Port
default:
variable: __.http_proxy.port
...
Let's introduce a new Rougail concept here: Let's introduce a new Rougail concept here:
@ -472,6 +494,14 @@ We have added a new variable, named `use_for_https` here:
This is a setting that enables to reuse or not the HTTP proxy configuration for HTTPS This is a setting that enables to reuse or not the HTTP proxy configuration for HTTPS
The variable that drives the hidden/show behavior is the `use_for_https` variable because the `hidden` property has
a `variable` target parameter that points to it: `variable: _.use_for_https`.
.. prerequisites:: Reminder
The underscore and the point before the variable (`_.use_for_https`) points to the variable that lives in the parent
family.
.. questions:: Question: how does it work? .. questions:: Question: how does it work?
How will this variable drive the reuse of HTTP data to HTTPS data? How will this variable drive the reuse of HTTP data to HTTPS data?
@ -592,7 +622,6 @@ We have this output:
Which is logical, HTTPS proxy variables have no values set yet. Which is logical, HTTPS proxy variables have no values set yet.
We are going to see how to point HTTPS variables to HTTP variables. We are going to see how to point HTTPS variables to HTTP variables.
.. keypoints:: Key points progress .. keypoints:: Key points progress
**summary** **summary**
@ -613,8 +642,8 @@ We are going to see how to point HTTPS variables to HTTP variables.
- We now know what a *property* is, we have seen in details the :term:`disabled` property, - We now know what a *property* is, we have seen in details the :term:`disabled` property,
- We can target a variable's value in the `disabled` property's value, - We can target a variable's value in the `disabled` property's value,
we call it a variable based contextual disabled family, we call it a variable based contextual disabled family,
- The :term:`hidden` property set to a family, - The :term:`hidden` property can be set to a family,
- The fact that a property can be set dynamically, - The fact that a property can be set dynamically,
- The conditional dependency of a `hidden` property can depends on a `boolean` variable, - The conditional dependency of a `hidden` property can depends on a `boolean` variable,
- We know whant a calculated default value is. - We know what a calculated default value is.