stable

Clone or download

Read-only

refactor: Use fetch-result to get projects

part of story #38263 Choose my own columns based on field name (numeric,text, dates) How to test: No functional change in cross-tracker search widgets. When you click on the widget to choose trackers, it will load the list of projects sorted by project label. It will load it only once for all widgets (as before). Why? fetch-result lets us be more flexible and expressive for fetch operations: we can clearly express that it can fail for various reasons. We are forced to deal with errors, and we can use Fault to represent errors instead of string error messages. This does not replace completely all fetch operations as it would be too big. The rest of the fetch operations will be done later. Change-Id: I4c657766487e2380fa216f9d07e2827f1fe488b7

Modified Files

Name
M plugins/crosstracker/scripts/cross-tracker/package.json +1 −1 Go to diff View file
M plugins/crosstracker/scripts/cross-tracker/pnpm-lock.yaml +3 −3 Go to diff View file
M plugins/crosstracker/scripts/cross-tracker/po/fr_FR.po +4 −2 Go to diff View file
M plugins/crosstracker/scripts/cross-tracker/po/pt_BR.po +1 −1 Go to diff View file
M plugins/crosstracker/scripts/cross-tracker/src/CrossTrackerWidget.test.ts +9 −14 Go to diff View file
M plugins/crosstracker/scripts/cross-tracker/src/api/rest-querier.test.ts +11 −6 Go to diff View file
M plugins/crosstracker/scripts/cross-tracker/src/api/rest-querier.ts +22 −13 Go to diff View file
M plugins/crosstracker/scripts/cross-tracker/src/index.ts +14 −5 Go to diff View file
A plugins/crosstracker/scripts/cross-tracker/src/injection-symbols.ts +23 −0 Go to diff View file
A plugins/crosstracker/scripts/cross-tracker/src/writing-mode/ProjectsCache.test.ts +58 −0 Go to diff View file
A plugins/crosstracker/scripts/cross-tracker/src/writing-mode/ProjectsCache.ts +40 −0 Go to diff View file
R plugins/crosstracker/scripts/cross-tracker/src/writing-mode/projects-cache.ts Go to diff View file
M plugins/crosstracker/scripts/cross-tracker/src/writing-mode/TrackerSelection.test.ts +33 −45 Go to diff View file
M plugins/crosstracker/scripts/cross-tracker/src/writing-mode/TrackerSelection.vue +26 −12 Go to diff View file
M plugins/crosstracker/scripts/cross-tracker/src/writing-mode/WritingMode.test.ts +7 −12 Go to diff View file
D plugins/crosstracker/scripts/cross-tracker/src/writing-mode/__snapshots__/TrackerSelection.test.ts.snap +0 −88 Go to diff View file
D plugins/crosstracker/scripts/cross-tracker/src/writing-mode/project-cache.test.ts +0 −44 Go to diff View file
A plugins/crosstracker/scripts/cross-tracker/tests/stubs/ProjectInfoStub.ts +28 −0 Go to diff View file
A plugins/crosstracker/scripts/cross-tracker/tests/stubs/RetrieveProjectsStub.ts +49 −0 Go to diff View file