Feature/op category in popover#2667
Open
alleria173 wants to merge 4 commits into
Open
Conversation
- Add 'Show operation category in popover' option (enabled by default) - Display category names (excluding Favourites) in operation popovers - Make category names clickable to open the category in operations list - Clicking a category link clears search and expands the category - Add UI test for category popover functionality - Addresses issue gchq#1654
- Use originalName for category lookup as highlightSearchStrings modifies this.name with <b> tags, which broke category display for name-matched search results - Derive category ID from link text since Bootstrap's popover sanitizer strips custom data-* attributes - Don't hide all categories before showing the target; the accordion data-parent behaviour handles that, and the manual hide caused a transition race that closed the target category instead of opening it
alleria173
marked this pull request as ready for review
July 14, 2026 10:28
- Click the option checkbox's label instead of the input, as Bootstrap
Material Design restyles checkboxes making the input itself not
interactable in headless Chrome
- Wait for any in-progress accordion transition before opening the target
category in categoryLinkClick. When the search box collapses an open
category and a category link is clicked during that transition,
Bootstrap silently ignores the collapse('show') call
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
I chose these issues to work on, as I like this type of UI improvement. Its changes are more broad that the other issues I've been working on, but I feel more confident with the codebase to do this one. I held one thing back, which was a strong visual indicating the current category that is opened - when you click on a category link in the popover, it's not always evident that you've opened the category - a nice way to indicate this would be highlighting the currently open category with a new colour like #FFE6EE.
Adds the ability to see which category (or categories) an operation belongs to directly from its hover popover, both in search results and when browsing the operations list.
Implementation notes:
HTMLOperation.getCategoryInfo()derives category membership from the app's category configuration at render time, so no changes to operation configs were needed.<b>tags.data-*attributes, so the click handler resolves the target category panel from the link text using the same ID scheme asHTMLCategory.toHtml().Existing Issue
Fixes #1654 and Fixes #1878
Screenshots


AI disclosure
This pull request was developed with the assistance of GitHub Copilot (Claude). All code has been reviewed, manually tested in the browser across the affected interaction scenarios (search-result popovers, category-list popovers, multi-category operations, option toggle, and category-link navigation), and is understood by the submitter.
Test Coverage
tests/browser/00_nightwatch.jscovering: the category line appearing in a search-result popover, clicking the category link (search cleared and target category opened), and toggling the option off/on via the Options modal.npm test), andnpm run lintis clean.