instructure / instructure/instructure-ui

Docs site: single-version components show under every "Component version" selector option, including releases they never shipped in

Open
#2,659 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
480
Forks
108
Avg merge
6d 1h
Merged PRs (30d)
16

Description

What: The docs site's version filter (packages/__docs__/lib/utils/buildVersionMap.mjs, isDocIncludedInVersion) only excludes a component from a library version when its package.json exports multiple versions (e.g. ./v11_6). For single-version packages (no multi-version exports), the fallback rule includes the component under every library version as long as it lives in a v1 folder.

Impact: A brand-new component (e.g. Card, added in v11.7, package.json only exports ., ./v11_7, ./latest) still appears under older version options like "v11.6 (legacy theming)" in the docs site's "Component version" selector, even though it never existed in that release. Selecting it shows the same v1 docs/examples, but the Usage snippet renders an import for a nonexistent export path (e.g. @instructure/ui-card/v11_6), which 404s if used.

Suggested fix: teach isDocIncludedInVersion / buildVersionMap to only include a no-multi-version-export component under the default/latest version, not every version.

🤖 Generated with Claude Code

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with packages/docs/lib/utils/buildVersionMap.mjs and trace isDocIncludedInVersion and buildVersionMap for components without multi-version exports. Reproduce the Component version selector behavior for a single-version component such as Card, including its Usage import path. Done means it appears only under the default/latest version and no older release produces a nonexistent export path.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
documentation, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
76/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.