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

Add Block: Recent Comments #1792

Closed
melchoyce opened this Issue Jul 7, 2017 · 25 comments

Comments

@melchoyce
Copy link
Contributor

melchoyce commented Jul 7, 2017

Attributes

  • None, Left, Right, Center, Full Width
  • Show comment excerpt
  • Show avatar
  • Show timestamps
  • Number of comments to show

States

Selected:

recent comments

Neutral:

recent comments block


Please note that the only attribute currently in the widget is "number of comments to show." I'm proposing adding options to include avatars and timestamps, and displaying them like the o2 comments widget. I also think an option to show a short comment excerpt would benefit the widget, so I've also included that in my mockup.

@melchoyce melchoyce added the Design label Jul 7, 2017

@westonruter

This comment has been minimized.

Copy link
Member

westonruter commented Jul 7, 2017

I like it. How they appear when the excerpts are included?

@karmatosed karmatosed added the Blocks label Jul 7, 2017

@melchoyce melchoyce added the New Block label Jul 7, 2017

@melchoyce

This comment has been minimized.

Copy link
Contributor Author

melchoyce commented Jul 7, 2017

Thinking:

recent comments block with excerpts

@StaggerLeee

This comment has been minimized.

Copy link

StaggerLeee commented Jul 8, 2017

It is something themes and templates should decide, not post content editor.
As quick Page / Menu Item "template" builder is OK, but not for Posts.

If you decided go this way, and seems as it is decided, try if possible to make global options to automatically show chosed widgets in content. I dont know how it would look alike. Maybe you put one of those widgets, and there is one new option "Remember position of "widget" block for all new Posts" (in this particular content type).

@melchoyce

This comment has been minimized.

Copy link
Contributor Author

melchoyce commented Jul 10, 2017

Hi @StaggerLeee!

Nothing is totally decided yet, except for the idea that blocks are going to replace widgets in the future. :) These are some early concepts around that idea, that all widgets will eventually need to adhere to block design patterns. My goal is just to fit these widgets into existing block patterns, and establish new patterns if necessary that more complex blocks in the future can use. I'm showing them in the context of a post, because that's what the design template I'm using has — not necessarily because they all need to be available in posts. Sorry for the confusion.

I think it's definitely worth having a conversation about where widgets-not-blocks will be available, and if they should just be limited to outside of the_content(). There are definitely some widgets that I can see working in the context of pages, and some I don't necessarily see working within posts. I also think we should deprecate some widgets moving forward, like the Pages widget (which should be merged with Menus, IMO, and made into a better menu creation interface) and the Meta widget. This is all still up for discussion.

Re: global blocks, there's some conversation about that in #1516. We'd definitely like to introduce a way for blocks to become reusable, especially once we start delving more into page editing and eventually some form of template building or management.

@melchoyce

This comment has been minimized.

Copy link
Contributor Author

melchoyce commented Jul 12, 2017

One note — "Recent Posts" was renamed to "Latest Posts." We should rename this block to Latest so they continue to match.

@danielbachhuber

This comment has been minimized.

Copy link
Member

danielbachhuber commented Jul 13, 2017

I'd like to try this out. Could you give me a 60 second overview of the suggested implementation?

@nylen

This comment has been minimized.

Copy link
Member

nylen commented Jul 14, 2017

@danielbachhuber I'd suggest looking at the implementation of the core/latest-posts block, starting there, and possibly looking for code that can be factored out into a common location, because a block that displays a list of dynamic content will likely be a common pattern.

It's not necessary to implement the entire design in one PR.

@nylen

This comment has been minimized.

Copy link
Member

nylen commented Jul 14, 2017

Also see the server-side rendering implementation for the Latest Posts block. Overall this block is far from complete.

@danielbachhuber danielbachhuber referenced this issue Jul 17, 2017

Closed

Add a Latest Comments block #1931

5 of 6 tasks complete
@danielbachhuber

This comment has been minimized.

Copy link
Member

danielbachhuber commented Jul 17, 2017

I also think an option to show a short comment excerpt would benefit the widget, so I've also included that in my mockup.

@melchoyce Are you committed to these designs? If so, do you have sample HTML markup I can follow?

possibly looking for code that can be factored out into a common location, because a block that displays a list of dynamic content will likely be a common pattern.

@nylen I agree. I'd like to handle this after the Latest Comments widget lands though, so we can spend time discussing the preferred abstraction after the Latest comments widget is final.

@westonruter

This comment has been minimized.

Copy link
Member

westonruter commented Jul 18, 2017

@danielbachhuber there is no existing markup, other than to just follow the pattern of the markup in the Latest Posts widget block. The frontend-generated markup should probably follow what is output by the Recent Comments widget in core today.

@melchoyce

This comment has been minimized.

Copy link
Contributor Author

melchoyce commented Jul 18, 2017

What @westonruter said :) In terms of the design, we have some wiggle room if things need to change.

@danielbachhuber

This comment has been minimized.

Copy link
Member

danielbachhuber commented Jul 25, 2017

@westonruter @melchoyce As a point of feedback on the contributing experience, it would be helpful to have the desired markup (with any necessary design direction) included on the issue. I'd rather it be established up front than become a point of discussion in the pull request.

@StaggerLeee

This comment has been minimized.

Copy link

StaggerLeee commented Jul 25, 2017

You are giving to much power to Editors/owners/clients/Users.

First thing that will happen with all those widgets is they will forget to add it on some Posts. Post with widget(s), followed by Post without widget(s)....etc... I know that.

@danielbachhuber

This comment has been minimized.

Copy link
Member

danielbachhuber commented Jul 25, 2017

@StaggerLeee This issue relates specifically to the "Recent Comments" block. For general Gutenberg discussion, can you create a new issue, please? Thanks.

@melchoyce

This comment has been minimized.

Copy link
Contributor Author

melchoyce commented Jul 25, 2017

@danielbachhuber That's a developer decision, so I'm not sure I'd be of any help there ¯_(ツ)_/¯

@westonruter

This comment has been minimized.

Copy link
Member

westonruter commented Jul 28, 2017

@danielbachhuber You're right. Defining the desired markup would be ideal. At the moment, I think coming up with the markup is just part of the development process, and indeed a point of discussion in the pull request.

@westonruter

This comment has been minimized.

Copy link
Member

westonruter commented Aug 1, 2017

@melchoyce should the commenter's name not be included as well as an option?

@melchoyce

This comment has been minimized.

Copy link
Contributor Author

melchoyce commented Aug 1, 2017

@westonruter You're right, that was a total oversight on my part. How about:

image

@kopepasah kopepasah added this to Backlog in Blocks Aug 9, 2017

@karmatosed karmatosed added Needs Dev and removed Design labels Sep 24, 2017

@karmatosed karmatosed modified the milestones: Beta, Nice To Have, Beta, Needs to happen Sep 24, 2017

@karmatosed karmatosed removed this from Backlog in Blocks Nov 7, 2017

@karmatosed

This comment has been minimized.

Copy link
Member

karmatosed commented Nov 7, 2017

As the project moves towards merge proposal, we are moving issues that aren't needed for that to projects. This doesn't mean they won't get done, they totally can and that's why we're moving to projects. This allows us to focus on the issues that have to happen to Gutenberg. I am closing this but it will live in projects.

@karmatosed karmatosed closed this Nov 7, 2017

@karmatosed karmatosed added this to List of blocks in Potential blocks Nov 7, 2017

@melchoyce melchoyce added this to To Do in Phase 2 Jan 16, 2018

@melchoyce melchoyce reopened this Jan 16, 2018

@westonruter

This comment has been minimized.

Copy link
Member

westonruter commented Feb 22, 2018

@mtias Given the complexity of the rendering the recent comments block and duplicating the complexity in JS when it is already implemented once in PHP, should we try implementing the editor preview rendering via PHP as well leveraging the proposed ServerSideRender in #780?

@mtias mtias removed this from the Merge Proposal milestone Mar 7, 2018

@miina

This comment has been minimized.

Copy link
Contributor

miina commented May 3, 2018

Thinking of picking this up, original PR was opened by @danielbachhuber, also saw some discussion on the approach between @mtias and @westonruter, let me know if you have any concerns about implementing the v1 of the block using ServerSideRender component and the closed PR #1931.

@melchoyce

This comment has been minimized.

Copy link
Contributor Author

melchoyce commented May 4, 2018

Like Calendar and Archive, I looked at what a more dynamic Recent Comments block could include.

I focused on exploring the “what if’s” — what if you could approve pending comments in the Recent Comments block? What if you could reply to them?

You can view what I have here: https://cloudup.com/cK_gqQvBGuG

Or walk through it in this prototype: https://wp.invisionapp.com/share/VPI3E1C2QCK#/295400427_Recent_Comments

@jeffpaul

This comment has been minimized.

Copy link
Member

jeffpaul commented May 9, 2018

@melchoyce are your comments from 5 days ago exploratory for a potential v2 of the Recent Comments block or more closely aligned to how the Recent Comments block should ship as a v1?

@melchoyce

This comment has been minimized.

Copy link
Contributor Author

melchoyce commented May 9, 2018

Exploratory for v2.

@miina miina referenced this issue Jun 19, 2018

Closed

Add Latest Comments block. #7369

3 of 3 tasks complete
@miina

This comment has been minimized.

Copy link
Contributor

miina commented Jun 19, 2018

PR for v1 added: #7369.

@tofumatt tofumatt referenced this issue Jul 12, 2018

Merged

Add latest comments block #7941

3 of 3 tasks complete

@tofumatt tofumatt added this to the 3.3 milestone Jul 13, 2018

@tofumatt tofumatt self-assigned this Jul 13, 2018

tofumatt added a commit that referenced this issue Jul 19, 2018

Add latest comments block (#7941)
Add a block that shows a range of the latest comments.

Fixes #1792
See: #7369, #1931

@westonruter westonruter moved this from To Do to Done in Phase 2 Aug 3, 2018

@gziolo gziolo moved this from Backlog to Done in Porting widgets to blocks Jan 21, 2019

@gziolo gziolo removed this from Done in Phase 2 Jan 22, 2019

@noisysocks noisysocks added this to Done in Phase 2 Jan 22, 2019

@noisysocks noisysocks removed this from Done in Phase 2 Jan 22, 2019

@afercia afercia added the Widgets label Jan 30, 2019

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