mirror of
https://github.com/hcengineering/platform.git
synced 2026-08-17 18:05:42 +02:00
* feat(tracker): field-prefixed search, inline filter chips and zero-hit 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> * refactor(tracker-search): address review follow-ups on search/filter rework Shared, non-storage-specific field list, test-folder conventions, locale coverage, single regex source and an owner-token gate for the result count. - core: add shared `fullTextSearchFields` constant next to FullTextSearchContext as the single source of truth for the full-text fields exposed to `field:value` targeting. The client encoder derives ES_NATIVE_FIELDS from it and the elastic adapter derives KNOWN_FIELD_RE from it, replacing the two "KEEP IN SYNC" copies. Per-field boost weights stay a local adapter detail. - tests: move the five co-located tests into each package's existing test folder convention (ui `__test__`, view-resources `__tests__`) and fix the relative imports. - i18n: translate the new tracker search/filter strings in the remaining locales (zh, ja, ko, cs, es, fr, it, pt, pt-br, tr), reusing each file's existing terminology; ICU placeholders left unchanged. - encoder: hoist the reserved-character class into one constant and build two RegExp instances from it (non-global for `.test()`, global for `.replace()`) to avoid the shared-lastIndex trap. - view-resources: guard `resultIssueCountStore` writes with an owner-token gate so a superseded viewlet can no longer clobber the active viewlet's count; List/KanbanView claim and release, IssuesView resets through the current owner. Assumes a single active IssuesView surface. - view-resources: make result-count reporting opt-in via a new `reportResultCount` prop on List (default true). Embedded, non-primary List instances (sub-issues / related issues in the issue edit panel, routed through SubIssueList) pass false and never claim the owner token, so opening and closing an issue can no longer strand the primary Issues viewlet with a dead token — the zero-hit SearchEmptyState card renders again afterwards. Add a regression test covering the opted-out embedded consumer. - elastic: escape every regex metacharacter (not just `.`) when building KNOWN_FIELD_RE from `fullTextSearchFields`, so a future field name carrying another metacharacter cannot silently corrupt the alternation. Behaviour for the current fields is unchanged. Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com> * refactor(tracker-search): centralize regex escaping and lock down result-count store - Share escapeRegExp from @hcengineering/core so the client encoder and the server elastic adapter escape the fulltext field list identically, not just dots on the client. - Export resultIssueCountStore as a read-only Readable; the owner-token gate functions (setResultCount / resetResultCount / releaseResultCountOwner) are now the only write path. Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com> --------- Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com> Co-authored-by: Michael Uray <michaeluray@users.noreply.github.com> Co-authored-by: Artyom Savchenko <armisav@gmail.com>
UI Sanity testing using play-wright
Prepare environment with docker to test final product.
rush update
rush build
rush bundle
rush docker:build
./prepare.sh
Restore to pure DB
To purge content of sanity workspace following command could be used.
./restore-workspace.sh
Prepare local dev environment
rush update
rush build
rush bundle
./create-local.sh
Restore to pure DB for Local setup
To purge content of sanity workspace following command could be used.
./restore-local.sh
Running UI tests
cd ./sanity
rushx uitest # for docker setup
rushx dev-uitest # for dev setup
Debugging UI tests
cd ./sanity
rushx debug -g test-name # for docker setup
rushx dev-debug -g test-name # for local setup
Capturing new testing scenarios
rushx codegen # for docker setup
rushx dev-codegen # for local setup
Test authoring.
Please update all navigation with using PlatformURI for CI and dev environment compatible testing.
Generate Allure
allure generate allure-results -o allure-report --clean
allure open allure-report