Skip to content

Link output scale to the Position and scale docs section - #6

Merged
dMopp merged 1 commit into
mainfrom
fix-scale-doc-link
Oct 21, 2026
Merged

dMopp merged 1 commit into
mainfrom
fix-scale-doc-link

Conversation

@dMopp

@dMopp dMopp commented Oct 21, 2026

Copy link
Copy Markdown
Owner

The (?) button of an output's scale opened the generic Settings table of
the Umbriel outputs docs instead of the Position and scale section, while
position already jumped there.

Cause

The deep-link heuristic in umbrielmod/docs.py (_best_anchor) accepts a
heading that contains the key only if the section mentions the key as code
(`scale`, scale = …). Position and scale only says "at scale 1.25",
so scale fell back to the table's section.

Fix

  • A plain-word mention now also counts, but only when the heading's other
    words are sibling keys of the same table (here position) or filler words.
    Top-level sections are not treated as siblings.
  • umbrielmod/data/docs.json: the output.<name>.scale link is updated.
  • New tests/test_docs.py covers the match and the cases that must keep
    their table link.

Verification

Regenerated the links from Umbriel revision 7ce3efa3ce8b (the bundled one)
before and after the change: exactly one link differs,
output.<name>.scale → outputs/?section=position-and-scale. A looser rule
would have redirected output, workspace, effects.window and others to
unrelated sections.

Users who fetched descriptions via Menu → Update schema and descriptions
get the fix after updating them once more.

The deep-link heuristic only accepted a heading containing the key when the
section mentioned it as code. "Position and scale" says "at scale 1.25", so
scale fell back to the settings table. A plain mention now counts when the
heading's other words are sibling keys of the same table.
@dMopp
dMopp merged commit 695fd4a into main Oct 21, 2026
4 checks passed
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