feat(export): enhance ODCS HTML export - #1447
Open
GauthierCapouillez wants to merge 2 commits into
Open
Conversation
GauthierCapouillez
force-pushed
the
enhance-html-export
branch
from
July 28, 2026 16:11
1d1bd3b to
8f3f1e3
Compare
Author
|
@simonharrer As requeted, I updated the html export to fit to datacontract-editor visualization |
# Conflicts: # CHANGELOG.md
GauthierCapouillez
force-pushed
the
enhance-html-export
branch
from
July 28, 2026 16:22
8f3f1e3 to
fd983b1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The current ODCS HTML export is generated from a single monolithic Jinja2 template
(
datacontract_odcs.html, ~688 lines). This PR introduces a complete overhaul:the template is decomposed into focused, reusable partials and macros, the layout
is modernised to match the visual design of the datacontract-editor React app, and
semantic HTML markup issues are fixed.
Motivation
<dt>/<dd>elements used outside a<dl>parent caused browsers tosilently repair the DOM, breaking CSS
space-y-*selectors and producinginconsistent vertical spacing between sections.
Changes
Architecture — Modular partials
datacontract_odcs.htmlis reduced to ~45 lines (assembler only).All rendering logic is extracted into
partials_odcs/:header.htmltitle.htmlfundamentals.htmlterm_of_use.htmldiagram.htmlschema.htmlservers.htmlteam.htmlsupport.htmlroles.htmlpricing.htmlsla.htmlcustom_properties.htmldialog_yaml.htmlfooter.htmlArchitecture — Reusable macros
macros/schema.html— recursiverender_nested_propertieswith type tooltips, badgesmacros/server.html—server_iconmapping 30+ server types to SVG iconsmacros/support.html— support channel icon/link renderingmacros/authoritative_definitions.html— authoritative definition badgesVisual design
space-y-6vertical rhythm between all sectionsBug fixes
<dt>/<dd>outside<dl>replaced with<div>inteam,term_of_use,roles,sla,servers— invalid usage caused silentbrowser DOM repair breaking
space-y-*selectors.<table>to<dl>/grid; supports bothmapping and list input formats;
break-allprevents horizontal overflow.Testing
uv run pytest tests/ -k "html or export"→ 129/129 pass.Full suite (no Docker): 1080 pass, 0 regressions.
uv run pytest)uv run ruff check --fix && uv run ruff format)