Tarrow created this task.
Tarrow added projects: Wikidata, Wikidata-Termbox-Iteration-13.
TASK DESCRIPTION
We spent quite some time thinking about this in task breakdown. @Pablo-WMDE
will probably pick this up on 15/04/19 but if not then this task description
will need improving.
In task breakdown we discussed 3 possible solutions to rolling back to the
pre-editmode state of the entity. They are:
1. Re-request the revision ID from one of our repositories and recall the
ENTITY_UPDATE action. We know this won't work out of the box after having done
a successful save action. In this case we could either cache each revision and
have the reposity reply with that or we could just remake the request.
2. keep a copy of the "clean" entity in the store and use this. In this case
at most 2 copies of an entity would be there (1 the version bound to the input
fields and 2 the clean base copy)
3. roll back each atomic mutation until we're back where we started
- either using an external library (e.g. something like
https://vuejsdevelopers.com/2017/11/13/vue-js-vuex-undo-redo/)
- create our own implementation of this (perhaps leveraging existing vuex
functionality?)
After this timebox we'd like to know for each of the options (1-3):
1. How much effort is involved in creating a revision aware entity repository
in the client
- should this implementation come with caching or is it premature
optimisation
2. Should this be portable to any part of the store or is it encapsulated
within the entity namespace
3. how much effort is involved in the atomic rollbacks
- how much code we would then need to maintain
- how much we would bloat out production bundle with this
TASK DETAIL
https://phabricator.wikimedia.org/T220980
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Tarrow
Cc: Aklapper, Tarrow, Pablo-WMDE, alaa_wmde, Nandana, Lahi, Gq86,
GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Wikidata-bugs,
aude, Lydia_Pintscher, Mbch331
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs