Skip to content

Add choice element rendering in documentation#1613

Merged
PeterC-DLS merged 3 commits intonexusformat:mainfrom
XraySpectroscopy:docs-choice-support
Apr 29, 2026
Merged

Add choice element rendering in documentation#1613
PeterC-DLS merged 3 commits intonexusformat:mainfrom
XraySpectroscopy:docs-choice-support

Conversation

@mretegan
Copy link
Copy Markdown
Contributor

@mretegan mretegan commented Feb 7, 2026

This PR adds support for rendering <choice> elements in the HTML documentation and ensures that all elements (fields, groups, choices, links) are rendered in their original XML document order. Closes #1439

@mretegan mretegan changed the title Add choice element rendering in documentationDocs choice support Add choice element rendering in documentation Feb 10, 2026
@woutdenolf
Copy link
Copy Markdown
Contributor

@PeterC-DLS Any idea why the CI does not get executed?

@PeterC-DLS
Copy link
Copy Markdown
Contributor

We have chosen to set the Approval rule for running fork PR workflows to "Only users who have never had a commit or pull request merged into this repository will require approval to run workflows" - see (https://docs.github.com/en/actions/how-tos/manage-workflow-runs/approve-runs-from-forks)

@woutdenolf
Copy link
Copy Markdown
Contributor

I don't seem to have permissions to give approval unless I'm missing something.

@PeterC-DLS
Copy link
Copy Markdown
Contributor

Perhaps they can try rebasing it

@woutdenolf
Copy link
Copy Markdown
Contributor

The "choice" docs are now showing up like this:

image

@woutdenolf woutdenolf self-requested a review February 11, 2026 14:00
@woutdenolf woutdenolf self-requested a review February 11, 2026 14:10
Comment thread dev_tools/docs/nxdl.py
Comment thread dev_tools/docs/nxdl.py
Copy link
Copy Markdown
Contributor

@woutdenolf woutdenolf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from refactoring the way we extract tag names (group, field, attribute, link, choice) from XML nodes it looks good.

Edit: I'll refactor the tag stuff in another PR. #1624

@woutdenolf
Copy link
Copy Markdown
Contributor

woutdenolf commented Feb 12, 2026

@PeterC-DLS This is a fix for showing choice tags in the HTML docs. Do you mind we merge this before the patch release or wait till after (better safe than sorry)?

@PeterC-DLS
Copy link
Copy Markdown
Contributor

This fails for me on rebasing to the main branch owing to the bug fixed in #1608

@PeterC-DLS PeterC-DLS self-requested a review April 29, 2026 11:39
@mretegan
Copy link
Copy Markdown
Contributor Author

@PeterC-DLS I synchronized the branch with the current state of main.

Copy link
Copy Markdown
Contributor

@PeterC-DLS PeterC-DLS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@PeterC-DLS PeterC-DLS merged commit 3bd1d4d into nexusformat:main Apr 29, 2026
2 checks passed
@mretegan mretegan deleted the docs-choice-support branch April 30, 2026 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

choice fields are not rendered in HTML

3 participants