feat(ApiLink): default member label to member name, cased per platform#110
Open
dobromirts wants to merge 1 commit into
Open
feat(ApiLink): default member label to member name, cased per platform#110dobromirts wants to merge 1 commit into
dobromirts wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
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
labelis omitted. - Added small member-casing helpers (
upperFirst,lowerFirst,formatMemberName) to support platform-specific label formatting. - Updated
ApiLinkREADME 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #109
Related to IgniteUI/igniteui-documentation#393
When
<ApiLink>is used with amemberbut no explicitlabel, the auto-generated label is now just the member name instead ofType.member, cased per platform:layout,singleBranchExpand)Layout,SingleBranchExpand)Previously
<ApiLink type="DockManager" member="layout" />renderedIgrDockManager.layout; it now renderslayout. This removes the need to add a redundantlabel="layout"in the docs.Scope:
Display-only change. URLs, member anchors, link resolution, type-only paths are unchanged. An explicit
labelstill overrides the default.