Skip to content

Conversation

@josh-wong
Copy link
Member

@josh-wong josh-wong commented Jun 17, 2025

Description

This PR hides glossary tooltips on version home pages by adjusting the glossary injection logic in the GlossaryInjector component accordingly.

Related issues and/or PRs

N/A

Changes made

  • src/components/GlossaryInjector.tsx: Added the isVersionIndexPage function to identify version index pages based on URL patterns for both English and Japanese documentation. Updated the useEffect hook to skip glossary injection on these pages.

Checklist

The following is a best-effort checklist. If any items in this checklist are not applicable to this PR or are dependent on other, unmerged PRs, please still mark the checkboxes after you have read and understood each item.

  • I have updated the side navigation as necessary.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation to reflect the changes.
  • Any remaining open issues linked to this PR are documented and up-to-date (Jira, GitHub, etc.).
  • My changes generate no new warnings.
  • Any dependent changes in other PRs have been merged and published.

Additional notes (optional)

N/A

@josh-wong josh-wong requested a review from Copilot June 17, 2025 09:23
@josh-wong josh-wong self-assigned this Jun 17, 2025
@josh-wong josh-wong added the improvement Improvements made to an existing feature label Jun 17, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the glossary injection logic to skip rendering tooltips on version home pages for both English and Japanese docs.

  • Introduces isVersionIndexPage to detect version index routes.
  • Stops glossary injection when on a version home page.
  • Leaves existing glossary loading and rendering unchanged for other pages.
Comments suppressed due to low confidence (1)

src/components/GlossaryInjector.tsx:34

  • Add unit tests for isVersionIndexPage to verify that all English and Japanese version URL patterns correctly return true, and that other paths return false.
const isVersionIndexPage = () => {

@josh-wong josh-wong merged commit 0fea301 into main Jun 17, 2025
1 check passed
@josh-wong josh-wong deleted the remove-glossary-tooltips-version-from-home-pages branch June 17, 2025 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improvements made to an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant