stable

Clone or download

Read-only

refactor: vuex store -> provide/inject for feedbacks

part of story #38263 Choose my own columns based on field name (numeric, text, dates) How to test: - All error cases should show a danger feedback with the error text: - fetching the report - fetching the projects of the user - fetching the trackers of the project - adding more than 25 trackers - fetching the artifacts matching the query - saving the report - exporting to CSV - The CSV export button should still be displayed as before. It is only shown when the report is saved, the user is not admin or the user is admin and there are no invalid trackers, the table is not empty and not loading. - The success message is still shown after saving the report. - No other functional change expected with or without the feature flag tuleap config-set feature_flag_enable_tql_select 1 Why? We do not need a full Vuex (or Pinia) store for the Cross-tracker widget, there are only a handful truly "global" pieces of data. Using provide/inject can fully replace it. The display of the CSV export button depends on Vuex store, my goal is to fully replace it by provide/inject in order to avoid adding more code that depends on Vuex store in the new SelectableTable. Change-Id: I3dafea4f4d7b18ead685e75ae28375e7a320209e

Modified Files

Name
M plugins/crosstracker/scripts/cross-tracker/src/CrossTrackerWidget.test.ts +65 −30 Go to diff View file
M plugins/crosstracker/scripts/cross-tracker/src/CrossTrackerWidget.vue +44 −24 Go to diff View file
M plugins/crosstracker/scripts/cross-tracker/src/components/ErrorMessage.vue +32 −6 Go to diff View file
M plugins/crosstracker/scripts/cross-tracker/src/components/ExportCSVButton.test.ts +9 −9 Go to diff View file
M plugins/crosstracker/scripts/cross-tracker/src/components/ExportCSVButton.vue +8 −8 Go to diff View file
M plugins/crosstracker/scripts/cross-tracker/src/components/selectable-table/SelectableTable.test.ts +4 −8 Go to diff View file
M plugins/crosstracker/scripts/cross-tracker/src/components/selectable-table/SelectableTable.vue +8 −16 Go to diff View file
M plugins/crosstracker/scripts/cross-tracker/src/components/table/ArtifactTable.test.ts +41 −24 Go to diff View file
M plugins/crosstracker/scripts/cross-tracker/src/components/table/ArtifactTable.vue +16 −22 Go to diff View file
A plugins/crosstracker/scripts/cross-tracker/src/composables/useFeedbacks.test.ts +48 −0 Go to diff View file
A plugins/crosstracker/scripts/cross-tracker/src/composables/useFeedbacks.ts +60 −0 Go to diff View file
A plugins/crosstracker/scripts/cross-tracker/src/domain/ProjectsRetrievalFault.ts +25 −0 Go to diff View file
R plugins/crosstracker/scripts/cross-tracker/tests/stubs/TuleapAPIFaultStub.ts Go to diff View file
A plugins/crosstracker/scripts/cross-tracker/src/domain/TrackersRetrievalFault.ts +25 −0 Go to diff View file
M plugins/crosstracker/scripts/cross-tracker/src/injection-symbols.ts +5 −0 Go to diff View file
M plugins/crosstracker/scripts/cross-tracker/src/reading-mode/ReadingMode.test.ts +7 −11 Go to diff View file
M plugins/crosstracker/scripts/cross-tracker/src/reading-mode/ReadingMode.vue +7 −11 Go to diff View file
D plugins/crosstracker/scripts/cross-tracker/src/store/getters.test.ts +0 −78 Go to diff View file
M plugins/crosstracker/scripts/cross-tracker/src/store/getters.ts +0 −15 Go to diff View file
M plugins/crosstracker/scripts/cross-tracker/src/store/index.ts +0 −2 Go to diff View file
D plugins/crosstracker/scripts/cross-tracker/src/store/mutations.test.ts +0 −38 Go to diff View file
M plugins/crosstracker/scripts/cross-tracker/src/store/mutations.ts +0 −14 Go to diff View file
M plugins/crosstracker/scripts/cross-tracker/src/type.ts +0 −2 Go to diff View file
M plugins/crosstracker/scripts/cross-tracker/src/writing-mode/TrackerSelection.test.ts +6 −10 Go to diff View file
M plugins/crosstracker/scripts/cross-tracker/src/writing-mode/TrackerSelection.vue +6 −21 Go to diff View file
M plugins/crosstracker/scripts/cross-tracker/src/writing-mode/WritingMode.test.ts +10 −6 Go to diff View file
M plugins/crosstracker/scripts/cross-tracker/src/writing-mode/WritingMode.vue +8 −4 Go to diff View file