feat(tags): add paste/input tag separators (#DS-4712) - #1894
Conversation
|
Visit the preview URL for this PR (updated for commit 366b612): https://koobiq-next--prs-1894-e4a4tvs4.web.app (expires Mon, 17 Aug 2026 07:17:20 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: c9e37e518febda70d0317d07e8ceb35ac43c534c |
There was a problem hiding this comment.
Pull request overview
Adds separator-context support to the Tags input so separators can be scoped to typing vs paste, updates defaults/provider ergonomics, and extends docs + E2E coverage to demonstrate the new behavior.
Changes:
- Introduce
KbqTagSeparator.appliesToand support keyless (paste-only) separator regexes for paste splitting. - Replace
KBQ_TAGS_DEFAULT_OPTIONSmanual provider boilerplate withkbqTagsDefaultOptionsProvider(...)and update examples/usages accordingly. - Add unit + Playwright E2E coverage and documentation for separator scoping.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/public_api_guard/components/tags.api.md | Updates public API snapshot for new separator types and default-options provider helper. |
| packages/e2e/routes.ts | Registers the new tags separators E2E route/component. |
| packages/docs-examples/components/tags/tag-input-onpaste-off/tag-input-onpaste-off-example.ts | Switches to kbqTagsDefaultOptionsProvider for disabling add-on-paste. |
| packages/docs-examples/components/tags/tag-autocomplete-onpaste-off/tag-autocomplete-onpaste-off-example.ts | Switches to kbqTagsDefaultOptionsProvider for disabling add-on-paste. |
| packages/components/tags/tag.module.ts | Uses kbqTagsDefaultOptionsProvider for module-level defaults. |
| packages/components/tags/tag-input.ts | Implements separator scoping (appliesTo) and new default-options/provider API. |
| packages/components/tags/tag-input.spec.ts | Adds unit coverage for appliesTo behavior and updates default-options provisioning in tests. |
| packages/components/tags/tag-input.ru.md | Documents separator behavior and global defaults provider usage (RU). |
| packages/components/tags/tag-input.en.md | Documents separator behavior and global defaults provider usage (EN). |
| packages/components/tags/tag-default-options.ts | Removes the old default-options token/interface file (moved into tag-input.ts). |
| packages/components/tags/public-api.ts | Stops exporting removed tag-default-options entry point. |
| packages/components/tags/e2e.ts | Adds an E2E demo component for separator scoping and paste-only separators. |
| packages/components/tags/e2e.playwright-spec.ts | Adds Playwright tests verifying typing vs paste separator behavior. |
| packages/components-dev/tag/module.ts | Updates commented example to use kbqTagsDefaultOptionsProvider. |
Suppressed comments (1)
packages/components/tags/tag-input.ts:80
- This JSDoc also references the “chips module” even though the token configures the tags package. Consider updating the wording to match the public API surface.
/** Injection token to be used to override the default options for the chips module. */
export const KBQ_TAGS_DEFAULT_OPTIONS = new InjectionToken<KbqTagsDefaultOptions>('kbq-tags-default-options');
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| @@ -66,9 +114,20 @@ export class KbqTagInput implements KbqTagTextControl, OnChanges { | |||
| private elementRef = inject<ElementRef<HTMLInputElement>>(ElementRef); | |||
| private defaultOptions = inject<KbqTagsDefaultOptions>(KBQ_TAGS_DEFAULT_OPTIONS); | |||
There was a problem hiding this comment.
Или использовать useFactory
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
No description provided.