-
Notifications
You must be signed in to change notification settings - Fork 50
Closed
Copy link
Labels
[Status] In ProgressAssigned work scheduledAssigned work scheduled[Type] OverviewComprehensive, high level view of an area of focus often with multiple tracking issuesComprehensive, high level view of an area of focus often with multiple tracking issues
Milestone
Description
We are close to wrapping up the Abilities API 1.0 Milestone, covering all server-side aspects. Now, it's time to start working on implementing a client-side registry for the Abilities API to streamline usage with JavaScript.
We can use for inspiration the existing implementation in the WP Feature API plugin:
https://github.com/Automattic/wp-feature-api/tree/trunk/packages/client
Planned Tasks
I propose we start with developing a JavaScript package on top of the server-side registry, so it's easy to:
- list all available abilities
- find a specific ability by name
- execute a selected ability on the server
Internally, this would use the existing REST API endpoints added in #6.
See the prototyped version:
https://github.com/Automattic/wp-feature-api/blob/trunk/packages/client/src/api.ts
Future
- Implement a way to register abilities that work only on the client.
- It's also worth considering a solution that allows extending the ability registered on the server with an alternative implementation optimized for client usage. A good example is operations on data entities (such as posts or pages) through the
@wordpress/core-datapackage, which provides an abstraction layer on top of REST API operations, offering optimistic updates, data caching, and tight integration with the editor's UI.
swissspidy and sethrubenstein
Metadata
Metadata
Assignees
Labels
[Status] In ProgressAssigned work scheduledAssigned work scheduled[Type] OverviewComprehensive, high level view of an area of focus often with multiple tracking issuesComprehensive, high level view of an area of focus often with multiple tracking issues
Type
Projects
Status
Done