Skip to content

Feature: cross-diagram drilldown navigation (drilldowns / parentHref) #280

Closed

Description

@brick-banzhuan

User problem

Authors often need to jump from a high-level architecture map into a related dataflow or sequence diagram (and back) without breaking the existing focus / Semantic Passport interaction model.

Proposal

Add an authored cross-HTML navigation contract:

  • drilldowns[] on nodes / components / participants / states: ordered { href, label, diagram_type? } relative .html targets
  • meta.parentHref on child diagrams for an explicit Back control (runtime can also use ?from=)

Interaction (non-goals preserved)

  1. Click → focus + Semantic Passport (unchanged)
  2. Passport lists every drilldown; user picks which child to open
  3. Ctrl+click / double-click → open the first (top) entry
  4. Back → header「返回上一级」when ?from= or meta.parentHref is present (not inside Passport)

Compatibility

  • Additive schema fields only; existing typed JSON remains valid
  • Relative .html hrefs only (no schemes); Viewer rejects unsafe targets
  • No change to focus, reach, route probe, or export semantics beyond navigation hooks

Evidence plan

  • Schema + generated validators
  • Example JSON fixtures
  • Regression test for attrs / viewer surfaces
  • Validate + render smoke on the examples

Opening this issue ahead of a Draft PR per CONTRIBUTING (schema / renderer contract change).

Activity

  1. drewdog88 commented on Sep 4, 2026

    @drewdog88

    Proposal from a real sibling-architecture pair

    We hit this on two published architecture maps that live next to each other as static HTML (a platform map and a vendor-integrations map). Archify cannot currently drill from a collapsed Integrations box into the other SVG, so readers have to bounce through a hub page.

    Issue #280 and PR #281 already cover the right problem. This is a contract note from that use, not a competing design.

    What we needed

    One node on diagram A should open diagram B. Not architecture → dataflow → sequence. Two architecture artifacts in the same directory:

    { "id": "integrations", "type": "cloud", "label": "Integrations", "href": "integrations.html" }

    The child can point back with meta.parentHref: "platform.html" (your field) or an equivalent node href.

    What we would keep from #281

    • Additive fields only; existing v1 JSON stays valid.
    • Relative .html targets only. No javascript:, https://, or parent-path escapes.
    • Passport still lists targets.
    • Route Probe picking must not navigate.
    • meta.parentHref / ?from= Back control is the right reverse path.

    What we would change

    1. Architecture-to-architecture is a first-class case. The issue text centers overview → dataflow/sequence. Sibling architecture maps are the same contract.

    2. A single-target shorthand. For one child, drilldowns: [{ "href": "integrations.html", "label": "Integrations map" }] is heavier than authors (and agents) will write. Suggest:

    • href on a node is sugar for a one-entry drilldowns list (label defaults to the node label).
    • If both are present, drilldowns wins.
    • Same relative-HTML safety rule as relativeHtmlHref.

    3. Visible click-through for the one-child case. Ctrl+click / double-click is discoverable only after reading the docs. For a collapsed box whose whole job is “open the other map”:

    • Render a small authored mark on the node (survives canonical SVG export).
    • Wrap the node in a native SVG <a href> so the link works without Viewer JS and in exported SVG.
    • Click follows the only target. Alt-click (or a modifier you already use) keeps today’s focus + Passport behavior.
    • If drilldowns.length > 1, keep feat: cross-diagram drilldown navigation (href / drilldowns / parentHref) #281: click focuses, Passport lists children, Ctrl/double-click opens the first.

    That preserves Passport for multi-child nodes and still feels like a link when there is exactly one destination.

    4. Tighten same-directory targets. A pattern like ^[A-Za-z0-9][A-Za-z0-9._-]*\\.html(?:#[A-Za-z][A-Za-z0-9._~/=&?-]*)?$ is enough for sibling Pages/docs artifacts and rejects ../, schemes, and javascript:. #focus= / #relation= fragments are useful so a child can land on a node.

    Non-goals (agree)

    No hosted multi-diagram runtime, no rewriting topology, no change to reach/route/export meaning beyond the navigation hooks.

    Happy to align a local href prototype with #281 if maintainers want the shorthand in that PR rather than a follow-up.

  2. tt-a1i commented on Sep 21, 2026

    @tt-a1i
    Owner

    The sibling architecture-map example is helpful. An architecture diagram linking to another architecture diagram fits the optional drilldown direction we are already trying in #281, and relative local HTML links plus a visible return path are appropriate for that case. Your href shorthand and native SVG link ideas are useful follow-ups to evaluate against the current demo. Changing a single click from Focus to navigation would change an existing reader interaction, so I would keep that out of the current #281 acceptance until we can test it on several real diagrams and decide the interaction deliberately. If you have the sanitized platform/vendor pair, it would make a strong usability test for the current PR.

  3. tt-a1i commented on Oct 25, 2026

    @tt-a1i
    Owner

    Completed on dev through #281, integrated by #1102 at commit 10b4dd5. Original contribution history is retained.

    The accepted optional sibling-HTML drilldown slice, direct-parent Back, reader context inheritance and canonical SVG link export are implemented. Combined navigation/explanation behavior was verified in real Chrome; broader Atlas/multi-diagram product work is outside this closure.

    The exact integrated candidate 98efbfc passed CI run 40177166414: 19 successful jobs, no failures, two deployment-only skips. Closing as completed in the development branch; this does not announce a release or a live installation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions