[wp-trac] [WordPress Trac] #35862: Comments screen: audit all the background color animations

WordPress Trac noreply at wordpress.org
Thu Feb 18 17:26:15 UTC 2016


#35862: Comments screen: audit all the background color animations
----------------------------+-----------------------------------------
 Reporter:  afercia         |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Comments        |    Version:  3.8
 Severity:  normal          |   Keywords:  has-screenshots needs-patch
  Focuses:  ui, javascript  |
----------------------------+-----------------------------------------
 Noticed some weird behavior, to reproduce: go in the Comments screen (in
 the "All" view), and mark as spam or move to the trash an '''approved'''
 comment. The comment row background will quickly "flash" to red and then
 the comment row will disappear.

 Do the same on an '''unapproved''' comment: no red flash.

 There are also other cases where this happens, seems all related to
 pending comments. By the way, the JavaScript animations still run and the
 background is animated behind the scenes. It just can't be seen because
 the pending comment row background color is now set on the `th` and `td`
 elements that hide the change on the `tr` background. Looks like this
 JavaScript part wasn't updated after the CSS changes in WordPress 3.8.

 There are also other old things that missed to be updated, for example at
 some point JavaScript still uses `#FFFFE0`. This was the background color
 used for unapproved comments in WordPress 3.7 but they use `#FEF7F1` since
 3.8.

 I'd propose two options:
 1. Fix the animations :)
 2. Get rid of them. Apparently, not so many users have complained about
 the (partial) lack of color animations in the last 2 years

 I'd lean toward the second option. There are several lines of JavaScript
 in `edit-comments.js` and `wp-lists.js` that could be removed, they are
 hard to maintain and being a bit old code they also violate the separation
 of structure, presentation and behavior principle. Yes, the JS could be
 refactored and maybe use a more modern approach but for, I'd say, a very
 little benefit.

 So before any patch attempt, this would need a decision. Any thoughts more
 than welcome.

 In the screenshot below, the red flash on pending comments, how it used to
 be on WordPress 3.7

 [[Image(https://cldup.com/Ml9laEw1jQ.png)]]

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35862>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list