stable
Clone or download
part of story #24969 [modal] add and remove links (replace current artifact link) No functional change expected. Notes: Giving both properties from "field" and a presenter from a controller was confusing. It created two equivalent "sources of truth". The custom element should have only one source of truth: its controller that builds presenters for it. With this contribution, the controller has two methods and builds two distinct presenters: one for the field, another for the currently linked artifacts. I first tried this with a single presenter, but it turns out that it was way too complicated, it created several problems. This is simpler. Also, since ArtifactCrossReference is a composite (it is built from a TrackerShortName and an Artifact Identifier), there is no need to proxy it. It can be fully in the Domain. Change-Id: I78188a9413af49921713fc6ddfcef394177f7e94
Modified Files
Name | ||||
---|---|---|---|---|
M | plugins/document_generation/scripts/lib/docx/src/Artifact/artifacts-structure-retriever.test.ts | +1 | −1 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/package.json | +1 | −0 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/pnpm-lock.yaml | +2 | −0 | Go to diff View file |
D | plugins/tracker/scripts/lib/artifact-modal/src/adapters/Caller/TrackerArtifactCrossReferenceProxy.ts | +0 | −35 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/CollectionOfAllowedLinksTypesPresenters.test.ts | +1 | −1 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/CollectionOfAllowedLinksTypesPresenters.ts | +3 | −3 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/LinkField.test.ts | +15 | −7 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/LinkField.ts | +29 | −27 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/LinkFieldController.test.ts | +50 | −7 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/LinkFieldController.ts | +25 | −12 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/LinkFieldPresenter.test.ts | +45 | −25 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/LinkFieldPresenter.ts | +25 | −23 | Go to diff View file |
A | plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/LinkedArtifactCollectionPresenter.test.ts | +58 | −0 | Go to diff View file |
A | plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/LinkedArtifactCollectionPresenter.ts | +48 | −0 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/LinkedArtifactTemplate.test.ts | +17 | −5 | 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 |
M | plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/TypeSelectorTemplate.test.ts | +24 | −9 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/TypeSelectorTemplate.ts | +6 | −12 | Go to diff View file |
R | plugins/tracker/scripts/lib/artifact-modal/src/adapters/Caller/TrackerArtifactCrossReferenceProxy.test.ts | Go to diff View file | ||
M | plugins/tracker/scripts/lib/artifact-modal/src/domain/ArtifactCrossReference.ts | +16 | −0 | Go to diff View file |
D | plugins/tracker/scripts/lib/artifact-modal/src/domain/fields/link-field-v2/AllowedLinkType.ts | +0 | −24 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/src/tuleap-artifact-modal-controller.js | +17 | −15 | Go to diff View file |
M | plugins/tracker/scripts/lib/artifact-modal/src/tuleap-artifact-modal.tpl.html | +1 | −5 | Go to diff View file |
M | plugins/tracker/scripts/lib/rest-api-types/src/trackers.ts | +8 | −1 | Go to diff View file |