Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dotnet] Fix API docs static generation #14651

Merged
merged 7 commits into from
Nov 5, 2024

Conversation

nvborisenko
Copy link
Member

@nvborisenko nvborisenko commented Oct 25, 2024

User description

Description

image

Motivation and Context

Fixes #14650

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

PR Type

Bug fix, Documentation


Description

  • Updated the docfx.json configuration to improve the static generation of API documentation, including changes to source and destination paths and global metadata settings.
  • Added a new index.md file to serve as the welcome page for the Selenium .NET API documentation.
  • Introduced a toc.yml file to define the table of contents for the WebDriver and Support sections in the documentation.

Changes walkthrough 📝

Relevant files
Configuration changes
docfx.json
Update docfx configuration for API documentation generation

dotnet/docs/docfx.json

  • Updated source paths for metadata generation.
  • Changed destination paths for API documentation.
  • Added exclusion for _site/** in content files.
  • Updated global metadata with application name and favicon.
  • +28/-21 
    Documentation
    index.md
    Add index file for Selenium .NET API documentation             

    dotnet/docs/index.md

    • Added a new index file for Selenium .NET API documentation.
    +2/-1     
    toc.yml
    Add table of contents for documentation sections                 

    dotnet/docs/toc.yml

    • Created a table of contents for WebDriver and Support sections.
    +5/-0     

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    Copy link
    Contributor

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Configuration Validation
    Ensure that the updated source paths and destination paths in the docfx.json file are correct and point to the right locations for WebDriver and Support projects.

    Metadata Completeness
    Verify if the global metadata settings are sufficient for the documentation needs, such as proper application name and favicon path.

    Content Adequacy
    The welcome page (index.md) contains only a title. Consider adding more introductory content to provide better context for users.

    TOC Structure
    Verify if the table of contents structure in toc.yml is comprehensive enough to cover all necessary sections of the WebDriver and Support documentation.

    Copy link
    Contributor

    qodo-merge-pro bot commented Oct 25, 2024

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Score
    Enhancement
    ✅ Add a home page link to the table of contents for improved navigation
    Suggestion Impact:The suggestion to add a home page link was implemented by adding an "Intro" link with href "index.md" at the top of the table of contents.

    code diff:

    -  href: support/toc.yml+- name: Intro
    +  href: index.md
    +

    Consider adding a home page or overview link at the top of the table of contents for
    better navigation and user experience.

    dotnet/docs/toc.yml [1-5]

    +- name: Home
    +  href: index.md
     - name: WebDriver
       href: webdriver/toc.yml
       expanded: true
     - name: Support
       href: support/toc.yml
    • Apply this suggestion
    Suggestion importance[1-10]: 9

    Why: Including a home page link at the top of the table of contents improves navigation and user experience by providing a clear starting point for users. This is a practical enhancement for better documentation usability.

    9
    Add a global metadata field for the application title to enhance SEO and user experience

    Consider adding a "globalMetadata" field for "_appTitle" to set the browser title
    for your documentation pages, which can improve SEO and user experience.

    dotnet/docs/docfx.json [50-54]

     "globalMetadata": {
       "_appName": "Selenium .NET API Docs",
    +  "_appTitle": "Selenium .NET API Documentation",
       "_appFaviconPath": "images/favicon.ico",
       "_enableSearch": true
     }
    • Apply this suggestion
    Suggestion importance[1-10]: 8

    Why: Adding a "_appTitle" field in the global metadata can significantly improve SEO and user experience by providing a clear and descriptive title for the documentation pages. This is a valuable enhancement for the documentation.

    8
    Best practice
    Standardize file pattern formats for improved consistency and maintainability

    Consider using a consistent format for file patterns. Currently, you're using both
    "
    /.csproj" and "**/.{md,yml}". Standardizing these patterns can improve
    maintainability and reduce potential errors.**

    dotnet/docs/docfx.json [8-31]

     "files": [
       "**/*.csproj"
     ]
     ...
     "files": [
    -  "**/*.{md,yml}"
    +  "**/*.md",
    +  "**/*.yml"
     ]
    Suggestion importance[1-10]: 7

    Why: The suggestion to standardize file pattern formats enhances code consistency and maintainability, reducing potential errors. It is a good practice to use a consistent format, especially when dealing with file patterns in configuration files.

    7

    💡 Need additional feedback ? start a PR chat

    @nvborisenko
    Copy link
    Member Author

    image

    Copy link
    Member

    @diemol diemol left a comment

    Choose a reason for hiding this comment

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

    Thank you!

    @diemol diemol merged commit c5cf658 into SeleniumHQ:trunk Nov 5, 2024
    2 of 4 checks passed
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    [🐛 Bug]: [dotnet] API Documentation web site is broken
    2 participants