WordPress / wporg-parent-2021

17 stars 10 forks source link

Templates: Add comments to single post template #104

Closed ryelle closed 12 months ago

ryelle commented 1 year ago

The current templates do not show any comments, but the Rosetta blogs need to support commenting. This adds a simple comment layout to the end of single post views.

Fixes https://github.com/WordPress/wporg-main-2022/issues/305

This should not affect the other sites that are already using the parent theme — the developer blog has a custom template, while documentation, developer, & showcase override the single.html template.

@iandunn FYI for events.wordpress.org, but I don't think you have any views that would use single.html anyway.

Screenshots

@WordPress/meta-design I referenced the ".org website hub" figma for comment reference, but didn't find anything so I just tried to keep it simple.

Screenshot
Single comment, replies open
Multiple comments, replies closed (no form)
No comments yet, with comment form Screen Shot 2023-09-07 at 16 59 14
Threaded comments (rosetta sites don't support this currently) Screenshot 2023-09-07 at 5 30 03 PM

How to test the changes in this Pull Request:

Try loading this PR on a sandbox and viewing the URL in the original issue.

To test locally…

  1. Create & view a post with comments open
  2. The reply form should appear
  3. Add a comment
  4. It should be loaded on the page
  5. Add a few comments
  6. They should show up as expected
  7. View a post with comments disabled
  8. There should be no reply form
  9. Any previously entered comments will appear
jasmussen commented 12 months ago

Seems fine to me, we can follow up holistically if need be.