Skip to content

fix: address copilot PR review suggestions for API docs components#523

Merged
IEvangelist merged 2 commits intoapi-docsfrom
copilot/sub-pr-522
Mar 7, 2026
Merged

fix: address copilot PR review suggestions for API docs components#523
IEvangelist merged 2 commits intoapi-docsfrom
copilot/sub-pr-522

Conversation

Copy link
Contributor

Copilot AI commented Mar 6, 2026

Eight issues flagged in the PR review for the API docs infrastructure — observer leaks, hardcoded URLs, duplicate event listeners, invalid HTML nesting, inconsistent imports, and a missing security attribute.

Changes

Search.astro

  • Store MutationObserver on window.__apiNoticeObserver; disconnect before re-creating on each astro:after-swap to prevent observer accumulation
  • Replace hardcoded /reference/api/ href with import.meta.env.BASE_URL-relative path

Sidebar.astro

  • Guard all document.addEventListener registrations with window.__apiSidebarInit / window.__apiSidebarStickInit flags to prevent duplicates across client-side navigations
  • Derive back link from routeData.locale so it resolves correctly on localized pages (e.g. /ja/reference/overview/)

MemberCard.astro

  • Change DocContent tag="p"tag="div" to prevent invalid nested <p> elements (DocContent emits <p class="doc-para"> internally)

InheritanceDiagram.astro

  • Replace relative ../../utils/packages import with @utils/packages alias for consistency

NuGetButton.astro

  • rel="noopener"rel="noopener noreferrer" on target="_blank" link

DocContent.astro

  • Remove unused resolveTypeLink import

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
Copilot AI changed the title [WIP] Add infrastructure to generate API documentation fix: address copilot PR review suggestions for API docs components Mar 6, 2026
@IEvangelist IEvangelist marked this pull request as ready for review March 7, 2026 05:14
@IEvangelist IEvangelist merged commit 1ac7a31 into api-docs Mar 7, 2026
1 check passed
@IEvangelist IEvangelist deleted the copilot/sub-pr-522 branch March 7, 2026 05:14
IEvangelist added a commit that referenced this pull request Mar 16, 2026
* feat: build out infrastructure to generate API docs for both C# and TypeScript

* fix: address copilot PR review suggestions for API docs components (#523)

* Initial plan

* fix: address PR review suggestions from copilot reviewer

Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>

* Refactor code structure for improved readability and maintainability

* fix: refine sidebar collapse behavior for API reference pages

* fix: update search component styles for better visibility on API reference pages

* fix: update API reference links to point to C# APIs

* feat(api): add support for standalone functions in TypeScript API reference

- Implemented functionality to generate static paths for standalone functions without a qualified name.
- Enhanced the TypeScript API reference pages to display function signatures, parameters, and return types.
- Updated the sidebar to include functions alongside types and enums.
- Improved the presentation of function details, including links back to parent types and method definitions.
- Refactored existing code for better clarity and consistency in naming conventions (e.g., changed "Enumerations" to "Enums").
- Introduced a new InpageSearchSync component for managing search state in the URL.
- Added a new method detail page for displaying individual method capabilities of handle types.

* feat(api-reference): add unified search bar and version filter components

- Introduced `ApiSearchBar` component for a unified search interface with kind filters and version dropdown.
- Added `VersionFilter` component for version selection with checkbox toggles and "Select all" functionality.
- Updated CSS styles for new components and adjusted existing styles for consistency.
- Modified API sidebar links to include a specific path for C# references.
- Enhanced page title styling for better visibility.

* fix(api-reference): improve layout and overflow handling for breadcrumb and member card components

* feat(breadcrumbs): implement content breadcrumbs functionality and integrate with Markdown content

* feat(api-reference): add API reference path to the configuration

* feat(banner): add announcement banner component with dismiss functionality

* feat(thanks): add LicenseBadge component and license titles data

* fix(deployment): update prerequisites for Azure deployment documentation

* feat(terminal-showcase): enhance terminal showcase styling and add gradient effect
feat(page-title): refactor page title component to use PageActionsPageTitle
fix(api-pages): disable page actions for API reference pages
style(css): remove unnecessary dropdown menu styling

* refactor(PageTitle): simplify dropdown handling and improve API page title initialization

* fix(api-reference): improve overflow handling for code, links, and preformatted text

* feat(Search): add API search notice with links to C# and TypeScript references

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
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.

2 participants