Skip to content

Commit

Permalink
🔧 Remove usage of hide_status and hide_tags (#1130)
Browse files Browse the repository at this point in the history
These needs fields were removed in v0.5.0
  • Loading branch information
chrisjsewell committed Feb 28, 2024
1 parent 4d88ad8 commit 63e1169
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 23 deletions.
8 changes: 4 additions & 4 deletions docs/configuration.rst
Expand Up @@ -2204,10 +2204,10 @@ If nothing is set, the following default template is used:
:class: need
:needs_type:`{{type_name}}`: :needs_title:`{{title}}` :needs_id:`{{id}}`
{%- if status and status|upper != "NONE" and not hide_status %}
{%- if status and status|upper != "NONE" %}
| status: :needs_status:`{{status}}`
{%- endif -%}
{%- if tags and not hide_tags %}
{%- if tags %}
| tags: :needs_tag:`{{tags|join("` :needs_tag:`")}}`
{%- endif %}
| links incoming: :need_incoming:`{{id}}`
Expand Down Expand Up @@ -2265,10 +2265,10 @@ Default value:
:needs_type:`{{type_name}}`: :needs_title:`{{title}}` :needs_id:`{{id}}`
:needs_type:`{{type_name}}`: :needs_title:`{{title}}` :needs_id:`{{id}}`
{%- if status and status|upper != "NONE" and not hide_status %}
{%- if status and status|upper != "NONE" %}
| status: :needs_status:`{{status}}`
{%- endif -%}
{%- if tags and not hide_tags %}
{%- if tags %}
| tags: :needs_tag:`{{tags|join("` :needs_tag:`")}}`
{%- endif %}
| links incoming: :need_incoming:`{{id}}`
Expand Down
2 changes: 0 additions & 2 deletions docs/dynamic_functions.rst
Expand Up @@ -165,8 +165,6 @@ need structure
'content': str: unparsed need content,
'collapse': bool: true if meta data shall be collapsed,
'hide': bool: true if complete need shall be hidden,
'hide_tags': bool: if tags shall be hidden,
'hide_status': bool: true if status shall be hidden,
}
Adding new keywords to need object will be treated as extra_option in need meta area.
Expand Down
2 changes: 1 addition & 1 deletion sphinx_needs/layout.py
Expand Up @@ -705,7 +705,7 @@ def meta_all(
``content``, ``collapse``, ``parts``, ``id_parent``,
``id_complete``, ``title``, ``full_title``, ``is_part``, ``is_need``,
``type_prefix``, ``type_color``, ``type_style``, ``type``, ``type_name``, ``id``,
``hide``, ``hide_status``, ``hide_tags``, ``sections``, ``section_name``.
``hide``, ``sections``, ``section_name``.
To exclude further need-data, use ``exclude``, like ``exclude=['status', 'tags']``
Expand Down
2 changes: 0 additions & 2 deletions sphinx_needs/needsfile.py
Expand Up @@ -26,13 +26,11 @@ class NeedsList:
JSON_KEY_EXCLUSIONS_NEEDS = {
"links_back",
"type_color",
"hide_status",
"hide",
"type_prefix",
"lineno",
"collapse",
"type_style",
"hide_tags",
"content",
"content_node",
# id_parent, id_parent are added on calls to `prepare_need_list`
Expand Down
2 changes: 0 additions & 2 deletions sphinx_needs/utils.py
Expand Up @@ -64,8 +64,6 @@ class NeedFunctionsType(TypedDict):
"type_name",
"id",
"hide",
"hide_status",
"hide_tags",
"sections",
"section_name",
"content_node",
Expand Down
4 changes: 2 additions & 2 deletions tests/doc_test/add_sections/conf.py
Expand Up @@ -29,8 +29,8 @@
Details
{% if status and status|upper != "NONE" and not hide_status %} | status: :needs_status:`{{status}}`{% endif %}
{% if tags and not hide_tags %} | tags: :needs_tag:`{{tags|join("` :needs_tag:`")}}`{% endif %}
{% if status and status|upper != "NONE" %} | status: :needs_status:`{{status}}`{% endif %}
{% if tags %} | tags: :needs_tag:`{{tags|join("` :needs_tag:`")}}`{% endif %}
{% if introduced %} | introduced: `{{introduced}}` {% endif %}
{% if updated %} | updated: `{{updated}}` {% endif %}
{% if impacts %} | impacts: `{{impacts}}` {% endif %}
Expand Down
4 changes: 2 additions & 2 deletions tests/doc_test/extra_options/conf.py
Expand Up @@ -32,8 +32,8 @@ def setup(app):
Details
{% if status and status|upper != "NONE" and not hide_status %} | status: :needs_status:`{{status}}`{% endif %}
{% if tags and not hide_tags %} | tags: :needs_tag:`{{tags|join("` :needs_tag:`")}}`{% endif %}
{% if status and status|upper != "NONE" %} | status: :needs_status:`{{status}}`{% endif %}
{% if tags %} | tags: :needs_tag:`{{tags|join("` :needs_tag:`")}}`{% endif %}
{% if introduced %} | introduced: `{{introduced}}` {% endif %}
{% if updated %} | updated: `{{updated}}` {% endif %}
{% if impacts %} | impacts: `{{impacts}}` {% endif %}
Expand Down
4 changes: 2 additions & 2 deletions tests/doc_test/import_doc/conf.py
Expand Up @@ -47,10 +47,10 @@
{% if hide == false -%}
{{type_name}}: **{{title}}** ({{id}})
{%- if status and status|upper != "NONE" and not hide_status %}
{%- if status and status|upper != "NONE" %}
| status: {{status}}
{%- endif -%}
{%- if tags and not hide_tags %}
{%- if tags %}
| tags: {{tags|join("; ")}}
{%- endif %}
| links incoming: :need_incoming:`{{id}}`
Expand Down
4 changes: 2 additions & 2 deletions tests/doc_test/import_doc_empty/conf.py
Expand Up @@ -45,10 +45,10 @@
{% if hide == false -%}
{{type_name}}: **{{title}}** ({{id}})
{%- if status and status|upper != "NONE" and not hide_status %}
{%- if status and status|upper != "NONE" %}
| status: {{status}}
{%- endif -%}
{%- if tags and not hide_tags %}
{%- if tags %}
| tags: {{tags|join("; ")}}
{%- endif %}
| links incoming: :need_incoming:`{{id}}`
Expand Down
4 changes: 2 additions & 2 deletions tests/doc_test/import_doc_invalid/conf.py
Expand Up @@ -45,10 +45,10 @@
{% if hide == false -%}
{{type_name}}: **{{title}}** ({{id}})
{%- if status and status|upper != "NONE" and not hide_status %}
{%- if status and status|upper != "NONE" %}
| status: {{status}}
{%- endif -%}
{%- if tags and not hide_tags %}
{%- if tags %}
| tags: {{tags|join("; ")}}
{%- endif %}
| links incoming: :need_incoming:`{{id}}`
Expand Down
4 changes: 2 additions & 2 deletions tests/doc_test/non_exists_file_import/conf.py
Expand Up @@ -45,10 +45,10 @@
{% if hide == false -%}
{{type_name}}: **{{title}}** ({{id}})
{%- if status and status|upper != "NONE" and not hide_status %}
{%- if status and status|upper != "NONE" %}
| status: {{status}}
{%- endif -%}
{%- if tags and not hide_tags %}
{%- if tags %}
| tags: {{tags|join("; ")}}
{%- endif %}
| links incoming: :need_incoming:`{{id}}`
Expand Down

0 comments on commit 63e1169

Please sign in to comment.