Make WordPress Core

Opened 12 years ago

Closed 10 years ago

#20946 closed feature request (wontfix)

NA Dash: Improve 'Right Now' in Network Admin

Reported by: drewapicture's profile DrewAPicture Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.4
Component: Networks and Sites Keywords: ui-feedback
Focuses: multisite, administration Cc:

Description

It seems like there are a few things that could be done to make 'Right Now' in the Network Admin a little more informative and functional:

  1. Add the current WordPress version and applicable 'Update to X' and/or 'Update Network' buttons. Currently in NetAdmin the version is only displayed in the footer and (sort of) in /network/update-core.
  1. List and link the site and user counts in similar fashion as the single-site 'Right Now' box
  1. List and link theme and plugin counts

Attachments (5)

20946.first-pass.diff (7.6 KB) - added by DrewAPicture 12 years ago.
First pass
20946-first-pass-screen.png (37.4 KB) - added by DrewAPicture 12 years ago.
Screencap of first-pass
20946.2.diff (7.6 KB) - added by DrewAPicture 12 years ago.
Tweaked version of first-pass
20946.3.diff (8.1 KB) - added by DrewAPicture 12 years ago.
Create becomes Add, adjusted widths
20946.4-array.diff (7.5 KB) - added by DrewAPicture 12 years ago.
introduces $mu_rightnow array

Download all attachments as: .zip

Change History (25)

#1 @scribu
12 years ago

  • Cc scribu added

#2 @ocean90
12 years ago

  • Cc ocean90 added

@DrewAPicture
12 years ago

First pass

@DrewAPicture
12 years ago

Screencap of first-pass

#3 follow-up: @DrewAPicture
12 years ago

  • Cc xoodrew@… added
  • Keywords has-patch added

20946.first-pass.diff is a rough first-pass at adding/linking totals for sites, users, themes and plugins and adding the WordPress version info. Screenshot here: 20946-first-pass-screen.png.

In mimicking wp_dashboard_right_now(), I've also added in a couple of hooks in essentially the same places:

  • mu_right_now_network_table_end at the end of the Totals table
  • mu_right_now_table_end at the end of the Tools table

#4 @ocean90
12 years ago

  • Keywords ui-feedback added

@DrewAPicture
12 years ago

Tweaked version of first-pass

#5 @Ipstenu
12 years ago

  • Cc ipstenu@… added

#6 follow-up: @johnbillion
12 years ago

Small one: "Create a new site|user" should really say "Add a new site|user" for consistency with terminology on the Sites and Users screens.

#7 in reply to: ↑ 3 @johnbillion
12 years ago

Replying to DrewAPicture:

20946.first-pass.diff is a rough first-pass at adding/linking totals for sites, users, themes and plugins and adding the WordPress version info.

I don't think we should be mimicking the code in the current Right Now section, which is pretty terrible. It's not easy to remove items from this list (you need to use CSS), you can only add items to the bottom, and when you do so you have to manually add all the crappy markup around each item to match the existing items. The list of items should be an array with a filter on it rather than an action sitting at the bottom. This applies to the non-network admin Right Now widget too, but that's probably better addressed in another ticket.

@DrewAPicture
12 years ago

Create becomes Add, adjusted widths

#8 in reply to: ↑ 6 @DrewAPicture
12 years ago

Replying to johnbillion:

Small one: "Create a new site|user" should really say "Add a new site|user" for consistency with terminology on the Sites and Users screens.

Easy enough. I also adjusted the percentage widths for the tables.

The list of items should be an array with a filter on it rather than an action sitting at the bottom. This applies to the non-network admin Right Now widget too, but that's probably better addressed in another ticket.

I agree, if not only because the code is verbose and repeated enough that it almost makes more sense to dump it out of an array.

20946.3.diff covers the first part. Looks like this: http://cl.ly/16010e2r400U3T0R3Y0Y

I'll play around with the second part. Appreciate the suggestions.

Last edited 12 years ago by DrewAPicture (previous) (diff)

@DrewAPicture
12 years ago

introduces $mu_rightnow array

#9 @DrewAPicture
12 years ago

20946.4-array.diff is a pretty dirty attempt at printing the rows from an array. Would greatly appreciate some feedback on whether this is too hacky an approach.

#10 follow-up: @scribu
12 years ago

Damn, that looks just like the $menu global. I don't think we want any more code like that.

#11 in reply to: ↑ 10 @DrewAPicture
12 years ago

Replying to scribu:

Damn, that looks just like the $menu global. I don't think we want any more code like that.

Open to suggestions. I did it without a new global but wasn't sure about object vs array and just gave it an optimistic go.

Version 0, edited 12 years ago by DrewAPicture (next)

#12 @scribu
12 years ago

Something similar to the WP_Admin_Bar API perhaps?

#13 @sabreuse
12 years ago

  • Cc sabreuse@… added

#14 @DrewAPicture
12 years ago

  • Keywords has-patch removed

I'm game. Haven't worked much with writing classes but seems it's the wave of the future.

#15 @scribu
12 years ago

It's been the wave of the future for a few decades now. :P

#16 @scribu
12 years ago

I remembered that to insert an item into the admin bar, you have to rely on hook priority, which is a pretty round-about way of doing it, IMO.

How about something more like jQuery:

$right_now->append( array(
  'id' => 'user-count',
  'label' => _n_noop( 'User', 'Users' ),
  'count' => 1000
  'url' => ...
) );

We can generate both the number and text classes from the 'id' key.

This would just add the element at the end of the list.

We'd also have:

$right_now->prepend( array(
  ...
) );

$right_now->insert_before( 'some-other-id', array(
  ...
) );

$right_now->insert_after( 'some-other-id', array(
  ...
) );

$right_now->replace( 'some-other-id', array(
  ...
) );

$item = $right_now->get( 'some-other-id' );

$right_now->remove( 'some-other-id' );

This could also be used for the regular admin box.

#17 @scribu
12 years ago

After reading The Demise of the Personal Dashboard, I don't think I'll be focusing on the Right Now widgets anymore.

Last edited 12 years ago by scribu (previous) (diff)

#18 @kraftbj
11 years ago

  • Summary changed from Improve 'Right Now' in Network Admin to NA Dash: Improve 'Right Now' in Network Admin

#19 @nacin
11 years ago

  • Component changed from Network Admin to Networks and Sites
  • Focuses administration added

#20 @DrewAPicture
10 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

No activity in more than a year and I have no interest in pursuing it further. Closing as wontfix.

Note: See TracTickets for help on using tickets.