Skip to content

fix(docs): correct View source URLs for acronym-prefixed examples#8054

Open
Abdeltoto wants to merge 1 commit intopalantir:developfrom
Abdeltoto:fix/docs-example-source-6296
Open

fix(docs): correct View source URLs for acronym-prefixed examples#8054
Abdeltoto wants to merge 1 commit intopalantir:developfrom
Abdeltoto:fix/docs-example-source-6296

Conversation

@Abdeltoto
Copy link
Copy Markdown

Fixes #6296

Checklist

  • Includes tests (exampleSourceFileName.test.ts, isReactNodeEmpty(false) in core)
  • Update documentation (not required; fixes doc site behavior)

Changes proposed in this pull request

  • View source on GitHub: Example export names like HTMLSelectExample were turned into hTMLSelectExample.tsx by lowercasing only the first character. We now derive filenames with lodash/camelCase via a small helper exampleExportNameToSourceFileName, so links resolve to htmlSelectExample.tsx and other acronym-leading names behave consistently.
  • Tests: Vitest added to @blueprintjs/docs-app (node environment) for the helper; one extra assertion in utils.test.tsx for isReactNodeEmpty(false).

Reviewers should focus on

  • Click View source on GitHub from HTML select docs after deploy; link should hit the real file on develop.
  • pnpm --filter @blueprintjs/docs-app test and existing core test suites.

Use lodash camelCase to map PascalCase export names to on-disk .tsx filenames (e.g. HTMLSelectExample -> htmlSelectExample). Extract exampleExportNameToSourceFileName with unit tests.

Add Vitest for docs-app and assert isReactNodeEmpty(false) in core utils tests.

Fixes palantir#6296.

Made-with: Cursor
@changelog-app
Copy link
Copy Markdown

changelog-app Bot commented Apr 14, 2026

Generate changelog in packages/core/changelog/@unreleased

Type (Select exactly one)

  • Feature (Adding new functionality)
  • Improvement (Improving existing functionality)
  • Fix (Fixing an issue with existing functionality)
  • Break (Creating a new major version by breaking public APIs)
  • Deprecation (Removing functionality in a non-breaking way)
  • Migration (Automatically moving data/functionality to a new system)

Description

fix(docs): correct View source URLs for acronym-prefixed examples

Check the box to generate changelog(s)

  • Generate changelog entry

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.

docs: view source link is broken for htmlSelectExample

1 participant