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

Reusable blocks: Improve UX for non-privileged users #12378

Merged
merged 16 commits into from
Jan 23, 2019

Commits on Jan 23, 2019

  1. Improve reusable block UX for non-privileged users

    Improves the UX of creating, editing, and deleting a reusable block when
    logged in as an author or contributor by disabling the _Add to Reusable
    Blocks_, _Edit_, and _Remove from Reusable Blocks_ buttons when
    necessary.
    
    This is accomplished under the hood by introducing the `canUser()`
    selector to `core-data` which allows callers to query whether the REST
    API supports performing a given action on a given resource, e.g. one can
    query whether the logged in user can create posts by running
    `wp.data.select( 'core' ).canUser( 'create', 'posts' )`.
    
    The existing `hasUploadPermissions()` selector is changed to use
    `canUser( 'create', 'media' )` under the hood.
    noisysocks committed Jan 23, 2019
    Configuration menu
    Copy the full SHA
    74e9344 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    267b9e4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2a8658a View commit details
    Browse the repository at this point in the history
  4. Hide 'Add to Reusable Blocks' and 'Remove from Reusable Block' buttons

    Hide the 'Add to Reusable Blocks' and 'Remove from Reusable Blocks'
    buttons instead of disabling them when the user does not have the
    necessary permissions.
    noisysocks committed Jan 23, 2019
    Configuration menu
    Copy the full SHA
    89471ec View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    710b4b4 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    9364bee View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    40938e6 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    781de9f View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    1890cfc View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    23c65ac View commit details
    Browse the repository at this point in the history
  11. Typo: s/4.8/4.9/

    noisysocks committed Jan 23, 2019
    Configuration menu
    Copy the full SHA
    d85724a View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    5546c58 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    692e12f View commit details
    Browse the repository at this point in the history
  14. Typo: s/ot/to/

    noisysocks committed Jan 23, 2019
    Configuration menu
    Copy the full SHA
    8797da3 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    7b8d040 View commit details
    Browse the repository at this point in the history
  16. Update version: s/4.9/5.0/

    noisysocks committed Jan 23, 2019
    Configuration menu
    Copy the full SHA
    d6a6b1c View commit details
    Browse the repository at this point in the history