-
Notifications
You must be signed in to change notification settings - Fork 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
Create an API endpoint for the currently available designs #42922
Comments
I've done this for page-templates/templates. I'm yet to find an urgent case to deliver available-designs from the backend. |
Some work to combine/simplify template JSON data has been done over at #40587 |
This task could form the basis of our MVP work, if only to have the endpoint ready.
pbxlJb-fl-p2#comment-247 |
Starting with D45534-code ripped from D44864-code. |
p1593392117122500-slack-CRWCHQGUB Some related discussion in that thread |
Disabled the endpoint and deployed D44864-code as is, simplicity. |
Source: p1593392117122500-slack-CRWCHQGUB @lsl makes a good distinction, which I've only just managed to grok: for the MVP, we're primarily dealing with Gutenboarding "designs". These "designs" encapsulate extra information, such as "theme" and "fonts" and whether a design is "featured" or "premium" or whatever. This information is required in the context of Gutenboarding but nowhere else. E.g.,
Other pattern-based entities do not care about this information. Should we define a "pattern's" base properties and leave it up to the consuming application to extend them? In other words, should a Gutenboarding design object be a superset of a basic pattern? For example, Gutenboarding requires
Gutenboarding should therefore know how to extend
As far as this task is concerned, we're trying to solve two tasks:
The easiest path for now might be to return the exact value of available-designs-config.json, and worry about future requirements, well, in future iterations. These are just my thoughts... leaving it open to debate. |
Some more work on this began in D45748-code, the API portion has now been spun off to D45750-code. For now I'm working more on D45748-code to nail down more of the internals before implementing more in D45750-code. D45750-code will likely depend on D45748-code. D45750-code should result in 2-3 new endpoints to check off this issue (#42922). |
Look at a way to deliver starter site information to NUX flows: D49406-code |
Mobile needs this too: pb3aDo-tQ-p2#comment-893 |
D49406-code is ready for review Future tasks:
@enejb I'm not sure if the endpoint is useful to you, but it's a start. Let us know if it helps as Gutenboarding integration might not happen for a while. |
D49406-code is working nicely for me, it's exciting seeing this on an endpoint! Just left a few comments/questions about naming, but otherwise LGTM, and I really like the idea of consolidating the starter sites list in this class where it's a bit of a clearer home for it 😀 |
Closed by D49406-code |
^^ |
Outcome
To create an endpoint will return a collection of objects containing design metadata (e.g. pretty similar to what’s in available-designs-config.json).
Gutenboarding should pull the available designs from the server via an API, instead of them being hard-coded in Calypso.
This will ensure that the backend and frontend have a canonical source of current templates, the linked themes, and source sites, to be used for both Headstarting a new site, and the template/demo endpoint.
With this metadata stored in the backend, we can use it as the basis for writing proper PHP tests for our endpoints, and make sure that nothing breaks.
Master thread: pbAok1-16B-p2
Code
D49406-code
The text was updated successfully, but these errors were encountered: