You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add ChangeRequest as second argument to modifyUp updater
Pass through ChangeRequest as second argument to shape if it exists
Adding ChangeRequest isn't as simple as it may seem. modifyUp updaters can be called during a change propagation or afterward, and with different data after the ChangeRequest has finished propagating, as this allows the entire rebasing feature to work. Change Requests are immutable and largely stateless (apart from based parcel data, that enables prevData and nextData to work), so as long as the stateful data is blatted and refreshed before using it, a reference to the current ChangeRequest can be safely passed into the propagating ChangeRequest's _addPost(into itself!). Effectively attaching a snapshot of the change request to the post function. Then the reducer will need to give any change requests attached to post actions updated data, so that prevData and nextData will be correct everytime and not just by chance. ChangeRequests will then need to be able to be based onto ParcelData as well as Parcel instances. This is because the reducer has no knowledge of Parcel instances, and also does not need to cope with stale local data due to non-updating React components, which is the only reason that ChangeRequests are based onto Parcels and not ParcelData currently.
New actions can no longer be created mid-propagation so that's no longer a concern.
The text was updated successfully, but these errors were encountered:
ChangeRequest
as second argument to modifyUp updaterChangeRequest
as second argument toshape
if it existsAdding ChangeRequest isn't as simple as it may seem.
modifyUp
updaters can be called during a change propagation or afterward, and with different data after the ChangeRequest has finished propagating, as this allows the entire rebasing feature to work. Change Requests are immutable and largely stateless (apart from based parcel data, that enablesprevData
andnextData
to work), so as long as the stateful data is blatted and refreshed before using it, a reference to the current ChangeRequest can be safely passed into the propagating ChangeRequest's_addPost
(into itself!). Effectively attaching a snapshot of the change request to thepost
function. Then the reducer will need to give any change requests attached to post actions updated data, so thatprevData
andnextData
will be correct everytime and not just by chance. ChangeRequests will then need to be able to be based onto ParcelData as well as Parcel instances. This is because the reducer has no knowledge of Parcel instances, and also does not need to cope with stale local data due to non-updating React components, which is the only reason that ChangeRequests are based onto Parcels and not ParcelData currently.New actions can no longer be created mid-propagation so that's no longer a concern.
The text was updated successfully, but these errors were encountered: