stable
Clone or download
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. Then, the "Add link" button becomes enabled. When you click it, it will clear the selection in the link-selector component and disable again the "Add link" button. The new link should be added to its store, but is not visible for now. Rendering its template will come in a later contribution. You can check that the link is stored by using console.log() in the controller. Notes: The store is different from the Linked Artifacts store because they have different behaviours and rules. New links will be deleted immediately, while existing links are "marked for removal". New links will have slightly different display: they have a greenish background. They will be displayed at the bottom of the table, while existing links are displayed at the top. Change-Id: I24f0b7a6d29d0d57d76929f4a0eac62cd8751abe
Modified Files
Name | ||||
---|---|---|---|---|
A | plugins/tracker/scripts/lib/artifact-modal/src/adapters/Memory/NewLinksStore.test.ts | +39 | −0 | Go to diff View file |
A | plugins/tracker/scripts/lib/artifact-modal/src/adapters/Memory/NewLinksStore.ts | +38 | −0 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/src/adapters/REST/LinkableArtifactProxy.test.ts | +13 | −4 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/src/adapters/REST/LinkableArtifactProxy.ts | +3 | −0 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/src/adapters/REST/LinkedArtifactProxy.test.ts | +1 | −1 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/src/adapters/REST/LinkedArtifactProxy.ts | +2 | −1 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/src/adapters/REST/TuleapAPIClient.test.ts | +2 | −1 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/src/adapters/REST/TuleapAPIClient.ts | +2 | −1 | Go to diff View file |
A | plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/AddLinkButtonTemplate.test.ts | +134 | −0 | Go to diff View file |
A | plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/AddLinkButtonTemplate.ts | +48 | −0 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/CollectionOfAllowedLinksTypesPresenters.ts | +1 | −1 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/LinkAdditionPresenter.test.ts | +8 | −4 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/LinkAdditionPresenter.ts | +7 | −2 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/LinkField.ts | +36 | −25 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/LinkFieldController.test.ts | +57 | −0 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/LinkFieldController.ts | +15 | −2 | Go to diff View file |
A | plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/LinkTypeProxy.test.ts | +55 | −0 | Go to diff View file |
A | plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/LinkTypeProxy.ts | +41 | −0 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/LinkedArtifactPresenter.test.ts | +1 | −1 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/LinkedArtifactTemplate.test.ts | +4 | −0 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/LinkedArtifactTemplate.ts | +2 | −2 | Go to diff View file |
A | plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/NewLinkCollectionPresenter.ts | +29 | −0 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/TypeSelectorTemplate.test.ts | +39 | −28 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/TypeSelectorTemplate.ts | +31 | −10 | Go to diff View file |
A | plugins/tracker/scripts/lib/artifact-modal/src/domain/fields/link-field-v2/AddNewLink.ts | +24 | −0 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/src/domain/fields/link-field-v2/LinkFieldValueFormatter.ts | +1 | −1 | Go to diff View file |
A | plugins/tracker/scripts/lib/artifact-modal/src/domain/fields/link-field-v2/LinkType.ts | +27 | −0 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/src/domain/fields/link-field-v2/LinkableArtifact.ts | +3 | −0 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/src/domain/fields/link-field-v2/LinkedArtifact.ts | +1 | −9 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/src/domain/fields/link-field-v2/LinksRetriever.test.ts | +2 | −1 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/src/domain/fields/link-field-v2/LinksRetriever.ts | +2 | −1 | Go to diff View file |
A | plugins/tracker/scripts/lib/artifact-modal/src/domain/fields/link-field-v2/NewArtifactLinkIdentifier.test.ts | +32 | −0 | Go to diff View file |
A | plugins/tracker/scripts/lib/artifact-modal/src/domain/fields/link-field-v2/NewArtifactLinkIdentifier.ts | +34 | −0 | Go to diff View file |
A | plugins/tracker/scripts/lib/artifact-modal/src/domain/fields/link-field-v2/NewLink.test.ts | +60 | −0 | Go to diff View file |
A | plugins/tracker/scripts/lib/artifact-modal/src/domain/fields/link-field-v2/NewLink.ts | +42 | −0 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/src/domain/fields/link-field-v2/RetrieveLinkTypes.ts | +1 | −1 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/src/domain/fields/link-field-v2/RetrieveLinkedArtifactsByType.ts | +2 | −1 | Go to diff View file |
A | plugins/tracker/scripts/lib/artifact-modal/src/domain/fields/link-field-v2/RetrieveNewLinks.ts | +24 | −0 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/src/tuleap-artifact-modal-controller.js | +4 | −0 | Go to diff View file |
A | plugins/tracker/scripts/lib/artifact-modal/tests/stubs/AddNewLinkStub.ts | +36 | −0 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/tests/stubs/LinkSelectorStub.ts | +20 | −4 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/tests/stubs/LinkTypeStub.ts | +15 | −5 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/tests/stubs/LinkableArtifactStub.ts | +6 | −0 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/tests/stubs/LinkedArtifactStub.ts | +2 | −4 | Go to diff View file |
A | plugins/tracker/scripts/lib/artifact-modal/tests/stubs/NewLinkStub.ts | +27 | −0 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/tests/stubs/RetrieveLinkTypesStub.ts | +1 | −1 | Go to diff View file |
A | plugins/tracker/scripts/lib/artifact-modal/tests/stubs/RetrieveNewLinksStub.ts | +31 | −0 | Go to diff View file |
M | plugins/tracker/scripts/lib/constants/src/constants.ts | +3 | −0 | Go to diff View file |