stable

Clone or download

Read-only

feat: toggle add link button disabled

part of story #24969 [modal] add and remove links (replace current artifact link) When you type a number matching an artifact id in the new link field, you can select it (by click or with keyboard). When you select it, the "Add link" button will be enabled. It does nothing for now. When you clear the selection, the "Add link" button will be disabled again. Notes: Link selector does not create <options> anymore. It is still bound on a <select> element for now, but only for legacy reasons. Change-Id: If94875f77bca80df2b3dcae1558f1442e7ee4f28

Modified Files

Name
A lib/frontend/link-selector/README.md +3 −0 Go to diff View file
M lib/frontend/link-selector/package.json +4 −5 Go to diff View file
M lib/frontend/link-selector/src/dropdown/DropdownContentRefresher.ts +0 −3 Go to diff View file
M lib/frontend/link-selector/src/events/SearchFieldEventCallbackHandler.test.ts +21 −15 Go to diff View file
M lib/frontend/link-selector/src/events/SearchFieldEventCallbackHandler.ts +8 −20 Go to diff View file
M lib/frontend/link-selector/src/index.ts +3 −3 Go to diff View file
M lib/frontend/link-selector/src/items/GroupCollection.ts +1 −4 Go to diff View file
M lib/frontend/link-selector/src/items/ItemsMapManager.test.ts +12 −20 Go to diff View file
M lib/frontend/link-selector/src/items/ItemsMapManager.ts +3 −3 Go to diff View file
M lib/frontend/link-selector/src/items/ListItemMapBuilder.test.ts +51 −80 Go to diff View file
M lib/frontend/link-selector/src/items/ListItemMapBuilder.ts +43 −43 Go to diff View file
D lib/frontend/link-selector/src/items/OptionsMaintainer.test.ts +0 −60 Go to diff View file
M lib/frontend/link-selector/src/link-selector.ts +21 −12 Go to diff View file
M lib/frontend/link-selector/src/navigation/KeyboardNavigationManager.test.ts +14 −17 Go to diff View file
M lib/frontend/link-selector/src/renderers/DropdownContentRenderer.test.ts +4 −1 Go to diff View file
M lib/frontend/link-selector/src/renderers/__snapshots__/DropdownContentRenderer.test.ts.snap +6 −6 Go to diff View file
M lib/frontend/link-selector/src/selection/SelectionManager.test.ts +17 −46 Go to diff View file
M lib/frontend/link-selector/src/selection/SelectionManager.ts +16 −44 Go to diff View file
M lib/frontend/link-selector/src/type.ts +17 −4 Go to diff View file
M lib/frontend/link-selector/tests/builders/GroupCollectionBuilder.ts +7 −30 Go to diff View file
R lib/frontend/link-selector/src/test-helpers/selection-manager-test-helpers.ts Go to diff View file
A lib/frontend/link-selector/tests/stubs/TemplatingCallbackStub.ts +45 −0 Go to diff View file
M lib/frontend/link-selector/tsconfig.json +0 −1 Go to diff View file
M lib/frontend/link-selector/vite.config.ts +2 −2 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/ArtifactLinkSelectorAutoCompleter.test.ts +26 −14 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/ArtifactLinkSelectorAutoCompleter.ts +20 −55 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/LinkAdditionPresenter.test.ts +32 −0 Go to diff View file
R lib/frontend/link-selector/src/items/OptionsMaintainer.ts Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/LinkField.ts +19 −3 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/LinkFieldController.test.ts +30 −0 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/LinkFieldController.ts +11 −3 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/LinkableArtifactTemplate.test.ts +35 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/LinkableArtifactTemplate.ts +46 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/MatchingArtifactsGroup.test.ts +43 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/MatchingArtifactsGroup.ts +35 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/tests/stubs/LinkSelectorStub.ts +47 −0 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/tests/stubs/LinkableArtifactStub.ts +3 −2 Go to diff View file
M src/scripts/tlp-doc/css/_demos.scss +4 −0 Go to diff View file
M src/scripts/tlp-doc/src/editors.js +71 −37 Go to diff View file
M src/www/tlp-doc/resources/forms/link-selector/doc.html +36 −32 Go to diff View file
M src/www/tlp-doc/resources/forms/link-selector/example.html +16 −10 Go to diff View file