Pending design direction from #614410: Patterns for recent-items-blocks on the dashboard we'll probably want to change this block a bit. Creating the issue now so that we may have workflow and seperate implementation issues from design discussions. Thanks.

CommentFileSizeAuthor
#12 commentrecent.patch4.02 KBcasey
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

yoroy’s picture

Status: Active » Postponed
yoroy’s picture

Priority: Normal » Critical
Status: Postponed » Active

Replace 'content' with comments:

design process leading towards this proposal is in #614410: Patterns for recent-items-blocks on the dashboard

yoroy’s picture

#337947: Correct whitespace issue for 'recent content block' in dashboard is as good as done. We'd like to see the implementation over there used here for comments as well.

First decision to make:
Make this a new dashboard specific 'recent comments' block, or rework the already existing 'recent comments' one?

bleen’s picture

+1 for "rework the already existing 'recent comments' one"

Bojhan’s picture

So I assume that its actually better to reuse the code of recent content block, because that has gone trough much more rigorous review process then the recent comments block. As we learned we usually require quite some refactoring.

yoroy’s picture

Yes of course. My question was if we want to have 2 seperate 'recent comments' blocks, 1 for front-end use, and another one for dashboard use. Maybe they can also be the same block and let permissions determine which links are shown etc.

David_Rothstein’s picture

I think in general the rule should be to make them separate blocks. See comments by @catch and I on the original Dashboard issues, for example, starting around:
http://drupal.org/node/544360#comment-2124036
http://drupal.org/node/569190#comment-2124026

In this case, though, if it's really the exact same block just with edit/delete links added based on permissions, then it could make sense to use the same one. However, if there's only one block, it means that sites which do not have a separate admin theme have to choose where they want it (either on the dashboard, or on the main site, but not both).

yoroy’s picture

Yes, that's why I asked :)

casey’s picture

Subscribing... I hope to work on this tomorrow.

casey’s picture

@yoroy So do we need two seperate blocks?

initial patch (needs tests).

casey’s picture

FileSize
4.02 KB

Forgot patch

webchick’s picture

Hm. I don't like this idea, I don't think. Existing D6 sites are using that block and are going to expect it to work the same, not all of a sudden become a huge table with edit/delete links that breaks the sidebar in their theme.

Since this is intended to be used in a different context than the former recent comments block, it should be its own thing, preferably with "Dashboard" somewhere in the name to differentiate it from the other.

yoroy’s picture

Ok, new block from scratch it shall be.

casey’s picture

Where do we define that block? comment.module or dashboard.module? And what title should it have?

webchick’s picture

I would say comment.module. Dashboard is intended to be merely a framework for displaying these blocks. Also, contributed modules won't have the opportunity to add their own blocks to dashboard module, so core modules shouldn't cheat. :)

On the title, I defer to the UX team. It's a little tricky. We want this and the new Recent Content block to be clear that they form a "pair". We also do not want this block and the old "Recent comments" to be confused.

webchick’s picture

Fixing #601932: Allow dashboard to limit available blocks would allow us to exclude the original recent comments block. I'm not sure though. If you wanted to put some big huge graphs in the center, it might actually make sense to use the "minimal" recent comments block in the smaller area to the side.

yoroy’s picture

The title can only be 'Recent comments for dashboard' then. Anything else would be lying :)

Bojhan’s picture

Status: Active » Needs review

Can we get some activity on this?

Status: Needs review » Needs work

The last submitted patch, commentrecent.patch, failed testing.

sun.core’s picture

Priority: Critical » Normal

Not critical. Please read and understand Priority levels of Issues, thanks.

andypost’s picture

Recent content block already looks ugly for anonymous users within new default theme. Blank cells are useless and eats a page area

amc’s picture

Possibly related with regard to style issues: #849670: Recent content block usability

andypost’s picture

Also proposed markup for theming "time ago" #807744: Use microformat for theme_comment_block()

andypost’s picture

Maybe better to add check for dashboard in theme_comment_block() like #849670-8: Recent content block usability

stevestanco’s picture

This new block for recent comments help me in reduction of spam on my blog.

yoroy’s picture

Version: 7.x-dev » 8.x-dev
star-szr’s picture

Version: 8.x-dev » 7.x-dev

Dashboard module is no longer in core, see #950956: Remove Dashboard from core . Moving to 7.x for consideration.

andypost’s picture

Version: 7.x-dev » 8.x-dev
Component: dashboard.module » comment.module
Issue tags: +VDC-cleanup

At least the implementation should be cleaned-up, having dumb theme function makes no sense.
So needs to check:
- need in current custom theme function - move to current build method - #2054993: Remove (untested, unused, broken) comment_get_recent()
- implementation and defaults of views shipped block
- usability of having 2 implementations of "recent comments block"

class RecentCommentsBlock extends BlockBase {
  public function build() {
    return array(
      '#theme' => 'comment_block',
      '#number' => $this->configuration['block_count'],
    );
  }
andypost’s picture

Version: 8.x-dev » 7.x-dev
Issue tags: -VDC-cleanup