From ce55fee3dfb3dd6593b42a8974fbd98909961a76 Mon Sep 17 00:00:00 2001 From: Shivam Maurya <54358380+shvmm@users.noreply.github.com> Date: Mon, 21 Oct 2024 11:37:07 +0530 Subject: [PATCH 01/12] added collapsible sections to guides/contributing.rst --- guides/contributing.rst | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/guides/contributing.rst b/guides/contributing.rst index 928585308a..beca003581 100644 --- a/guides/contributing.rst +++ b/guides/contributing.rst @@ -251,6 +251,39 @@ adhere to the following order: Note that a blank line is *required* after every ``code-block`` directive. +- **Collapsible section**: To add a collapsible section, use the ``collapse`` directive: + + .. code-block:: rst + .. collapse:: Details + Something small enough to escape casual notice. + + .. collapse:: Open + :open: + This section is open by default. + + .. collapse:: A long code block + .. code-block:: python + print("Not really") + + .. collapse:: Details + + Something small enough to escape casual notice. + + .. collapse:: Open + + :open: + + This section is expected to be open by default. + + .. collapse:: A long code block + + .. code-block:: python + print("Not really") + + .. note:: + + A blank line is *required* after every ``collapse`` directive. + - **Images**: Use the ``figure`` directive to display an image: .. code-block:: rst From 6a91bdc543dd0b9d5e420868c33bc51f349cdf0e Mon Sep 17 00:00:00 2001 From: Shivam Maurya <54358380+shvmm@users.noreply.github.com> Date: Mon, 21 Oct 2024 11:42:21 +0530 Subject: [PATCH 02/12] lint issue 1 --- guides/contributing.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/guides/contributing.rst b/guides/contributing.rst index beca003581..a4ea3a022e 100644 --- a/guides/contributing.rst +++ b/guides/contributing.rst @@ -254,6 +254,7 @@ adhere to the following order: - **Collapsible section**: To add a collapsible section, use the ``collapse`` directive: .. code-block:: rst + .. collapse:: Details Something small enough to escape casual notice. From 67e0aa0f29474a9feef220b065eb2005e95b2a0d Mon Sep 17 00:00:00 2001 From: Shivam Maurya <54358380+shvmm@users.noreply.github.com> Date: Mon, 21 Oct 2024 11:47:53 +0530 Subject: [PATCH 03/12] lint issue 2 --- guides/contributing.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/guides/contributing.rst b/guides/contributing.rst index a4ea3a022e..f8fded951e 100644 --- a/guides/contributing.rst +++ b/guides/contributing.rst @@ -256,14 +256,18 @@ adhere to the following order: .. code-block:: rst .. collapse:: Details + Something small enough to escape casual notice. .. collapse:: Open + :open: This section is open by default. .. collapse:: A long code block + .. code-block:: python + print("Not really") .. collapse:: Details @@ -279,6 +283,7 @@ adhere to the following order: .. collapse:: A long code block .. code-block:: python + print("Not really") .. note:: From 9ee334fbb4d1a759fdf2bce1953f057ce0ab6dad Mon Sep 17 00:00:00 2001 From: Shivam Maurya <54358380+shvmm@users.noreply.github.com> Date: Mon, 21 Oct 2024 11:51:12 +0530 Subject: [PATCH 04/12] lint issue 3 --- guides/contributing.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/guides/contributing.rst b/guides/contributing.rst index f8fded951e..202a03f525 100644 --- a/guides/contributing.rst +++ b/guides/contributing.rst @@ -256,20 +256,20 @@ adhere to the following order: .. code-block:: rst .. collapse:: Details - + Something small enough to escape casual notice. .. collapse:: Open - + :open: This section is open by default. .. collapse:: A long code block - + .. code-block:: python - + print("Not really") - + .. collapse:: Details Something small enough to escape casual notice. @@ -285,7 +285,7 @@ adhere to the following order: .. code-block:: python print("Not really") - + .. note:: A blank line is *required* after every ``collapse`` directive. From 0985f6bbccfe3208ef79b81266fd203669b9b851 Mon Sep 17 00:00:00 2001 From: Shivam Maurya <54358380+shvmm@users.noreply.github.com> Date: Mon, 21 Oct 2024 11:58:17 +0530 Subject: [PATCH 05/12] consistency fix --- guides/contributing.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/guides/contributing.rst b/guides/contributing.rst index 202a03f525..e3d09adcc7 100644 --- a/guides/contributing.rst +++ b/guides/contributing.rst @@ -261,8 +261,7 @@ adhere to the following order: .. collapse:: Open - :open: - This section is open by default. + This section is expected to be open by default. .. collapse:: A long code block From 6759fb74659ff332e56df963754151bc84481c8d Mon Sep 17 00:00:00 2001 From: Shivam Maurya <54358380+shvmm@users.noreply.github.com> Date: Mon, 21 Oct 2024 12:03:36 +0530 Subject: [PATCH 06/12] consistency fix 2 --- guides/contributing.rst | 2 -- 1 file changed, 2 deletions(-) diff --git a/guides/contributing.rst b/guides/contributing.rst index e3d09adcc7..49a6bc05e8 100644 --- a/guides/contributing.rst +++ b/guides/contributing.rst @@ -275,8 +275,6 @@ adhere to the following order: .. collapse:: Open - :open: - This section is expected to be open by default. .. collapse:: A long code block From 4ea6dcb4309547ede7195c5e75388cd9720896f2 Mon Sep 17 00:00:00 2001 From: Shivam Maurya <54358380+shvmm@users.noreply.github.com> Date: Mon, 21 Oct 2024 12:54:53 +0530 Subject: [PATCH 07/12] added interleaved examples --- guides/contributing.rst | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/guides/contributing.rst b/guides/contributing.rst index 49a6bc05e8..8c9da652b7 100644 --- a/guides/contributing.rst +++ b/guides/contributing.rst @@ -258,30 +258,42 @@ adhere to the following order: .. collapse:: Details Something small enough to escape casual notice. - - .. collapse:: Open - - This section is expected to be open by default. - - .. collapse:: A long code block - - .. code-block:: python - - print("Not really") .. collapse:: Details Something small enough to escape casual notice. - .. collapse:: Open + .. code-block:: rst + + .. collapse:: Open + :open: + This section is expected to be open by default. + .. collapse:: Open + :open: This section is expected to be open by default. + .. code-block:: rst + + .. collapse:: A long code block + + .. code-block:: yaml + + # Sample configuration entry + switch: + - platform: gpio + name: "Relay #42" + pin: GPIOXX + .. collapse:: A long code block - .. code-block:: python + .. code-block:: yaml - print("Not really") + # Sample configuration entry + switch: + - platform: gpio + name: "Relay #42" + pin: GPIOXX .. note:: From c86684fb5bbcec07d91a56d8eaccf6f90fc2b73e Mon Sep 17 00:00:00 2001 From: Shivam Maurya <54358380+shvmm@users.noreply.github.com> Date: Mon, 21 Oct 2024 13:00:31 +0530 Subject: [PATCH 08/12] lint fix --- guides/contributing.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/guides/contributing.rst b/guides/contributing.rst index 8c9da652b7..4f6df00b5f 100644 --- a/guides/contributing.rst +++ b/guides/contributing.rst @@ -267,10 +267,12 @@ adhere to the following order: .. collapse:: Open :open: + This section is expected to be open by default. .. collapse:: Open :open: + This section is expected to be open by default. .. code-block:: rst From 665634897668e8365603135905409749abf89bdc Mon Sep 17 00:00:00 2001 From: Shivam Maurya <54358380+shvmm@users.noreply.github.com> Date: Mon, 21 Oct 2024 13:33:23 +0530 Subject: [PATCH 09/12] added tab examples --- guides/contributing.rst | 118 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 114 insertions(+), 4 deletions(-) diff --git a/guides/contributing.rst b/guides/contributing.rst index 4f6df00b5f..9c0d05b76d 100644 --- a/guides/contributing.rst +++ b/guides/contributing.rst @@ -130,7 +130,7 @@ Then, use the provided Makefile to build the changes and start a live-updating w # Start web server on port 8000 make live-html -Notes +s ***** - Use the English language (duh...) @@ -268,12 +268,12 @@ adhere to the following order: .. collapse:: Open :open: - This section is expected to be open by default. + This section is open by default. .. collapse:: Open :open: - This section is expected to be open by default. + This section is open by default. .. code-block:: rst @@ -299,7 +299,117 @@ adhere to the following order: .. note:: - A blank line is *required* after every ``collapse`` directive. + - The ``:open:`` flag has to be immediately after the ``collapse`` directive without a blank line. + - A blank line is *required* after every ``collapse`` directive. + +- **Tabs**: To group content into tabs, use the ``tabs`` directive. The tabs directive to define a tab set. + Basic tabs are added using the ``tab`` directive (without s), which takes the tab’s label as an argument: + + .. code-block:: rst + + .. tabs:: + + .. tab:: Apples + + Apples are green, or sometimes red. + + .. tab:: Pears + + Pears are green. + + .. tab:: Oranges + + Oranges are orange. + + This will appear as + + .. tabs:: + + .. tab:: Apples + + Apples are green, or sometimes red. + + .. tab:: Pears + + Pears are green. + + .. tab:: Oranges + + Oranges are orange. + + The contents of each tab can be displayed by clicking on the tab that you wish to show. + Clicking on the tab that is currently open will hide the tab’s content, leaving only the tab set labels visible. + + Tabs can also be nested inside one another: + + .. code-block:: rst + + .. tabs:: + + .. tab:: Stars + + .. tabs:: + + .. tab:: The Sun + + The closest star to us. + + .. tab:: Proxima Centauri + + The second closest star to us. + + .. tab:: Polaris + + The North Star. + + .. tab:: Moons + + .. tabs:: + + .. tab:: The Moon + + Orbits the Earth + + .. tab:: Titan + + Orbits Jupiter + + .. tabs:: + + .. tab:: Stars + + .. tabs:: + + .. tab:: The Sun + + The closest star to us. + + .. tab:: Proxima Centauri + + The second closest star to us. + + .. tab:: Polaris + + The North Star. + + .. tab:: Moons + + .. tabs:: + + .. tab:: The Moon + + Orbits the Earth + + .. tab:: Titan + + Orbits Jupiter + + .. note:: + + - A blank line is *required* after every ``tabs`` directive. + - The contents of each tab can be displayed by clicking on the tab that you wish to show. + Clicking on the tab that is currently open will hide the tab’s content, leaving only the tab set labels visible. + - For advanced features like tab-groupings refer to https://sphinx-tabs.readthedocs.io/en/latest/ - **Images**: Use the ``figure`` directive to display an image: From c63910cfa7fb8667cb56c33ec230ad9c6dc3c91d Mon Sep 17 00:00:00 2001 From: Shivam Maurya <54358380+shvmm@users.noreply.github.com> Date: Mon, 21 Oct 2024 13:38:55 +0530 Subject: [PATCH 10/12] lint fix --- guides/contributing.rst | 62 ++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/guides/contributing.rst b/guides/contributing.rst index 9c0d05b76d..8a85f40628 100644 --- a/guides/contributing.rst +++ b/guides/contributing.rst @@ -311,15 +311,15 @@ adhere to the following order: .. tab:: Apples - Apples are green, or sometimes red. + Apples are green, or sometimes red. .. tab:: Pears - Pears are green. + Pears are green. .. tab:: Oranges - Oranges are orange. + Oranges are orange. This will appear as @@ -327,15 +327,15 @@ adhere to the following order: .. tab:: Apples - Apples are green, or sometimes red. + Apples are green, or sometimes red. .. tab:: Pears - Pears are green. + Pears are green. .. tab:: Oranges - Oranges are orange. + Oranges are orange. The contents of each tab can be displayed by clicking on the tab that you wish to show. Clicking on the tab that is currently open will hide the tab’s content, leaving only the tab set labels visible. @@ -348,63 +348,63 @@ adhere to the following order: .. tab:: Stars - .. tabs:: + .. tabs:: - .. tab:: The Sun + .. tab:: The Sun - The closest star to us. + The closest star to us. - .. tab:: Proxima Centauri + .. tab:: Proxima Centauri - The second closest star to us. + The second closest star to us. - .. tab:: Polaris + .. tab:: Polaris - The North Star. + The North Star. .. tab:: Moons - .. tabs:: + .. tabs:: - .. tab:: The Moon + .. tab:: The Moon - Orbits the Earth + Orbits the Earth - .. tab:: Titan + .. tab:: Titan - Orbits Jupiter + Orbits Jupiter .. tabs:: .. tab:: Stars - .. tabs:: + .. tabs:: - .. tab:: The Sun + .. tab:: The Sun - The closest star to us. + The closest star to us. - .. tab:: Proxima Centauri + .. tab:: Proxima Centauri - The second closest star to us. + The second closest star to us. - .. tab:: Polaris + .. tab:: Polaris - The North Star. + The North Star. .. tab:: Moons - .. tabs:: + .. tabs:: - .. tab:: The Moon + .. tab:: The Moon - Orbits the Earth + Orbits the Earth - .. tab:: Titan + .. tab:: Titan - Orbits Jupiter + Orbits Jupiter - .. note:: + .. note:: - A blank line is *required* after every ``tabs`` directive. - The contents of each tab can be displayed by clicking on the tab that you wish to show. From 9589613b76a73d1d006c7234096fe0b02e13d780 Mon Sep 17 00:00:00 2001 From: Shivam Maurya <54358380+shvmm@users.noreply.github.com> Date: Mon, 21 Oct 2024 13:57:18 +0530 Subject: [PATCH 11/12] fixed glitch --- guides/contributing.rst | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/guides/contributing.rst b/guides/contributing.rst index 8a85f40628..a9941a00f2 100644 --- a/guides/contributing.rst +++ b/guides/contributing.rst @@ -130,7 +130,7 @@ Then, use the provided Makefile to build the changes and start a live-updating w # Start web server on port 8000 make live-html -s +Notes ***** - Use the English language (duh...) @@ -263,18 +263,6 @@ adhere to the following order: Something small enough to escape casual notice. - .. code-block:: rst - - .. collapse:: Open - :open: - - This section is open by default. - - .. collapse:: Open - :open: - - This section is open by default. - .. code-block:: rst .. collapse:: A long code block @@ -297,12 +285,26 @@ adhere to the following order: name: "Relay #42" pin: GPIOXX + The ``:open:`` flag can be used to have the section open by default. + + .. code-block:: rst + + .. collapse:: Open + :open: + + This section is open by default. + + .. collapse:: Open + :open: + + This section is open by default. + .. note:: - - The ``:open:`` flag has to be immediately after the ``collapse`` directive without a blank line. + - The ``:open:`` flag following the ``collapse`` directive has to be without a blank line. - A blank line is *required* after every ``collapse`` directive. -- **Tabs**: To group content into tabs, use the ``tabs`` directive. The tabs directive to define a tab set. +- **Tabs**: To group content into tabs, use the ``tabs`` directive. The tabs directive defines a tab set. Basic tabs are added using the ``tab`` directive (without s), which takes the tab’s label as an argument: .. code-block:: rst @@ -337,9 +339,6 @@ adhere to the following order: Oranges are orange. - The contents of each tab can be displayed by clicking on the tab that you wish to show. - Clicking on the tab that is currently open will hide the tab’s content, leaving only the tab set labels visible. - Tabs can also be nested inside one another: .. code-block:: rst @@ -408,8 +407,8 @@ adhere to the following order: - A blank line is *required* after every ``tabs`` directive. - The contents of each tab can be displayed by clicking on the tab that you wish to show. - Clicking on the tab that is currently open will hide the tab’s content, leaving only the tab set labels visible. - - For advanced features like tab-groupings refer to https://sphinx-tabs.readthedocs.io/en/latest/ + Clicking again on the tab that is currently open will hide its content, leaving only the tab set labels visible. + - For advanced features like tab-groupings, refer to https://sphinx-tabs.readthedocs.io/en/latest/ - **Images**: Use the ``figure`` directive to display an image: From 6c3729821f69849af2b4e40c5c5dc61799bf7f09 Mon Sep 17 00:00:00 2001 From: Shivam Maurya <54358380+shvmm@users.noreply.github.com> Date: Mon, 21 Oct 2024 14:05:35 +0530 Subject: [PATCH 12/12] Update guides/contributing.rst Co-authored-by: Keith Burzinski --- guides/contributing.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/contributing.rst b/guides/contributing.rst index a9941a00f2..9b555b710b 100644 --- a/guides/contributing.rst +++ b/guides/contributing.rst @@ -301,7 +301,7 @@ adhere to the following order: .. note:: - - The ``:open:`` flag following the ``collapse`` directive has to be without a blank line. + - The ``:open:`` flag must immediately follow the ``collapse`` directive without a blank line between them. - A blank line is *required* after every ``collapse`` directive. - **Tabs**: To group content into tabs, use the ``tabs`` directive. The tabs directive defines a tab set.