Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] 'hidden' option for domain directives #9671

Closed

Conversation

jakobandersen
Copy link
Contributor

Feature or Bugfix

  • Feature

Purpose

Adding feature for #9662, implemented as suggested in #9662 (comment).

Each domain directive that inherits from ObjectDescription and keeps the option_spec entries in that base class gets an option hidden. This will cause the complete document subtree rooted at that declaration to be replaced with an empty inline node but where all ids mention in the replaced subtree are put in the new node. As the domains have already run, this effectively hides the declaration, but keeps the anchors in the document.

Detail

Each addnodes.desc gets a boolean hidden attribute based on the option, which the post-transform searches for.
Instead of duplicating the option I have changed the py, c, cpp, and js domains to extend a copy of the option_spec in ObjectDescription.

TODO

Assuming this implementation is reasonable the following should be done:

  • Add tests for each of the domains (py, c, cpp, js).
  • Add documentation.
  • Whatever I forgot.

References

Fixes #9662

@AA-Turner
Copy link
Member

Closing in favour of #10478.

A

@AA-Turner AA-Turner closed this Jul 28, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
domain type:enhancement enhance or introduce a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow creating custom targets in a domain
2 participants