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

Identify components to componentize #15

Open
MichaelArestad opened this issue Jan 17, 2015 · 12 comments
Open

Identify components to componentize #15

MichaelArestad opened this issue Jan 17, 2015 · 12 comments

Comments

@MichaelArestad
Copy link
Contributor

Let's figure out some components! CC @kwight

Initial ideas that come to mind that follow the standardish class structure pretty nicely:

|- masthead
|-- site-title

|- navigation

|- hentry // for post and pages?
|--- entry-title
|--- entry-meta // and maybe components for the stuff that lives here
|--- entry-content

|- comment-box
|--- comment-form
|--- comments
|----- comment
|------- author ingo/meta stuff?
|------- comment-content
|------- comment-actions // reply/favorite/etc

|- widget
@karmatosed
Copy link
Contributor

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.

@karmatosed
Copy link
Contributor

Additions:

  • site-footer (could be colophon) Potentially splitting down into site-footer.
  • featured image addition to entry list. It's a small component but I think having it split out could be argued logical. I know this is on in _s but it's so common I'm pondering if in Picard it should be.
  • As far as entry-meta goes I'd possibly suggest to split that further down.
  • I'd tentatively suggest entry-format outside for post formats too.

@jacklenox
Copy link
Contributor

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.

@kwight
Copy link
Contributor

kwight commented Jan 22, 2015

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.

@jacklenox
Copy link
Contributor

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.

@jacklenox
Copy link
Contributor

But this is happening. So ultimately we can use this anyway.

@MichaelArestad
Copy link
Contributor Author

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.

@karmatosed
Copy link
Contributor

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.

@MichaelArestad
Copy link
Contributor Author

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.

@karmatosed
Copy link
Contributor

"Minimum viable epic theme" Sub-title waiting to happen there.

@kwight
Copy link
Contributor

kwight commented Jan 22, 2015

Just noting how I've broken up components based on Underscores in my Calypso-y, theme-y thing: https://github.com/Automattic/calypso-theme

@kwight
Copy link
Contributor

kwight commented Jan 23, 2015

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants