stable

Clone or download

Read-only

feat: load projects + error

How to test: - In your web container, enable the feature flag: `tuleap config-set feature_flag_create_artifact 1` - Edit an artifact with an artifact link field with the modal (kanban, TTM or planning view) - Click on the "Create a new artifact" button in the link selector dropdown. - The link selector will be replaced by an inline form. - After loading, the selectbox in the form will let you select a Tuleap Project. - The [Create] button is always disabled and does nothing. - If you change the link type in the creation form, and then click on [Cancel], the chosen link type should be preserved. - If there is an error while retrieving the list of projects, it will be shown in an alert on top of the creation form. Note: The list of projects will be cached in a future contribution. part of story #28823 [modal] create artifact Change-Id: I32bb486e8169ec62fb81af5e13f163bb87a50845

Modified Files

Name
A lib/frontend/rest-api-types/README.md +3 −0 Go to diff View file
M lib/frontend/rest-api-types/src/main.ts +8 −0 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/po/fr_FR.po +7 −1 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/po/pt_BR.po +6 −0 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/REST/ProjectProxy.test.ts +11 −1 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/REST/ProjectProxy.ts +6 −1 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/REST/TuleapAPIClient.test.ts +41 −0 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/REST/TuleapAPIClient.ts +13 −2 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/feedback/ModalFeedback.ts +2 −8 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field/LinkField.test.ts +3 −3 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field/LinkField.ts +23 −33 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field/LinkTypeSelectorElement.test.ts +3 −2 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field/LinkTypeSelectorElement.ts +7 −13 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field/LinkedArtifactTemplate.ts +3 −3 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field/NewLinkTemplate.ts +3 −3 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field/_variables.scss +20 −0 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field/creation/ArtifactCreatorElement.test.ts +42 −21 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field/creation/ArtifactCreatorElement.ts +93 −22 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field/creation/_artifact-creator.scss +21 −5 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/link-field/link-field.scss +5 −5 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/domain/fields/link-field/creation/ArtifactCreatorController.test.ts +31 −2 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/domain/fields/link-field/creation/ArtifactCreatorController.ts +34 −9 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/domain/fields/link-field/creation/RetrieveProjects.ts +26 −0 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/gettext-catalog.ts +3 −0 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/tuleap-artifact-modal-controller.js +1 −1 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/tests/stubs/RetrieveProjectsStub.ts +33 −0 Go to diff View file