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

Add CRUD functionality to eventespresso/core wp.data store. #780

Closed
wants to merge 94 commits into from

Commits on Jan 20, 2019

  1. Configuration menu
    Copy the full SHA
    bf34a46 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8834468 View commit details
    Browse the repository at this point in the history
  3. latest work

    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    b85c065 View commit details
    Browse the repository at this point in the history
  4. yet more updates

    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    8808625 View commit details
    Browse the repository at this point in the history
  5. rename and update

    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    1086e75 View commit details
    Browse the repository at this point in the history
  6. more updates to files

    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    6e4129a View commit details
    Browse the repository at this point in the history
  7. use constants for reducer key

    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    fb13649 View commit details
    Browse the repository at this point in the history
  8. more updates

    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    f25ab92 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    beabf8c View commit details
    Browse the repository at this point in the history
  10. adding tests and related fixes

    Not complete yet, just work done so far.  So test fails are expected still.
    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    cd80bbd View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    c07c75c View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    f88fc18 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    2502b5e View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    84b2182 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    4620877 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    85a236b View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    d034a21 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    288881c View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    8e5771b View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    e4f582e View commit details
    Browse the repository at this point in the history
  21. add missing comma

    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    b83de3c View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    7a7b15e View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    63b103b View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    fed3653 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    b43d959 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    d97bf8b View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    b0aa96e View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    1341498 View commit details
    Browse the repository at this point in the history
  29. install rememo

    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    ae0d740 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    d5d1030 View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    0959ae6 View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    8744796 View commit details
    Browse the repository at this point in the history
  33. add helper method and tests for getting primary key query string

    - This string is used in rest requests retreiving entities for a given set of ids.
    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    483fc69 View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    e1c940c View commit details
    Browse the repository at this point in the history
  35. remove obsolete files

    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    e01e9ca View commit details
    Browse the repository at this point in the history
  36. update lists store and tests for using immutable state.

    - also adds getEntitiesByIds selector and resolver.
    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    9f066c2 View commit details
    Browse the repository at this point in the history
  37. add constants for action types

    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    d2b252d View commit details
    Browse the repository at this point in the history
  38. fix jsdocs

    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    2710b00 View commit details
    Browse the repository at this point in the history
  39. fix eventespress/core state to account for plain object root

    With the use of  Redux.combineReducers  (via wp.element), the root state is actually a plain object with all the individual state slices implementing immutable.js.  In the tests I wrote, I was considering the entire state being an instance of Immutable.Map when that’s not actually the case!  So the tests passed for that assumption but not really testing real-world use-case.
    
    Although we _could_ implement our own (or a redux-immutable) combineReduceers to make the root state an Immutable.Map()… that could have repercussions down the road for other bolt-on things exposed by WP for the data stores that expect the state root to be a plain obejct.  I figured it’s safer and more future proof to simply have the state slices that matter using immutable (as the reducers/selectors are what will trigger re-renders).
    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    67f5718 View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    8862057 View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    7367c71 View commit details
    Browse the repository at this point in the history
  42. improve jsdocs

    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    60bfca8 View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    f2f3168 View commit details
    Browse the repository at this point in the history
  44. various fixes to existing blocks and code after user testing

    - existing event-attendees block (and related support components) needed updated to account for model entities no longer being a Map but rather a simple array (which imo is easier to work with).
    - After initial user monkey testing in the browser console, I discovered some other fixes needed in both the new code and automated tests (likely more to come as I keep testing).
    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    91567e3 View commit details
    Browse the repository at this point in the history
  45. updated build files

    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    a783249 View commit details
    Browse the repository at this point in the history
  46. fix default for arg

    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    5d4d198 View commit details
    Browse the repository at this point in the history
  47. fix jsdoc

    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    f7fadb1 View commit details
    Browse the repository at this point in the history
  48. add checklists

    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    dfef642 View commit details
    Browse the repository at this point in the history
  49. all kinds of linting fixes

    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    286c0b9 View commit details
    Browse the repository at this point in the history
  50. Configuration menu
    Copy the full SHA
    7d67e78 View commit details
    Browse the repository at this point in the history
  51. Configuration menu
    Copy the full SHA
    a63d9b5 View commit details
    Browse the repository at this point in the history
  52. alias @wordpress/url imports

    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    4d8c1dc View commit details
    Browse the repository at this point in the history
  53. Configuration menu
    Copy the full SHA
    bb91fc9 View commit details
    Browse the repository at this point in the history
  54. Configuration menu
    Copy the full SHA
    e823106 View commit details
    Browse the repository at this point in the history
  55. update build files

    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    6d2f17e View commit details
    Browse the repository at this point in the history
  56. remove dirty relations index actions and reducers

    The index is still in the state, but exposing this level of granularity to clients created potential problems with order of execution etc.   This state tree is more of an optimization (lookup) trick for internal use so I’ve taken care of automatically changing its state internally via the reducer rather than controlled via its own action.
    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    724e956 View commit details
    Browse the repository at this point in the history
  57. update build files

    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    6e686d7 View commit details
    Browse the repository at this point in the history
  58. implement reverse lookup for relations selector

    - its possible that  a relation is never indexed because its always listed as a relation to another entity in the state.  So we need to have reverse lookup implemented for both getRelationAdditionsQueuedForModel and getRelationDeletionsQueuedForModel for those cases where client is looking for relations using a modelName that is not a key in the index.
    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    ccab6cc View commit details
    Browse the repository at this point in the history
  59. update package-lock.json

    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    7572c35 View commit details
    Browse the repository at this point in the history
  60. Configuration menu
    Copy the full SHA
    bf2b5d5 View commit details
    Browse the repository at this point in the history
  61. update build dev files

    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    f704ad9 View commit details
    Browse the repository at this point in the history
  62. fix factory and schema selectors so they account for there being an e…

    …mpty Map for the model
    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    b5c804b View commit details
    Browse the repository at this point in the history
  63. Configuration menu
    Copy the full SHA
    02a857e View commit details
    Browse the repository at this point in the history
  64. Configuration menu
    Copy the full SHA
    95b08fb View commit details
    Browse the repository at this point in the history
  65. some more fixes to relations and entity removals

    - this includes changes to `Immutable.Set().delete` usage.  It accepts the _value_ to delete and that is much simpler than providing the key (although key seemed to work).
    - this includes some faulty logic fixes that was deleting from relation index unexpectedly and making sure tests were updated to catch that.
    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    b4f2d30 View commit details
    Browse the repository at this point in the history
  66. Configuration menu
    Copy the full SHA
    9d39992 View commit details
    Browse the repository at this point in the history
  67. update build files

    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    545a0a4 View commit details
    Browse the repository at this point in the history
  68. remove unused imports

    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    4610b75 View commit details
    Browse the repository at this point in the history
  69. Configuration menu
    Copy the full SHA
    a8661f3 View commit details
    Browse the repository at this point in the history
  70. update build files

    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    3b61394 View commit details
    Browse the repository at this point in the history
  71. Configuration menu
    Copy the full SHA
    619b6d6 View commit details
    Browse the repository at this point in the history
  72. Configuration menu
    Copy the full SHA
    26def9c View commit details
    Browse the repository at this point in the history
  73. simplify code

    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    3c183d3 View commit details
    Browse the repository at this point in the history
  74. Configuration menu
    Copy the full SHA
    d481589 View commit details
    Browse the repository at this point in the history
  75. fix code style issue

    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    a3476cc View commit details
    Browse the repository at this point in the history
  76. fix jsdocs

    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    77ce9bf View commit details
    Browse the repository at this point in the history
  77. improve function name

    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    48a0d3b View commit details
    Browse the repository at this point in the history
  78. make code more DRY

    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    564064f View commit details
    Browse the repository at this point in the history
  79. use ternaries

    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    93930b6 View commit details
    Browse the repository at this point in the history
  80. Configuration menu
    Copy the full SHA
    794d704 View commit details
    Browse the repository at this point in the history
  81. fix formatting

    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    ee19b93 View commit details
    Browse the repository at this point in the history
  82. condenxe code

    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    747f95b View commit details
    Browse the repository at this point in the history
  83. improve indenting (code style)

    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    4afc1bf View commit details
    Browse the repository at this point in the history
  84. switch usage of shift() to pop()

    - pop is more performant becuase the array does not need re-indexed.  There’s no need to retain order here so `pop` is sufficient.
    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    6f787ee View commit details
    Browse the repository at this point in the history
  85. woops fix introduced bug.

    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    a890483 View commit details
    Browse the repository at this point in the history
  86. Configuration menu
    Copy the full SHA
    9ef9123 View commit details
    Browse the repository at this point in the history
  87. update build files

    nerrad committed Jan 20, 2019
    Configuration menu
    Copy the full SHA
    6d9a1b0 View commit details
    Browse the repository at this point in the history

Commits on Jan 21, 2019

  1. use pop() instead of shift()

    nerrad committed Jan 21, 2019
    Configuration menu
    Copy the full SHA
    5362800 View commit details
    Browse the repository at this point in the history
  2. update build files

    nerrad committed Jan 21, 2019
    Configuration menu
    Copy the full SHA
    e9d21cb View commit details
    Browse the repository at this point in the history
  3. just use index for the key

    nerrad committed Jan 21, 2019
    Configuration menu
    Copy the full SHA
    9d71738 View commit details
    Browse the repository at this point in the history

Commits on Jan 23, 2019

  1. Configuration menu
    Copy the full SHA
    3324fc5 View commit details
    Browse the repository at this point in the history

Commits on Jan 24, 2019

  1. Merge branch 'master' into FET/add-crud-to-stores

    # Conflicts:
    #	assets/dist/build-manifest.json
    #	assets/dist/ee-components.622f86c8649619cbcbcb.dist.js
    #	assets/dist/ee-components.7d6c99591998d2eae4c0.dist.js
    #	assets/dist/ee-components.b72fa352434166ef52be.dist.js
    #	assets/dist/ee-data-stores.67b185e1920ba24c7431.dist.js
    #	assets/dist/ee-model.7f810d358d08f82e088b.dist.js
    #	assets/dist/ee-model.93606ab921bb65bfe8e0.dist.js
    #	assets/dist/ee-model.b08f7f3ee436d1dbb468.dist.js
    nerrad committed Jan 24, 2019
    Configuration menu
    Copy the full SHA
    9e4c752 View commit details
    Browse the repository at this point in the history
  2. update build files

    nerrad committed Jan 24, 2019
    Configuration menu
    Copy the full SHA
    dcf00eb View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8b81735 View commit details
    Browse the repository at this point in the history