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

docs: enforce trailing slash configuration #968

Merged
merged 1 commit into from
Feb 10, 2025
Merged

Conversation

cheton
Copy link
Member

@cheton cheton commented Feb 7, 2025

PR Type

Documentation, Enhancement


Description

  • Enforced trailingSlash configuration in next.config.mjs for consistent URL structure.

  • Updated numerous relative links in documentation files to ensure correctness and consistency.

  • Improved navigation and usability of documentation by fixing broken or incorrect paths.


Changes walkthrough 📝

Relevant files
Configuration changes
1 files
next.config.mjs
Enforce `trailingSlash` configuration for consistent URLs
+1/-0     
Documentation
19 files
index.page.mdx
Fix relative link to theme colors section                               
+1/-1     
index.page.mdx
Update links to style props and related sections                 
+3/-3     
index.page.mdx
Correct links to modal, space, and button-base components
+3/-3     
index.page.mdx
Fix link to `useColorMode` hook                                                   
+1/-1     
index.page.mdx
Update link to `useColorStyle` hook                                           
+1/-1     
index.page.mdx
Correct link to box component                                                       
+1/-1     
index.page.mdx
Correct link to box component                                                       
+1/-1     
index.page.mdx
Update migration guide and icons links                                     
+1/-1     
index.page.mdx
Fix link to input component                                                           
+1/-1     
index.page.mdx
Correct link to input-control component                                   
+1/-1     
index.page.mdx
Fix link to box component                                                               
+1/-1     
index.page.mdx
Update link to SVGIcon documentation                                         
+1/-1     
index.page.mdx
Correct link to checkbox component                                             
+1/-1     
index.page.mdx
Fix link to scrollbar component                                                   
+1/-1     
index.page.mdx
Update link to theme colors section                                           
+1/-1     
index.page.mdx
Fix link to `useToastManager` hook                                             
+1/-1     
react-components-part-1.page.mdx
Update links to code component documentation                         
+2/-2     
react-components-part-2.page.mdx
Correct links to component variants and styles                     
+6/-6     
react-documentation-site.page.mdx
Update links to various documentation sections                     
+10/-10 
Additional files
12 files
react-icons.page.mdx +1/-1     
index.page.mdx +3/-3     
index.page.mdx +5/-5     
index.page.mdx +9/-9     
migrating-from-v0-to-v1.page.mdx +15/-15 
migrating-from-v1-to-v2.page.mdx +3/-3     
index.page.mdx +4/-4     
index.page.mdx +1/-1     
index.page.mdx +1/-1     
index.page.mdx +1/-1     
index.page.mdx +1/-1     
update-style-props.mjs +1/-1     

Need help?
  • Type /help how to ... in the comments thread for any questions about Qodo Merge usage.
  • Check out the documentation for more information.
  • Copy link

    codesandbox bot commented Feb 7, 2025

    Review or Edit in CodeSandbox

    Open the branch in Web EditorVS CodeInsiders

    Open Preview

    Copy link

    changeset-bot bot commented Feb 7, 2025

    ⚠️ No Changeset found

    Latest commit: 369e2ca

    Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

    This PR includes no changesets

    When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

    Click here to learn what changesets are, and how to add one.

    Click here if you're a maintainer who wants to add a changeset to this PR

    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 Change

    The addition of trailingSlash: true configuration will affect all URLs in the documentation site by appending a trailing slash. Verify that this change doesn't break any existing links or functionality.

    trailingSlash: true,
    Path Update

    The theme documentation links are updated to use a relative path with '../../theme/'. Verify that this new path structure works correctly for all generated documentation links.

    x.scale ? `[${x.scale}](../../theme/${kebabize(x.scale)})` : '',

    Copy link
    Contributor

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Impact
    General
    Document configuration purpose

    The trailingSlash configuration is added but not documented. Add a comment
    explaining why trailing slashes are enforced and what impact it has on URL
    handling.

    packages/react-docs/next.config.mjs [343-344]

     pageExtensions: ['page.js', 'page.mdx'],
    +// Enforce trailing slashes in URLs for consistent path handling and better SEO
     trailingSlash: true,
    • Apply this suggestion
    Suggestion importance[1-10]: 4

    __

    Why: Adding documentation for the trailingSlash configuration would improve code maintainability by explaining its purpose and impact. The suggestion is valid but has moderate importance since it's only about adding a comment.

    Low

    Copy link

    codecov bot commented Feb 7, 2025

    Bundle Report

    Bundle size has no change ✅

    Copy link

    codesandbox-ci bot commented Feb 7, 2025

    This pull request is automatically built and testable in CodeSandbox.

    To see build info of the built libraries, click here or the icon next to each commit SHA.

    Copy link

    codecov bot commented Feb 7, 2025

    Codecov Report

    All modified and coverable lines are covered by tests ✅

    Project coverage is 79.28%. Comparing base (c9c55ed) to head (369e2ca).
    Report is 1 commits behind head on v2.

    Additional details and impacted files
    @@           Coverage Diff           @@
    ##               v2     #968   +/-   ##
    =======================================
      Coverage   79.28%   79.28%           
    =======================================
      Files         404      404           
      Lines        6748     6748           
    =======================================
      Hits         5350     5350           
      Misses       1398     1398           

    ☔ View full report in Codecov by Sentry.
    📢 Have feedback on the report? Share it here.

    @trendmicro-frontend-bot
    Copy link
    Contributor

    trendmicro-frontend-bot commented Feb 7, 2025

    Tonic UI Demo

    On 2025-02-07 08:00:44 +0000, PR #968 (369e2ca) was successfully deployed. You can view it at the following link:
    https://trendmicro-frontend.github.io/tonic-ui-demo/react/pr-968/

    @cheton cheton force-pushed the docs/trailing-slash branch from db4628a to 76c54df Compare February 7, 2025 07:44
    @cheton cheton force-pushed the docs/trailing-slash branch from 76c54df to 369e2ca Compare February 7, 2025 07:53
    @cheton cheton merged commit 5e738a5 into v2 Feb 10, 2025
    8 checks passed
    @cheton cheton deleted the docs/trailing-slash branch February 10, 2025 07:00
    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.

    2 participants