Skip to content

Link the upstream nodes a query references - #2590

Draft
shangyian wants to merge 1 commit into
mainfrom
ui-upstream-links
Draft

shangyian wants to merge 1 commit into
mainfrom
ui-upstream-links

Conversation

@shangyian

Copy link
Copy Markdown
Collaborator

Summary

Test Plan

  • PR has an associated issue: #
  • make check passes
  • make test shows 100% unit test coverage

Deployment Plan

Reading a transform, metric or dimension meant copying a name out of its
query and searching for it to get to the node it came from. The names in the
query are now links.

What gets linked is the node's own parents, which DJ already derived by
parsing that same query, so the links can only point at real upstreams and
cannot drift from what the query says. They arrive with the node payload,
so nothing new is fetched.

The highlighter splits a dotted name across several tokens, so a match is
found on the full text of a row and the tokens are then split at its
boundaries. Tokens outside a match keep the styling they came with, and a
row with no match is handed back to the highlighter untouched.

A name only counts when it stands alone: `default.orders` does not match
inside `default.orders_archive`, and where one parent's name prefixes
another's, the longer wins.

A link keeps the code block's type and colour in every state, marked only by
a faint dotted rule. The page's own link styling pulled the name out of the
monospace run and broke the alignment of the SQL around it, and the global
`a:hover` outranks a bare class, so the selectors carry the element. The
block also loses the vertical half of the highlighter's 2rem padding, which
read as dead space above and below the query.

Names written inside comments or string literals are linked too, and a
source node referenced by its physical table name rather than its node name
is not. Both seemed worth leaving until someone hits them.
@netlify

netlify Bot commented Sep 26, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for thriving-cassata-78ae72 canceled.

Name Link
🔨 Latest commit d64ab79
🔍 Latest deploy log https://app.netlify.com/projects/thriving-cassata-78ae72/deploys/6ab813e20d641600080d40f8

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.

1 participant