Skip to content

feat(ApiLink): default member label to member name, cased per platform#110

Open
dobromirts wants to merge 1 commit into
masterfrom
dtsvetkov/default-label-display
Open

feat(ApiLink): default member label to member name, cased per platform#110
dobromirts wants to merge 1 commit into
masterfrom
dtsvetkov/default-label-display

Conversation

@dobromirts

Copy link
Copy Markdown
Contributor

Closes #109
Related to IgniteUI/igniteui-documentation#393

When <ApiLink> is used with a member but no explicit label, the auto-generated label is now just the member name instead of Type.member, cased per platform:

  • WebComponents / React / Angular → camelCase (layout, singleBranchExpand)
  • Blazor → PascalCase (Layout, SingleBranchExpand)

Previously <ApiLink type="DockManager" member="layout" /> rendered IgrDockManager.layout; it now renders layout. This removes the need to add a redundant label="layout" in the docs.

Scope:
Display-only change. URLs, member anchors, link resolution, type-only paths are unchanged. An explicit label still overrides the default.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates <ApiLink> so that when member is provided without an explicit label, the rendered link text defaults to the member name (instead of Type.member), formatted per platform conventions (camelCase for WebComponents/React/Angular, PascalCase for Blazor). This aligns the component’s display behavior with the docs authoring workflow described in issue #109.

Changes:

  • Adjusted TypeDoc link label fallback logic to prefer the member name (platform-cased) when label is omitted.
  • Added small member-casing helpers (upperFirst, lowerFirst, formatMemberName) to support platform-specific label formatting.
  • Updated ApiLink README to document the new default label behavior and example output.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/components/mdx/ApiLink/ApiLink.astro Changes default display label generation for member links and adds platform-specific member casing.
src/components/mdx/ApiLink/README.md Documents the new member-based default label behavior and provides updated examples.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/mdx/ApiLink/ApiLink.astro
@igdmdimitrov igdmdimitrov added ✅ status: verified Applies to PRs that have passed manual verification and removed ❌ status: awaiting-test PRs awaiting manual verification labels Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✅ status: verified Applies to PRs that have passed manual verification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add member-based labels to the API link component

3 participants