-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Commits on Jan 23, 2019
-
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.
Configuration menu - View commit details
-
Copy full SHA for 74e9344 - Browse repository at this point
Copy the full SHA 74e9344View commit details -
Configuration menu - View commit details
-
Copy full SHA for 267b9e4 - Browse repository at this point
Copy the full SHA 267b9e4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2a8658a - Browse repository at this point
Copy the full SHA 2a8658aView commit details -
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.
Configuration menu - View commit details
-
Copy full SHA for 89471ec - Browse repository at this point
Copy the full SHA 89471ecView commit details -
Configuration menu - View commit details
-
Copy full SHA for 710b4b4 - Browse repository at this point
Copy the full SHA 710b4b4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9364bee - Browse repository at this point
Copy the full SHA 9364beeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 40938e6 - Browse repository at this point
Copy the full SHA 40938e6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 781de9f - Browse repository at this point
Copy the full SHA 781de9fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1890cfc - Browse repository at this point
Copy the full SHA 1890cfcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 23c65ac - Browse repository at this point
Copy the full SHA 23c65acView commit details -
Configuration menu - View commit details
-
Copy full SHA for d85724a - Browse repository at this point
Copy the full SHA d85724aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5546c58 - Browse repository at this point
Copy the full SHA 5546c58View commit details -
Configuration menu - View commit details
-
Copy full SHA for 692e12f - Browse repository at this point
Copy the full SHA 692e12fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8797da3 - Browse repository at this point
Copy the full SHA 8797da3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7b8d040 - Browse repository at this point
Copy the full SHA 7b8d040View commit details -
Configuration menu - View commit details
-
Copy full SHA for d6a6b1c - Browse repository at this point
Copy the full SHA d6a6b1cView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.