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

Font Library: refactor REST API #55278

Closed
matiasbenedetto opened this issue Oct 11, 2023 · 3 comments
Closed

Font Library: refactor REST API #55278

matiasbenedetto opened this issue Oct 11, 2023 · 3 comments
Assignees
Labels
[Feature] Font Library [Feature] Typography Font and typography-related issues and PRs [Status] In Progress Tracking issues with work in progress [Type] Code Quality Issues or PRs that relate to code quality [Type] Enhancement A suggestion for improvement. [Type] Tracking Issue Tactical breakdown of efforts across the codebase and/or tied to Overview issues.

Comments

@matiasbenedetto
Copy link
Contributor

matiasbenedetto commented Oct 11, 2023

What?

Font Library: refactor REST API endpoints.

Refactor REST endpoint URLs

(reference reference).
PR:

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()

(reference)

Ensure there is error handling of any decoded JSON string

( reference )

Add schema's to the requests

(reference)

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.

(reference)

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

@matiasbenedetto matiasbenedetto added [Type] Enhancement A suggestion for improvement. [Type] Code Quality Issues or PRs that relate to code quality [Feature] Typography Font and typography-related issues and PRs labels Oct 11, 2023
@matiasbenedetto matiasbenedetto changed the title Font Library: consolidate REST API endpoints. Font Library: consolidate and standardize REST API endpoints. Oct 11, 2023
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Oct 18, 2023
@matiasbenedetto matiasbenedetto changed the title Font Library: consolidate and standardize REST API endpoints. Font Library: refactor REST API Jan 5, 2024
@matiasbenedetto matiasbenedetto added the [Type] Tracking Issue Tactical breakdown of efforts across the codebase and/or tied to Overview issues. label Jan 5, 2024
@creativecoder
Copy link
Contributor

Note that I've outlined a proposed API design used for this refactoring effort in #57616

@mikachan
Copy link
Member

Can this be closed now that #57688 is merged?

@matiasbenedetto
Copy link
Contributor Author

Yep, let's close it and work over more granular issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Font Library [Feature] Typography Font and typography-related issues and PRs [Status] In Progress Tracking issues with work in progress [Type] Code Quality Issues or PRs that relate to code quality [Type] Enhancement A suggestion for improvement. [Type] Tracking Issue Tactical breakdown of efforts across the codebase and/or tied to Overview issues.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants