feat(viewer): add review comment tag filters - #779
Open
amh1k wants to merge 2 commits into
Open
Conversation
Contributor
|
🔍 OpenCodeReview found 2 issue(s) in this PR.
|
| {{if .Medium}}<span class="severity-badge severity-medium">Medium: {{.Medium}}</span>{{end}} | ||
| {{if .Low}}<span class="severity-badge severity-low">Low: {{.Low}}</span>{{end}} | ||
| <div class="comment-filter-bar severity-filters" aria-label="Filter comments by severity"> | ||
| <button type="button" class="comment-filter-chip filter-all is-active" data-filter-kind="all" data-filter-value="" aria-pressed="true">All: {{len $.Session.Comments}}</button> |
Contributor
There was a problem hiding this comment.
[maintainability · low]
The "All" button only appears in the severity filter bar. If the severity filter bar happens to be hidden (e.g., in a future refactor) or if a user is focused on the category bar, the only way to reset from a category filter is to click the already-active category chip again. Consider adding an "All" chip to the category filter bar as well for consistency and discoverability, or alternatively moving the "All" button outside both {{with}} blocks so it's always visible.
Use the same empty-string fallback when updating filter-chip active state as when handling clicks, preventing filters without a value attribute from appearing inactive after selection. Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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
Adds client-side filtering for review comments in the WebUI Viewer.
Users can now filter comments by severity or category, including Critical, High, Bug, Security, Maintainability, Test, and Other. Nonmatching comments and empty file groups are hidden, with an empty-state message when no comments match.
Type of Change
How Has This Been Tested?
go test ./...go test -race ./internal/viewergo vet ./...node --check internal/viewer/static/session.jsgit diff --checkChecklist
go fmt,go vet)Related Issues
Fixes #778