Skip to content

feat(tracker): field-prefixed search, inline filter chips and zero-hit empty state - #10998

Open
MichaelUray wants to merge 2 commits into
hcengineering:developfrom
MichaelUray:feat/tracker-search-filter
Open

feat(tracker): field-prefixed search, inline filter chips and zero-hit empty state#10998
MichaelUray wants to merge 2 commits into
hcengineering:developfrom
MichaelUray:feat/tracker-search-filter

Conversation

@MichaelUray

Copy link
Copy Markdown
Contributor

Summary

Split out of #10992 following review feedback. This supersedes the closed #10872 with a clean branch based on current develop and contains only the shared search/filter work; no Gantt code.

Adds SearchInputAdvanced, match highlighting, inline filter chips with an overflow popover, a reusable zero-hit empty state in view-resources, and search-scope/highlight view options wired into List and Kanban.

Known field prefixes are routed through Elasticsearch query_string; queries without a recognized prefix retain the existing simple_query_string path. Workspace and space access filtering remain unchanged.

The exact head passed all required fork-CI jobs, including uitest, uitest-pg, uitest-workspaces, uitest-qms, build, svelte-check, test, formatting, and docker-build.

The Gantt feature remains in #10992 and builds on this PR.

…t empty state

Adds SearchInputAdvanced (field:value prefixes routed to Elasticsearch query_string), match highlighting, inline filter chips with overflow popover, a reusable zero-hit empty state in view-resources, and search-scope/highlight view options for List and Kanban.

Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com>
/**
* Allowed ES-native fields users may type directly.
*
* KEEP IN SYNC with elastic/src/adapter.ts KNOWN_FIELD_RE (and vice versa).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

What do you think about refactoring it to ensure both sides use synced fields?
For example, add a small reusable package with common configs for server side and UI.

// highlight toggles stay consistent across every viewlet that opts in.
const SEARCH_VIEW_OPTIONS: ViewOptionModel[] = [
{
key: 'showQuickModeSelector',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do I understand correctly that this isn't used in this PR, but will be used in Gantt charts?

import { encodeSearch } from './SearchInputAdvanced.encoder'
import { propSyncValue } from './SearchInputAdvanced.sync'

describe('encodeSearch', () => {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think it would be better to place tests in a separate __tests__ folder

"SearchEmptyTitle": "No issues found for \"{query}\"",
"SearchEmptyActiveFilters": "Active filters: {filters}",
"SearchEmptyClearFilters": "Search without filters",
"SearchEmptyAllProjects": "Search in all projects"

@ArtyomSavchenko ArtyomSavchenko Jul 30, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I suggest to fix translations for this and other locales

return '\\-' + tok.raw.slice(1).replace(/[+!(){}[\]^"~\\/:&|<>=]/g, '\\$&')
}
if (!PREFIX_VALUE_RESERVED_RE.test(tok.raw)) return tok.raw
return tok.raw.replace(/[+!(){}[\]^"~\\/:&|<>=]/g, '\\$&')

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[minor] I suggest to move this regex to const

// set by the fast query alone, so a stale slow-query result could skew the
// count right after a search changed.
onDestroy(() => {
resultIssueCountStore.set(-1)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

resultIssueCountStore is a single global mutated by multiple viewlets.
List and Kanban both write it; IssuesView resets it to -1 on query/filter change. The -1 sentinel + onDestroy reset largely covers teardown races, but during a viewlet swap (List→Kanban) both can be briefly mounted and write competing counts.

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.

2 participants