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

WIP Playful Python #116

Merged
merged 86 commits into from Oct 24, 2018
Merged

WIP Playful Python #116

merged 86 commits into from Oct 24, 2018

Conversation

dxinteractive
Copy link
Collaborator

@dxinteractive dxinteractive commented Oct 15, 2018

Contains #107 #109 #111 #113 #115 #121

Current pre-release: v0.16.0-0 npm-tag@next

dataparcels

  • BREAKING CHANGE Removed Parcel.addModifier()
  • BREAKING CHANGE Removed Parcel.addDescendantModifier()
  • Added Parcel.matchPipe()
    • Similar to Parcel.pipe() but automatically applies the updaters to new parcels whenever they are created and when the provided match rule is matched.
    • matchPipe(match: string, ...updaters: Array<(parcel: Parcel) => Parcel>): Parcel
    • Match string examples:
      • Match current parcel location only: .
      • Match child parcels only .*
      • Match child parcels with a key of "abc": .abc
      • Match child parcels whose key ends with "date": .*date
      • Match grandchild parcels only: .*.*
      • Match any descendant parcels with a key of "def": **.def
      • Match child parcels which are indexed: .*:Indexed
      • Match child parcels which are not indexed: .*:!Indexed
      • Match any descendant parcels which are elements": **:Element
      • Match either child parcels called "abc" or "def": .abc|.def
    • You must escape ., |, # or : with a preceding %. e.g. {"dot.key"} would be matched with .dot%.key
    • Matching is always relative to the depth at which matchPipe was called.
  • Fix: export a more correct and complete set of types
  • Fix: Parcel._boundarySplit() was not using _this._treeshare.boundarySplit() Fix: make Parcel._boundarySplit() replace treeshare with treeshare.boundarySplit() #109
  • refactor: allow for types to accept arrays
  • Add Parcel.batchAndReturn only on top level parcels
    • Calls batch() but returns the parcel instead of calling handleChange

react-dataparcels

  • BREAKING CHANGE ParcelHoc config.initialValue is now called ParcelHoc config.valueFromProps
  • BREAKING CHANGE ParcelHoc now uses getDerivedStateFromProps. Use https://github.com/reactjs/react-lifecycles-compat if you're on a React version earlier than 16.3.0
  • Fix: export a more correct and complete set of types
  • Add ParcelBoundary.actions.cancel() to be able to cancel changes in a parcel boundary
  • Fix: Default behaviour for ParcelBoundary should be to clear the change buffer when a new parcel is received via props, as we can't assume the changes in the buffer are able to be applied to the new parcel's data.
  • Redo all ParcelBoundary tests to avoid setTimeout or any nested expect calls.
  • refactor: allow for types to accept arrays
  • Add ParcelBoundaryHoc (Add ParcelBoundaryHoc #108)
  • Add ParcelHoc config.shouldParcelUpdateFromProps which allows a ParcelHoc to replace its parcel's contents based on prop changes. At this point the only option is to completely replace all of the parcels contents and delete all key and meta information, depending on the outcome of a boolean test. In future there will be more options to allow partial changes, and to allow key and meta data to be retained.

dataparcels-docs

  • Add ParcelBoundary.childRenderer docs
  • Add ParcelBoundary.actions.cancel() to docs
  • Add ParcelBoundaryHoc docs
  • Add child props to ParcelHoc and ParcelBoundaryHoc
  • Add new gifs to docs

…ake matcher not care about special ^ char so it can work with non absolute paths, and use | to split parts and not types
…aries on the same parcel were sharing registries (see #109)
@dxinteractive dxinteractive merged commit e3f32ce into master Oct 24, 2018
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

1 participant