stable

Clone or download

Read-only

Controller for LinkField

part of: story #24968 [modal] have the list of linked artifacts No functional change expected in new artifact link field. Notes: Using a Controller lets us separate the retrieval of the links from their presentation. The hybrids component is now limited to converting a Presenter to some HTML. Dealing with the state is delegated to the controller: it returns a presenter for each case. The presenter can even be immutable. Change-Id: Ia68e1769e69a1730e48ed66fdfa61295947eb542

Modified Files

Name
A plugins/tracker/scripts/lib/artifact-modal/src/adapters/REST/TuleapAPIClient.test.ts +145 −0 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/REST/TuleapAPIClient.ts +74 −1 Go to diff View file
R plugins/tracker/scripts/lib/artifact-modal/src/fields/link-field-v2/LinkField.test.ts Go to diff View file
R plugins/tracker/scripts/lib/artifact-modal/src/fields/link-field-v2/LinkField.ts Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/LinkFieldController.test.ts +74 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/LinkFieldController.ts +44 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/LinkFieldPresenter.test.ts +66 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field-v2/LinkFieldPresenter.ts +55 −0 Go to diff View file
R plugins/tracker/scripts/lib/artifact-modal/src/fields/link-field-v2/link-field-v2.scss Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/domain/fields/link-field-v2/LinkedArtifact.ts +38 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/domain/fields/link-field-v2/LinksRetriever.test.ts +80 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/domain/fields/link-field-v2/LinksRetriever.ts +37 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/domain/fields/link-field-v2/RetrieveAllLinkedArtifacts.ts +24 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/domain/fields/link-field-v2/RetrieveLinkTypes.ts +24 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/domain/fields/link-field-v2/RetrieveLinkedArtifactsByType.ts +27 −0 Go to diff View file
D plugins/tracker/scripts/lib/artifact-modal/src/fields/link-field-v2/links-retriever.test.ts +0 −175 Go to diff View file
D plugins/tracker/scripts/lib/artifact-modal/src/fields/link-field-v2/links-retriever.ts +0 −107 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/tuleap-artifact-modal-controller.js +11 −1 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/tuleap-artifact-modal.js +1 −1 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/tuleap-artifact-modal.scss +1 −1 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/tuleap-artifact-modal.tpl.html +1 −1 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/tests/stubs/RetrieveAllLinkedArtifactsStub.ts +35 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/tests/stubs/RetrieveLinkTypesStub.ts +31 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/tests/stubs/RetrieveLinkedArtifactsByTypeStub.ts +37 −0 Go to diff View file