-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
[Feature] Font Library[Feature] TypographyFont and typography-related issues and PRsFont and typography-related issues and PRs[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] Code QualityIssues or PRs that relate to code qualityIssues or PRs that relate to code quality[Type] EnhancementA suggestion for improvement.A suggestion for improvement.[Type] Tracking IssueTactical breakdown of efforts across the codebase and/or tied to Overview issues.Tactical breakdown of efforts across the codebase and/or tied to Overview issues.
Description
What?
Font Library: refactor REST API endpoints.
Refactor REST endpoint URLs
Transition the Font Family APIs to be SINGULAR
(accepting as parameters and returning as responses a single Font Family item) (reference reference )
PR:
Return a single Error (with multiple calls to add()
)
instead of a collection of errors. (reference reference )
Return API responses with rest_ensure_response
instead of new WP_REST_Response()
Ensure there is error handling of any decoded JSON string
( reference )
Add schema's to the requests
Break the font library REST API controller in 2 controllers.
One for font families and one for font collections. (reference)
PR:
Error code strings need to be translated
([reference]).
Ensure the gutenberg domain used for translations is removed when porting to core.
Why?
To standardize the endpoint routes and input/output data formats and schemas.
How?
This task is somewhat big, so multiple PRs for it are expected.
Props to all the folks that brought this issue in this PR: WordPress/wordpress-develop#5285
ironprogrammer and anton-vlasenko
Metadata
Metadata
Assignees
Labels
[Feature] Font Library[Feature] TypographyFont and typography-related issues and PRsFont and typography-related issues and PRs[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] Code QualityIssues or PRs that relate to code qualityIssues or PRs that relate to code quality[Type] EnhancementA suggestion for improvement.A suggestion for improvement.[Type] Tracking IssueTactical breakdown of efforts across the codebase and/or tied to Overview issues.Tactical breakdown of efforts across the codebase and/or tied to Overview issues.