Skip to content

Conversation

@josh-wong
Copy link
Member

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

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 injecting tooltips on version index pages (both English and Japanese) by adding a helper to detect those pages and conditioning the effect on it.

  • Added isVersionIndexPage to detect version home page URLs.
  • Updated the useEffect hook to early-return when on a version index page.
  • Covered patterns for English and Japanese documentation paths.
Comments suppressed due to low confidence (1)

src/components/GlossaryInjector.tsx:59

  • [nitpick] Add unit tests for isVersionIndexPage covering all English and Japanese path patterns, and verify that the glossary injection hook correctly skips on version pages.
if (Object.keys(glossary).length === 0 || isVersionIndexPage()) return;

@josh-wong josh-wong merged commit c4c83cc 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