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

Revisions: add new selectors to fetch entity revisions #54046

Merged
merged 9 commits into from
Nov 20, 2023

Commits on Nov 16, 2023

  1. Fetching entity revisions using loaded name argument e.g., post:id:re…

    …visions
    
    Revisions loaded into state tree under revisions[parent]
    
    Invalidate revisions after saved entity
    
    Revisions url params are contained in entity  config
    
    Testing with global styles - modifying CPT to show in rest
    
    Implementing thin API layer for Revisions over the getEntityRecords implementation
    
    Duplicated the logic in the selectors for revisions functions
    
    Added tests
    ramonjd committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    93dfbf6 View commit details
    Browse the repository at this point in the history
  2. Revert edit context query param when fetching post types

    Reverting timeout in performance tests.
    ramonjd committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    80cf76f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    df9a29a View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ac7a34e View commit details
    Browse the repository at this point in the history
  5. Removed unnecessary REST API change for global styles: it was to pull…

    … in the CPT in the /types response, which we don't need for core-data since it's a root entity.
    ramonjd committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    e6792ac View commit details
    Browse the repository at this point in the history
  6. Remove duplicated queried-data reducer functions for revisions, and u…

    …se them in the main reducer
    
    Create dedicated resolvers for getRevision/s, thereby removing the split name parsing required (name:id:revisions)
    Create dedicated action receivers for revisions
    Rename from getEntityRevisions to getRevisions
    
    Fully remove parseEntityName
    
    Updated selector tests
    
    Use queriedDataReducer shape for revisions. The queriedDataReducer doesn't need to know about the revisions action type.
    
    Update doc comments
    
    Updated CHANGELOG.md
    ramonjd committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    9d5084b View commit details
    Browse the repository at this point in the history
  7. This commit:

    - removes `hasRevisions` because it has no noticeable benefit, at least as far as I can see. I'm probably wrong.
    - removes the default revisions query context for the API call (the default is 'view' anyway)
    - fixes the revisions reducer
    - Add _fields logic to resolvers and selectors
    
    Adds basic reducer tests
    ramonjd committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    8425c47 View commit details
    Browse the repository at this point in the history
  8. updated variable names: parentId > recordKey, key > revisionKey

    removing lock-related code
    deleting `recordKey` from action object before sending to queriedDataReducer
    updating docs
    ramonjd committed Nov 16, 2023
    Configuration menu
    Copy the full SHA
    0c7241b View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    424b12f View commit details
    Browse the repository at this point in the history