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

Global styles: enable user global styles revisions #46667

Closed
wants to merge 23 commits into from

Commits on Apr 14, 2023

  1. Initial commit

    Showing revisions for the wp_global_styles custom post type in the styles sidebar.
    We're only showing max 10 to limit the payload.
    ramonjd committed Apr 14, 2023
    Configuration menu
    Copy the full SHA
    ab00625 View commit details
    Browse the repository at this point in the history
  2. Updating test

    ramonjd committed Apr 14, 2023
    Configuration menu
    Copy the full SHA
    241460c View commit details
    Browse the repository at this point in the history
  3. Sending and checking for settings as well since some style variations…

    … might have different settings we'd want to reinstate.
    
    Doing a deep equality check to highlight the currently selected revision.
    ramonjd committed Apr 14, 2023
    Configuration menu
    Copy the full SHA
    0ba94e6 View commit details
    Browse the repository at this point in the history
  4. Added a new endpoint to the global styles rest API (/revisions)

    - Limit is 100 revisions in response
    Added experimental revisions selector/action/resolver to the core-data store
    Abstracted compare revisions into isGlobalStyleConfigEqual and added tests
    Showing selector control in the UI if revision count is > 10
    ramonjd committed Apr 14, 2023
    Configuration menu
    Copy the full SHA
    7dcf0d0 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    f56cb4e View commit details
    Browse the repository at this point in the history
  6. Update description for rest param

    Bumped revision count that can be returned from the API to 100
    ramonjd committed Apr 14, 2023
    Configuration menu
    Copy the full SHA
    fcfed1a View commit details
    Browse the repository at this point in the history
  7. There's no reason to use the stored userConfig at all if we're reinst…

    …ating the full revision.
    
    The revision should overwrite everything.
    ramonjd committed Apr 14, 2023
    Configuration menu
    Copy the full SHA
    025fcf5 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    59cb723 View commit details
    Browse the repository at this point in the history
  9. Added text domain

    ramonjd committed Apr 14, 2023
    Configuration menu
    Copy the full SHA
    af7420e View commit details
    Browse the repository at this point in the history
  10. Bumping minimum revision count until display to two:

    - same behaviour as post editor
    - since revisions includes the current saved post, so we need at least two in order to switch
    ramonjd committed Apr 14, 2023
    Configuration menu
    Copy the full SHA
    9728372 View commit details
    Browse the repository at this point in the history
  11. Added a very unpretty E2E test for global styles revisions. We can't …

    …yet delete global styles revisions and, because of other tests, we can't rely on the post revisions being a certain count so we try to cater for both in the test for now.
    
    Added aria label to buttons in the UI
    ramonjd committed Apr 14, 2023
    Configuration menu
    Copy the full SHA
    eeab42f View commit details
    Browse the repository at this point in the history
  12. Formatting the comments in the E2E test.

    Checking for the number of revision buttons in the revisions list.
    ramonjd committed Apr 14, 2023
    Configuration menu
    Copy the full SHA
    75b579f View commit details
    Browse the repository at this point in the history
  13. Fixing up things after a rebase, mainly usage of __experimentalGetCur…

    …rentGlobalStylesId, which has been removed in this PR.
    
    Adding a reset button.
    ramonjd committed Apr 14, 2023
    Configuration menu
    Copy the full SHA
    7003d22 View commit details
    Browse the repository at this point in the history
  14. Moving changes to global styles controller to 6.2 compat

    Removing secondary button styling
    ramonjd committed Apr 14, 2023
    Configuration menu
    Copy the full SHA
    08a3eed View commit details
    Browse the repository at this point in the history
  15. JS LINT YO!

    ramonjd committed Apr 14, 2023
    Configuration menu
    Copy the full SHA
    363105d View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    a7a47df View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    760ae90 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    4b1b41d View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    c1bb9f8 View commit details
    Browse the repository at this point in the history
  20. Moving the revisions link so that it's under the drop down

    Updating e2e tests
    A sad attempt at caching the unsaved userConfig
    Adding an `is_latest` prop to the rest response to indicate the latest saved revision
    ramonjd committed Apr 14, 2023
    Configuration menu
    Copy the full SHA
    3a6c161 View commit details
    Browse the repository at this point in the history
  21. Yoda?

    ramonjd committed Apr 14, 2023
    Configuration menu
    Copy the full SHA
    461d7ad View commit details
    Browse the repository at this point in the history
  22. Adding author display name and avatar to rest response

    Redesigning the buttons view
    Rationalizing rest API return properties
    ramonjd committed Apr 14, 2023
    Configuration menu
    Copy the full SHA
    408a755 View commit details
    Browse the repository at this point in the history
  23. Update PHP tests title > date

    ramonjd committed Apr 14, 2023
    Configuration menu
    Copy the full SHA
    6445d13 View commit details
    Browse the repository at this point in the history