Skip to content

Add client-side search/filter to Glossary sidebar term list#704

Merged
richarddushime merged 3 commits intomasterfrom
copilot/add-quick-search-to-glossary
Mar 19, 2026
Merged

Add client-side search/filter to Glossary sidebar term list#704
richarddushime merged 3 commits intomasterfrom
copilot/add-quick-search-to-glossary

Conversation

Copy link
Contributor

Copilot AI commented Mar 18, 2026

The Glossary sidebar lists hundreds of terms across multiple languages with no way to filter them, making navigation slow.

Changes

layouts/glossary/single.html

  • Added filter_terms key to the multilingual dictionary for all 4 languages (English, German, Arabic, Turkish)
  • Added a <input> search box above #TableOfContents using the translated placeholder
  • Extended the existing DOMContentLoaded handler to filter nav-items in real-time

layouts/glossary/list.html

  • Added the same search input (English-only, consistent with existing hardcoded strings in this template)
  • Added a DOMContentLoaded script block with the filtering logic

Behaviour

Case-insensitive substring match hides non-matching nav-item entries on each keystroke. Entirely client-side, no additional dependencies.

searchInput.addEventListener('input', function() {
  const query = this.value.toLowerCase();
  document.querySelectorAll('#TableOfContents .nav-item').forEach(function(item) {
    const link = item.querySelector('.nav-link');
    const text = link ? link.textContent.toLowerCase() : '';
    item.style.display = text.includes(query) ? '' : 'none';
  });
});
Original prompt

This section details on the original issue you should resolve

<issue_title>Add quick search/filter to Glossary pages for faster navigation</issue_title>
<issue_description>The Glossary contains a large number of terms across multiple languages, making it difficult for users to quickly find specific entries.

Proposed Solution
Add a client-side quick search/filter feature to the Glossary pages that allows users to:

Search terms by keyword
Navigate directly to matching entries

This will :
Improve user experience for finding specific terms
Faster navigation through multilingual content
</issue_description>

<agent_instructions>In the glossary language-specific pages, there is a left-hand column with long list of entries. Add a client-side search that filters the list (simple entry box right above)</agent_instructions>

Comments on the Issue (you are @copilot in this section)

@LukasWallrich I don't quite understand the multilingual part? Most users would want to search within a single entry? But a search within the language would be helpful @richarddushime i meant the searching in different languages that are supported like english, turkish, arabic, german @LukasWallrich have a simple search box at the top of the list of terms (so behaviour is essentially the same as ctrl-f but filters search box)

💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

Co-authored-by: LukasWallrich <60155545+LukasWallrich@users.noreply.github.com>
Copilot AI changed the title [WIP] Add quick search/filter to Glossary pages for faster navigation Add client-side search/filter to Glossary sidebar term list Mar 18, 2026
Copilot AI requested a review from LukasWallrich March 18, 2026 16:19
@LukasWallrich LukasWallrich marked this pull request as ready for review March 18, 2026 16:20
@LukasWallrich LukasWallrich requested a review from a team as a code owner March 18, 2026 16:20
@github-actions
Copy link
Contributor

👍 All image files/references (if any) are in webp format, in line with our policy.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 18, 2026

📝 Spell Check Results

Found 1 potential spelling issue(s) when checking 2 changed file(s):

📄 layouts/glossary/single.html

Line Issue
32 Referenz ==> Reference

ℹ️ How to address these issues:

  1. Fix the typo: If it's a genuine typo, please correct it.
  2. Add to whitelist: If it's a valid word (e.g., a name, technical term), add it to .codespell-ignore.txt
  3. False positive: If this is a false positive, please report it in the PR comments.

🤖 This check was performed by codespell

@LukasWallrich
Copy link
Contributor

LukasWallrich commented Mar 18, 2026

Staging Deployment Status

This PR has been successfully deployed to staging as part of an aggregated deployment.

Deployed at: 2026-03-19 14:58:05 UTC
Staging URL: https://staging.forrt.org

The staging site shows the combined state of all compatible open PRs.

Copy link
Contributor

@richarddushime richarddushime left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@richarddushime richarddushime merged commit 8181c4f into master Mar 19, 2026
2 checks passed
@richarddushime richarddushime deleted the copilot/add-quick-search-to-glossary branch March 19, 2026 15:03
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.

Add quick search/filter to Glossary pages for faster navigation

3 participants