Skip to content

Remove "hidden" need data field? #1014

@chrisjsewell

Description

@chrisjsewell

Currently there is both a "hide" and a "hidden" data field (and related directive option), per need, which seems confusing.

The "hide" directive option/data field has a clear purpose; if set, the need is not rendered in the output build (e.g. HTML page).
It is part of the default options:

"hide": directives.flag,

The "hidden" field is added to the extra options here:

for option in ["hidden", "duration", "completion", "has_dead_links", "has_forbidden_dead_links", "constraints"]:

It is never used in the code base, tests, or internal documentation.
It is mentioned in https://sphinx-needs.readthedocs.io/en/latest/configuration.html#needs-hide-options, but this option was removed in v0.5.0
It is also mentioned in https://sphinx-needs.readthedocs.io/en/latest/configuration.html#needs-extra-options, but again in relation to the removed needs_hide_options config
There is also this line in the documentation, which I have no idea what it is trying to say 😅

The hidden option is a globally available option always hidden and used to easily execute Dynamic functions.

Is "hidden"simply a legacy field then, which can be removed?

@danwos perhaps you can provide some historical context on this?

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions