PR: ApiLink migration from igniteui-xplat-docs + residual fix tooling#181
Open
viktorkombov wants to merge 3 commits into
Open
PR: ApiLink migration from igniteui-xplat-docs + residual fix tooling#181viktorkombov wants to merge 3 commits into
viktorkombov wants to merge 3 commits into
Conversation
Fixes applied across MDX, platform-context, and migration script:
- React inputs/layouts/data-grids aliased to actual published packages
- Migration script emits prefixed={false} for enums; strips generic arity
- Post-pass script reclassifies class -> interface for mis-tagged types
- Spreadsheet ApiLinks no longer get incorrect prefixed={false}
- Genuinely missing types demoted to plain backticks
Result: 0 broken / 1681 OK React links.
- Replaced instances of `IgrDockManager`, `IgrContentPane`, `IgrSplitPane`, `IgrTabGroupPane`, and `IgrDocumentHost` with <ApiLink> components in dock manager documentation. - Updated toolbar documentation to reflect changes in component names and added <ApiLink> for `IgrToolbar`. - Modified calendar documentation to use <ApiLink> for `IgrDateRangeDescriptor` and related properties. - Changed references from `IgrSpreadsheetAction` to `SpreadsheetAction` in clipboard and commands documentation. - Updated spreadsheet configuration documentation to use <ApiLink> for `SpreadsheetSelection` and `SpreadsheetCellRange`. - Adjusted update guide to replace `IgrInput` and `IgrButton` with <ApiLink> components for clarity.
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.
What this PR does
The main deliverable is converting ~4,100 bare backtick type references across 489 xplat MDX files into
<ApiLink>components using theigniteui-xplat-docsapiMap — the same source the original xplat-docs gulpfile used. This was driven by a new migration script (docs/xplat/scripts/resolve-api-links.mjs) that reads each file'smentionedTypes:frontmatter and replaces every matching`TypeName`/`memberName`with an<ApiLink>tag. 171 files havementionedTypesand were processed.On top of the migration, this PR:
kind, missingprefixed={false}, and type names that don't exist in React TypeDocContent changes
xplat (
docs/xplat/src/content/) — 489 MDX filesMigration from igniteui-xplat-docs:
<ApiLink pkg="..." type="..." member="..." />across charts, geo-map, excel library, gauges, sparkline, data grid, tree, listapiMap/*.jsonto determine package, kind, and correct member namesmentionedTypes:frontmatter drives which types each file can referenceReact residual fixes (440+ links):
pkg=aliases corrected:inputs/layouts/gridsremapped to the actual published React packagesprefixed={false}(React enums have noIgrprefix)`IgxList<T>`→IgxList)exclude="React"or demoted to plain backticksclassin apiMap butinterfacein React TypeDoc — added per-platformkind="interface"splitPlatform-specific fixes:
exclude="Angular"/exclude="Angular,WebComponents"on types absent from those platforms (spreadsheet, excel members, some grid types)exclude="Angular"added where missing onGroupingExpression/GroupByRowSelectorTemplateDetailslist.mdx,tree.mdx— addedexclude="WebComponents"on WC-absent typesangular (
docs/angular/src/content/) — 190 MDX files (EN + JP)<ApiLink>tags added (charts, geo-map, spreadsheet, gauges, excel, radial/linear gauge) matching the igniteui-xplat-docs originalssync-generated.mjs; angular-specific JP hand-written pages (groupby, grids) fixed separatelyexclude="Angular"/exclude="Angular,Blazor,WebComponents"added on types that don't exist in the Angular TypeDocNew content pages
Added as part of the branch (separate commits):
ai/ai-assisted-development-overview,ai/cli-mcp,ai/maker-framework,ai/theming-mcp,ai/skills— EN + JPlayouts/splitter— new WC/React topic + JPgeneral/general-step-by-step-guide-using-cligeneral/general-how-to-mcp-e2ejp/layouts/navigation-drawer,jp/layouts/navbar,jp/layouts/toolbar, and other JP pages backfilledNew scripts
docs/xplat/scripts/resolve-api-links.mjs← main migration driverConverts inline
`TypeName`/`memberName`backtick references in xplat MDX to<ApiLink>using igniteui-xplat-docsapiMap/*.json. Requires../igniteui-xplat-docsto be checked out as a sibling repo.docs/xplat/scripts/fix-api-link-attrs.mjsPost-pass over already-emitted
<ApiLink>tags to fix attributes: addsprefixed={false}for enums, strips generic arity from type names, reclassifieskind="class"→kind="interface"for types that are actually interfaces.scripts/check-mdx-links.mjs← primary validation toolValidates all
<ApiLink>tags in MDX source by resolving their staging URLs using the same logic as ApiLink.astro, then HTTP-checking each URL. No build required.sync-generated.mjs), then checksdocs/angular/src/content/docs/xplat/src/content/no-suffix,no-prefix,no-both) and outputs the exact prop fixmdx-link-report-{platform}.mdconsumed byapply-mdx-report-fixes.mjsscripts/apply-mdx-report-fixes.mjsReads
mdx-link-report-*.mdand bulk-appliesexclude,excludeSuffixFor, andexcludePrefixForto the matching<ApiLink>tags in MDX source. Merges fixes across platforms (e.g. Angular + WC both needingexcludeSuffixFor→excludeSuffixFor="Angular,WebComponents"). Angular fix paths are remapped to xplat source automatically.scripts/apply-excludes.mjsReads
mdx-link-report-*.mdand applies onlyexclude="Platform"fixes (symbol absent from API entirely). For suffix/prefix fixes useapply-mdx-report-fixes.mjsinstead.scripts/apply-react-platform-fixes.mjsReport-driven fixer for React-specific issues: either emits a 2-platform split (
kind="interface"for React, original for other platforms) or wraps the tag in<PlatformBlock for="Angular,Blazor,WebComponents">for types missing from React TypeDoc entirely.scripts/check-api-links.mjs(enhanced)The existing dist/HTML crawler now probes URL variants for each broken link. For class-segment URLs with known suffixes (
Component,Module,Directive, etc.) it triesno-suffix,interfaces+no-suffix, andinterfacesand reports which resolves — with a concreteIn ApiLink: set kind="interface"/suffix={false}hint in console, MD, and JSON output.New
ApiLinkprops (ApiLink.astro— astro-components PR)excludeSuffixFor="Angular,WebComponents"classSuffixfor listed platforms — link stays activeexcludePrefixFor="Angular"Igx/Igr/…) for listed platforms — link stays activeWhen to use each:
exclude="Platform"excludeSuffixFor="Platform"excludePrefixFor="Platform"suffix={false}/prefixed={false}Validation results
docs/angular/src/content/(after sync)docs/xplat/src/content/docs/xplat/src/content/check-mdx-links:report:wc)docs/xplat/src/content/src/lib/platform-context.tsupdatesPackage aliases added/corrected for React (
inputs-react,layouts-react,grids-reactpackages) and any new packages from the xplat migration.Skills updated
.github/skills/xplat-docs-api-links/SKILL.md— addedexcludeSuffixFor/excludePrefixForprop rows + decision guide.github/skills/xplat-docs-api-map-sync/SKILL.md— new skill documenting how to sync docConfig.json from igniteui-xplat-docs and run the resolvers.github/skills/xplat-docs-platform-block/SKILL.md— updated with PlatformBlock nesting rules for the new MDX patterns