Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/absolute anaconda #149

Merged
merged 141 commits into from Feb 4, 2019
Merged

Release/absolute anaconda #149

merged 141 commits into from Feb 4, 2019

Conversation

dxinteractive
Copy link
Collaborator

@dxinteractive dxinteractive commented Nov 28, 2018

dataparcels

Contains #105, #117, #147, #150, #152, #154, #158, #159, #161, #162, #163, #164

Main points:

  • Move from named exports (import {Foo} from 'bar';) to slash exports (import Foo from 'bar/Foo';) to allow people to have smaller bundle sizes when they use less features. This convention will become more important as optional features like Add: rekey #123 and Add: utils/segment #124 are added
  • Clean up the modify methods API. This has been really confusing. Now we just have .modifyDown() and .modifyUp(). If shape editing / deep editing is required, then a parcel shape updater can be imported via import shape from 'dataparcels/shape and used like .modifyDown(shape(parcelShape => parcelShape))
  • Use new change request reducer, and remove parts of the API that only existed to cope with the underlying flaws with the old reducer.

Fixes

  • fix: Parcel.toObject() now turns arrays into objects as expected
  • fix: prevent value from being removed if Parcel.initialMeta is set Bug: initialMeta deletes value #164
  • fix: allow ParcelBoundary state to be ahead of the state of higher parcels even when debounce or hold aren't being used. Previously a regular ParcelBoundary was fully locked to props, but some freedom to have the ParcelBoundary's state move forward is safe and also necessary for the intended pattern of using modifyUp to cancel invalid values.
  • amend: fix a bug where ChangeRequestReducer's "parent actions" (swapPrev, swapNext, delete etc) wouldn't run pre and post functions on last keypathmodifier

Exports

  • BREAKING CHANGE removed all named exports in favour of slash exports, expect for type exports.
    • e.g. import {Action} from 'dataparcels'; becomes import Action from 'dataparcels/Action';
  • BREAKING CHANGE ActionCreators is no longer exported from dataparcels
  • BREAKING CHANGE removed type ParcelMetaUpdater from named exports Remove: Parcel.updateMeta #154
  • Add: Added types to exports
    • {ParcelCreateConfigType}
    • {ParcelShapeSetMeta}
    • {ParcelShapeValueUpdater}
    • {ParcelShapeUpdater}
    • {ParcelShapeConfigInternal}
    • {ParentType}

Parcel methods

Parcel modify functions

  • BREAKING CHANGE Parcel.modifyValue is now called Parcel.modifyDown Add: Finalise and complete the modify methods #147
  • BREAKING CHANGE Parcel.modifyChangeValue is now called Parcel.modifyUp Add: Finalise and complete the modify methods #147
  • BREAKING CHANGE Parcel.modifyChangeBatch has been removed Add: Finalise and complete the modify methods #147
  • Added ability for Parcel.update(), Parcel.modifyDown() and Parcel.modifyUp() to accept parcel shape updaters.
    • import shape from 'dataparcels/shape;
    • .modifyDown(shape(parcelShape => parcelShape))
  • Added ability for Parcel.modifyUp() to return a CancelActionMarker to cancel an action.
    • import CancelActionMarker from 'dataparcels/CancelActionMarker;
    • .modifyUp(value => value !== "good" ? CancelActionMarker : value)

Actions, ChangeRequests and keyPathModifiers

ParcelShape

react-dataparcels

Exports

  • BREAKING CHANGE removed all named exports in favour of slash exports, expect for type exports.
    • e.g. import {Action} from 'react-dataparcels'; becomes import Action from 'react-dataparcels/Action';
  • BREAKING CHANGE ActionCreators is no longer exported from react-dataparcels
  • BREAKING CHANGE removed type ParcelMetaUpdater from named exports Remove: Parcel.updateMeta #154

ParcelHoc

ParcelBoundary

  • add: Parcelboundary.keepState.

react-dataparcels-drag

Repo

Merge master to anaconda release
Replacement reducer (a.k.a. modifier functions in actions)
…rcels even when debounce or hold arent being used
ParcelBoundary state synchronisation + cancelling actions
@dxinteractive dxinteractive changed the title WIP Release/absolute anaconda Release/absolute anaconda Feb 4, 2019
@dxinteractive dxinteractive merged commit a72f09b into master Feb 4, 2019
@dxinteractive dxinteractive deleted the release/absolute-anaconda branch February 4, 2019 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants