Make WordPress Core

Opened 6 years ago

Closed 5 years ago

#12365 closed defect (bug) (fixed)

Comments/Posts should deselect themselves when removed from the screen

Reported by: WardOnTheWeb Owned by: azaozz
Milestone: 3.0 Priority: low
Severity: minor Version: 2.9.2
Component: JavaScript Keywords:
Focuses: Cc:

Description (last modified by Denis-de-Bernardy)

When browsing posts and comments, using an action that hides this post or comment from a list should also ensure it:

  • unchecks its checkbox
  • disables its checkbox

Alternatively, it should trash the entire row so it's no longer there at all.

Originally was:


On the Edit Comments page, if you click the checkbox to select all comments, individually approve any number of comments by hand, and then perform the Mark As Spam bulk action, the previously approved comments are marked as spam as well. Ideally, these comments should be de-selected when they are removed from view.

Please let me know if you have any questions.

Best regards,
Stephen Ward

Change History (8)

comment:1 @Denis-de-Bernardy6 years ago

  • Component changed from General to UI
  • Milestone changed from Unassigned to Future Release
  • Type changed from defect (bug) to enhancement

this is the expected behavior. but there might be UI issues that need Jane's feedback.

comment:2 @dd326 years ago

  • Milestone changed from Future Release to 3.0
  • Type changed from enhancement to defect (bug)

To me, This is a bug.

You select a list of items, You perform an action on certain items, They're removed from view. You then perform an action based on what you believe is the selected set which you are looking at.

Deselecting them, would be the best method here, You shouldn't have to worry about a bulk action applying to a item you can no longer see.

comment:3 @jane6 years ago

I agree with Denis that this is expected behavior. If someone selects all, the anticipated workflow is to immediately choose a bulk action. If someone acts on something in the list before doing so, they should uncheck it manually before firing the bulk action. Auto-deselecting it, while I can see how it might seem like a safety net here, overrides the interrupted bulk action workflow. If the interruptive action and the bulk action are different than the ones in this example, then the auto-deselect might not make sense. For example, replying to a comment should not override the select all. The only action that should remove it from the list would be moving to Trash. That said, this is when you are on the Edit Comments (All) screen. If you had used a text filter to only view Pending comments, and you approved one mid-bulk action, then I would expect the approved comment to disappear and not be included in the action since it is no longer pending. However, the reporter does not indicate that he is referring to a filtered view such as this.

comment:4 @dd326 years ago

I can understand the current work flow, And that would make sense, If the comment remained visible on the page whilst selected.

Removing the object from sight implies that any actions applied to the selected list does not include those which have been removed.

How would trashing a comment make a difference here, Trashing it (From a UI perspective) is no different to approving it, You're moving it out of the currently selected group of items by applying an action to it.

If its intended that the item remain in the bulk-action, then the row should remain on the page, even if an action is applied to it manually.

comment:5 @dd326 years ago

My comment was directed at if you're on a Filtered comments page (For example, The list of Unapproved comments as i feel the reporter is), where the row is removed once the actions are applied.

In the case of the All page, where the row remains after applying a function, I'd expect the checkbox (and thus the bulk action) to still apply.

comment:6 @jane6 years ago

@dd32: then it sounds like we're agreeing on the behavior, and the only thing snagging us is what screen the reporter actually meant. Sicne he didn't mention a filtered view and he default view of edit-comments is the All view, I thought he meant that. But either way, we agree on the intended behavior for the All screen vs the filtered screens.

comment:7 @Denis-de-Bernardy6 years ago

  • Component changed from UI to JavaScript
  • Description modified (diff)
  • Owner set to azaozz
  • Summary changed from Approved Comments are Marked as Spam in Bulk Action to Comments/Posts should deselect themselves when removed from the screen

Changing the description, and moving this to JavaScript accordingly.

comment:8 @dd325 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [14143]) Uncheck rows on comments page when hiding rows so as to not affect it by Bulk edits. Fixes #12365

Note: See TracTickets for help on using tickets.