stable
Clone or download
part of story #38263 Choose my own columns based on field name (numeric,text, dates) How to test: - Interpolated error messages should no longer have wrong encoding for accented characters: when searching a query, when retrieving the list of projects. - When you load the list of trackers, and there is an error, it is still shown in the alert at the top of the widget. - When you click on the "CSV export" button, it will offer to download a CSV file with the list of artifacts matching the report and their fields matched by duck-typing. When there is an error, it is shown in the alert. 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. Also note that gettext functions in vue3-gettext are able to interpolate directly. They also HTML-encode the parameters by default, so we have to disable this for all error handling cases, otherwise accented characters are wrongly HTML-encoded. This finishes replacing all fetch operations. tlp-fetch is removed. Change-Id: I4fb41fff08e40efdfac965b3cf84f5f9f43bf1fb
Modified Files
Name | ||||
---|---|---|---|---|
M | lib/frontend/fetch-result/README.md | +35 | −0 | Go to diff View file |
M | lib/frontend/fetch-result/src/main.ts | +28 | −2 | Go to diff View file |
M | lib/frontend/fetch-result/src/text-methods.test.ts | +53 | −10 | Go to diff View file |
M | lib/frontend/fetch-result/src/text-methods.ts | +12 | −0 | Go to diff View file |
M | plugins/crosstracker/include/CrossTracker/Report/CSV/CSVExportController.php | +4 | −4 | Go to diff View file |
M | plugins/crosstracker/scripts/cross-tracker/package.json | +0 | −1 | Go to diff View file |
M | plugins/crosstracker/scripts/cross-tracker/pnpm-lock.yaml | +0 | −3 | Go to diff View file |
M | plugins/crosstracker/scripts/cross-tracker/po/fr_FR.po | +4 | −5 | Go to diff View file |
M | plugins/crosstracker/scripts/cross-tracker/po/pt_BR.po | +1 | −4 | Go to diff View file |
M | plugins/crosstracker/scripts/cross-tracker/src/api/rest-querier.test.ts | +63 | −70 | Go to diff View file |
M | plugins/crosstracker/scripts/cross-tracker/src/api/rest-querier.ts | +42 | −42 | Go to diff View file |
M | plugins/crosstracker/scripts/cross-tracker/src/components/ArtifactTable.vue | +2 | −2 | Go to diff View file |
M | plugins/crosstracker/scripts/cross-tracker/src/components/ExportCSVButton.test.ts | +19 | −43 | Go to diff View file |
M | plugins/crosstracker/scripts/cross-tracker/src/components/ExportCSVButton.vue | +21 | −20 | Go to diff View file |
A | plugins/crosstracker/scripts/cross-tracker/src/domain/Identifier.ts | +27 | −0 | Go to diff View file |
A | plugins/crosstracker/scripts/cross-tracker/src/domain/ProjectIdentifier.ts | +30 | −0 | Go to diff View file |
R | plugins/crosstracker/scripts/cross-tracker/src/writing-mode/RetrieveProjects.ts | Go to diff View file | ||
M | plugins/crosstracker/scripts/cross-tracker/src/index.ts | +1 | −1 | Go to diff View file |
M | plugins/crosstracker/scripts/cross-tracker/src/injection-symbols.ts | +1 | −1 | Go to diff View file |
M | plugins/crosstracker/scripts/cross-tracker/src/writing-mode/ProjectsCache.test.ts | +1 | −1 | Go to diff View file |
M | plugins/crosstracker/scripts/cross-tracker/src/writing-mode/ProjectsCache.ts | +1 | −1 | Go to diff View file |
M | plugins/crosstracker/scripts/cross-tracker/src/writing-mode/TrackerSelection.test.ts | +32 | −18 | Go to diff View file |
M | plugins/crosstracker/scripts/cross-tracker/src/writing-mode/TrackerSelection.vue | +25 | −14 | Go to diff View file |
M | plugins/crosstracker/scripts/cross-tracker/tests/stubs/RetrieveProjectsStub.ts | +1 | −1 | Go to diff View file |