Open MichaelArestad opened 9 years ago
A big +1 for components. If we're doing this it would be good to think about maximising the structure and getting it right to align with the Sass. I'd really like to be part of that.
Additions:
I'm very excited about this.
As far as I understand React, we will need some sort of container component for instances of multiple hentry
components. site-main
mayhaps?
Further, I don't believe either WP-API or the WordPress.com REST API currently allow you to retrieve widgets. My thought on this at the moment is a tad hackish, but would involve output buffering the sidebar into a custom endpoint created by Picard. So we wouldn't have direct interaction with widget
components as such.
Of course, this is just a "right now" solution to the issue.
I've got a component structure going in the SPA I'm working on; give me today to get it updated on GH so you can see how I've component-ized (good word @MichaelArestad !) the _s markup.
Further, I don't believe either WP-API or the WordPress.com REST API currently allow you to retrieve widgets. My thought on this at the moment is a tad hackish, but would involve output buffering the sidebar into a custom endpoint created by Picard.
I think the right approach is for us to write the proper endpoints for wpcom
, rather than hacking OB and endpoints in a theme. Starting a separate issue.
I think the right approach is for us to write the proper endpoints for wpcom, rather than hacking OB and endpoints in a theme. Starting a separate issue.
I disagree. We're not using the wpcom
API at all right now and the method for extending WP-API is almost certainly closer to the ultimate core implementation than how it's done in the wpcom
API.
But this is happening. So ultimately we can use this anyway.
As far as I understand React, we will need some sort of container component for instances of multiple hentry components. site-main mayhaps?
site-main
makes sense as a main column container, but maybe something a bit more reusable for a multiple hentry
container. hentries
maybe?
Further, I don't believe either WP-API or the WordPress.com REST API currently allow you to retrieve widgets.
No tears will be shed by me if we don't have widgets.
Maybe widgets is something to achieve later? I don't want to get out the punt-o-matic machine, but to me I think having it work without widgets is an amazing version one with option to later bake in.
Maybe widgets is something to achieve later? I don't want to get out the punt-o-matic machine, but to me I think having it work without widgets is an amazing version one with option to later bake in.
Yep. Minimum viable epic theme is a good start.
"Minimum viable epic theme" Sub-title waiting to happen there.
Just noting how I've broken up components based on Underscores in my Calypso-y, theme-y thing: https://github.com/Automattic/calypso-theme
Cool, of course widgets are already on the WP-API radar. And yes, I agree, I didn't see widgets necessarily for a Picard MVP. Just sticking a pin in it, and suggesting that adding something to wpcom
is a possible reality in the shorter term if we need it.
Let's figure out some components! CC @kwight
Initial ideas that come to mind that follow the standardish class structure pretty nicely: