stable

Clone or download

Read-only

Show "parent feedback" with Hexagonal Architecture

part of: story #24968 [modal] have the list of linked artifacts How to test: 1. set the config flag "feature_flag_use_art_links_v2_in_artifact_modal" to 1 - Rebuild the agile dashboard and artifact modal. - Go to planning view and open the modal to add a child to a user story. - You should see a feedback at the top of the modal like "The artifact will be linked to <Parent title>" 2. set the config flag to 0 - Open the same modal. - You should see the same feedback. The parent artifact is expected to be requested twice. Notes: Avoiding the double request without the feature flag means tinkering a lot with the "legacy" link field controller. The aim of the story is to kill it, so we consider it acceptable to temporarily request twice and later remove the "legacy" link field completely. We can use Hexagonal Architecture in the frontend too. We don't even need classes: closures, plain objects and interfaces do the job ! Change-Id: Ic9942b27038600afe7dca80b6198c1a519d843a4

Modified Files

Name
M .eslintrc.js +19 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/adr/0002-hexagonal-architecture.md +70 −0 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/adr/index.md +1 −0 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/po/fr_FR.po +3 −3 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/adapters/Memory/CreationModeVerifier.ts +25 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/adapters/REST/TuleapAPIClient.ts +25 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/ModalFeedback.test.ts +57 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/ModalFeedback.ts +56 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/domain/Artifact.ts +23 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/domain/RetrieveArtifact.ts +24 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/domain/VerifyIsInCreationMode.ts +22 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/domain/parent/ControlParentFeedback.ts +24 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/domain/parent/ParentFeedbackController.test.ts +57 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/domain/parent/ParentFeedbackController.ts +37 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/domain/parent/ParentFeedbackPresenter.test.ts +39 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/domain/parent/ParentFeedbackPresenter.ts +30 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/domain/parent/ParentRetriever.test.ts +56 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/domain/parent/ParentRetriever.ts +33 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/domain/parent/RetrieveParent.ts +24 −0 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/gettext-catalog.ts +2 −0 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/tuleap-artifact-modal-controller.js +9 −6 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/tuleap-artifact-modal.js +1 −0 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/tuleap-artifact-modal.tpl.html +5 −3 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/tests/stubs/RetrieveArtifactStub.ts +25 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/tests/stubs/RetrieveParentStub.ts +25 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/tests/stubs/VerifyIsInCreationModeStub.ts +28 −0 Go to diff View file