Page MenuHomePhabricator

Wire up generic save error component in ErrorWrapper
Closed, ResolvedPublic

Description

Note: this task includes browser tests (T249715).

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 8 2020, 1:28 PM

The implementation for this might be interesting, I think. Currently, ErrorWrapper has a lot of getters in its own class, for processing the list of errors from the store: permissionErrors, unsupportedDatatypeError, etc. The straightforward approach (to me) would be to add something similar for saveErrors, and mount the ErrorSaving if that list is not empty.

But it looks like we’ll also need some similar logic in the store itself, for the store getter that indicates whether the “back” button should be shown or not (T249718). So maybe some of this logic to filter the errors should move from ErrorWrapper into the store itself? What do you think, @Michael?

The implementation for this might be interesting, I think. Currently, ErrorWrapper has a lot of getters in its own class, for processing the list of errors from the store: permissionErrors, unsupportedDatatypeError, etc. The straightforward approach (to me) would be to add something similar for saveErrors, and mount the ErrorSaving if that list is not empty.

But it looks like we’ll also need some similar logic in the store itself, for the store getter that indicates whether the “back” button should be shown or not (T249718). So maybe some of this logic to filter the errors should move from ErrorWrapper into the store itself? What do you think, @Michael?

I'm fine with that logic moving (partly) back into the store. Probably in form of a getter isSavingError()? Maybe that could then also be used by the canGoBackToPreviousState() getter 🤔

Change 592685 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/Wikibase@master] bridge: wire up ErrorSaving in ErrorWrapper

https://gerrit.wikimedia.org/r/592685

Change 592685 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] bridge: wire up ErrorSaving in ErrorWrapper

https://gerrit.wikimedia.org/r/592685

Lucas_Werkmeister_WMDE closed this task as Resolved.Apr 28 2020, 2:33 PM