stable

Clone or download

Read-only

refactor: Event architecture for field communication

How to test: - Open the artifact modal (create or edit). - If the tracker has at least one file field, you should see the "quota display" at the bottom-left corner. - If the tracker has no file field, it should not appear. Notes: It might seem overkill "just" for this use-case, but it's a pretext to introduce the Event dispatcher. Events will be useful for field dependencies of list fields, for file uploads before submit, for submit (no need of another big switch-case, each field is responsible for formatting its values into a REST payload). part of request #22648 Convert AngularJS directives and controllers to hybrids web components Change-Id: Ibec4857b227f10efbf6d99978ce25aa042892a2f

Modified Files

Name
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/file-field/FileField.test.ts +4 −3 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/file-field/FileFieldController.test.ts +36 −7 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/adapters/UI/fields/file-field/FileFieldController.ts +7 −1 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/domain/DidChangeListFieldValue.ts +28 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/domain/DidCheckFileFieldIsPresent.ts +31 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/domain/DispatchEvents.ts +32 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/domain/DomainEvent.ts +32 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/domain/EventDispatcher.test.ts +99 −0 Go to diff View file
A plugins/tracker/scripts/lib/artifact-modal/src/domain/EventDispatcher.ts +64 −0 Go to diff View file
M plugins/tracker/scripts/lib/artifact-modal/src/tuleap-artifact-modal-controller.js +10 −6 Go to diff View file