WordPress.org

Make WordPress Core

Opened 10 years ago

Last modified 10 years ago

#15580 closed defect (bug)

Fixes to Ajaxify Admin before 3.1 — at Version 43

Reported by: jane Owned by: scribu
Milestone: 3.1 Priority: highest omg bbq
Severity: blocker Version: 3.1
Component: Administration Keywords: has-patch commit
Focuses: Cc:

Description (last modified by scribu)

This ticket will hold the individual adjustments needed for the ajaxified admin features before we release for 3.1

  1. When using pagination located at the bottom of the table, should load new results and bump you to the top of the screen.
  1. On comments, no need to sort alphabetically by comment.
  1. On p=36220 comment screens, no need to sort by "in reply to" since they are all in reply to the same comment.
  1. Save-state hashes for URLs.

4b. Don't bump bulk action and other triggers back to the front page.

  1. Date columns should first sort by DESC, not ASC. Plugins will likely need a new way to request DESC over ASC for a specific column.

Change History (45)

#1 @nacin
10 years ago

  • Description modified (diff)
  • Keywords needs-patch added; ajax removed
  • Milestone changed from Awaiting Review to 3.1
  • Severity changed from normal to blocker

Adding a few more issues.

#2 @nacin
10 years ago

  • Priority changed from normal to highest omg bbq
  • Status changed from new to assigned

#3 @jane
10 years ago

Change default sort by chronology to be reversed by default (most recent first).

#4 @westi
10 years ago

  • Cc westi added

Also #15500

#5 @scribu
10 years ago

  1. On p=36220 comment screens, no need to sort by "in reply to" since they are all in reply to the same comment.

For clarity, the column is called "In response to" and I think it should simply not be shown at all.

#6 @scribu
10 years ago

It would be great if someone could take a look at http://core.trac.wordpress.org/ticket/14579#comment:158 as I don't have access to Internet Explorer.

#7 @scribu
10 years ago

(In [16588]) Make comment content column unsortable. See #15580

#8 @scribu
10 years ago

  • Description modified (diff)

#9 follow-up: @scribu
10 years ago

Date columns should first sort by DESC, not ASC.

Why?

#10 in reply to: ↑ 9 @nacin
10 years ago

Replying to scribu:

Date columns should first sort by DESC, not ASC.

Why?

Per Jane:

Change default sort by chronology to be reversed by default (most recent first).

This is the expected functionality. Oldest first is unintuitive.

#11 @scribu
10 years ago

Oldest first is unintuitive only if you're sorting by date, but there's only one date column.

When you're sorting by title, you don't expect to see the post with title Z first.

#12 @scribu
10 years ago

Ah, I now saw that it's only supposed to be applied for date columns. Sorry.

#13 follow-up: @scribu
10 years ago

(In [16593]) Make date columns first sort in descending order. See #15580

#14 @scribu
10 years ago

  • Description modified (diff)

#15 in reply to: ↑ 13 @nacin
10 years ago

Replying to scribu:

(In [16593]) Make date columns first sort in descending order. See #15580

Great work. :-)

#16 @scribu
10 years ago

(In [16594]) Update get_*_columns() method docs. See #15580

@scribu
10 years ago

Removes 'In Reply To' column. Doesn't work for inline editing & replying

#17 @voyagerfan5761
10 years ago

  • Cc WordPress@… added

#18 @scribu
10 years ago

(In [16602]) Make bottom admin pagination scroll to the top after rows are updated. See #15580

#19 @scribu
10 years ago

  • Description modified (diff)

#20 @ryan
10 years ago

What are the plans for hashes? Use one of the many jQuery plugins? Handroll?

@scribu
10 years ago

#21 @scribu
10 years ago

For hashes, I began rolling out a custom solution because I didn't really find any jQuery plugins that would help. jquery.query.js seems to be the only thing needed.

hashes.diff:

  • changing the rows changes the hash.
  • going to an url with a hash changes the rows. But, it doesn't change the ajaxified elements, like the page number etc.

#22 @ryan
10 years ago

Crazy notion: Support pushState()/popState() and forget hashes.

#23 @scribu
10 years ago

I thought the main reason for using hashes was to support bookmarking, not history.

#24 @ryan
10 years ago

Don't those update the URL in the location bar so that a proper link is shown?

#25 @scribu
10 years ago

That would be awesome. However, it's not supported in any current browser yet.

#26 @ryan
10 years ago

Yeah, popState support is pretty young.

#27 @ryan
10 years ago

Seems to work in Chrome and FF4 will support it. Very tempting to go modern, especially given what a hack hashes are. :-)

#28 @scribu
10 years ago

I'll play around with it in Chrome, then.

#29 @scribu
10 years ago

(In [16615]) Update URL when performing ajaxified action. See #15580

#30 @scribu
10 years ago

With pushState(), when the user presses the back button, only the URL is updated, so - just like with hashes, we would have to take care of updating the rows and the UI elements again.

So, I used replaceState() instead, which doesn't create a new history entry.

#31 @scribu
10 years ago

(In [16616]) Add missing quote char when creating overlay. See #14579. See #15580

#32 @scribu
10 years ago

(In [16617]) Get rid of in favor of . Fixes #15607. See #15580

#33 @scribu
10 years ago

Yeah, the commit message was supposed to read "Get rid of $mode in favor of $post_id".

$mode seems to be a relic (it could be either 'single' or 'detail'), possibly since to edit a single comment you used edit-comments.php too?

Anyway, I stopped using it in favor of just checking the $post_id.

#34 @nacin
10 years ago

The $mode global also applies to edit.php, how you have the excerpt view.

#35 @scribu
10 years ago

Sure, but I only stopped using it in the comments screen, because it had no effect there.

#36 follow-up: @scribu
10 years ago

From http://core.trac.wordpress.org/ticket/14579#comment:164:

I've noticed that when you sort by title in a list of hierarchical posts you loose the hierarchy indicators (which is what I would expect) but there seems to be no way to go back to the hierarchical listing without refreshing the entire page. Not having some way to revert could be confusing for people and while a page refresh will fix, that being the only way feels like it was just missed in the design process.

I considered a page refresh a good-enough method. However, that won't work since r16615: the sorting order will remain unchanged.

So, the only way to go back to the hierarchical order now is by clicking on the admin menu link again.

Under this circumstance, I think a UI element for going back to the hierarchical order would be useful.

#37 @nacin
10 years ago

A page refresh will also no longer clear search results: #15355.

#38 in reply to: ↑ 36 @mikeschinkel
10 years ago

Replying to scribu:

Under this circumstance, I think a UI element for going back to the hierarchical order would be useful.

+1

#39 @scribu
10 years ago

  • Keywords ui-feedback added

#40 @mikeschinkel
10 years ago

  • Cc mikeschinkel@… added

#41 @scribu
10 years ago

Aftermath: #15609

#42 @nacin
10 years ago

Strongly considering the need for an AJAX spinner. (See #15482.) Otherwise it seems like you get no real feedback on pagination, sorting, or searching.

#43 @scribu
10 years ago

  • Description modified (diff)
  • Keywords needs-ui added; ui-feedback removed
Note: See TracTickets for help on using tickets.