Make WordPress Core

Opened 7 years ago

Closed 6 years ago

#44037 closed defect (bug) (duplicate)

Cannot hide plugin description on responsive view

Reported by: subrataemfluence's profile subrataemfluence Owned by: afercia's profile afercia
Milestone: Priority: normal
Severity: normal Version: 5.1
Component: Administration Keywords: has-patch
Focuses: ui, administration Cc:

Description

Plugin description is not toggling by clicking Screen Options > Description on responsive view.

Steps for reproduction:

  1. Go to Plugin page
  2. Enter responsive view (Chrome: Shift+Ctrl+I, FireFox: Shift+Ctrl+M)
  3. Pull down Screen Options dialog by clicking on Screen Options button at top right corner
  4. Check / Uncheck Description checkbox
  5. Description visibility never toggles.

In both desktop and responsive views the markup stays the same:

<div class='plugin-description'><p>Plugin description here...</p></div>

Tested in Chrome and FireFox
OS: Ubuntu 14.04
WordPress version: 5.0-alpha-43205

Screenshot attached.

Attachments (1)

description-not-disappearing.png (17.6 KB) - added by subrataemfluence 7 years ago.

Download all attachments as: .zip

Change History (6)

#1 @guldoe
7 years ago

Good catch.

Yes, there is a conflict in styles when is mobile or tablet.

hidden css style that add a display:none is not working because we have a display:block in the response mode in the td to make full width.

#2 @subrataemfluence
7 years ago

  • Version set to trunk

File /wp-admin/js/common.js

checked : function(column) {
   $('.column-' + column).removeClass( 'hidden' );
   if( $('.column-' + column).children().length > 0 ) {
      $('.column-' + column).children().removeClass( 'hidden' );
   }
   this.colSpanChange(+1);
},
 
unchecked : function(column) {
   $('.column-' + column).addClass( 'hidden' );
   if( $('.column-' + column).children().length > 0 ) {
      $('.column-' + column).children().addClass( 'hidden' );
   }
   this.colSpanChange(-1);
 },

If I add $('.column-' + column).find('div')... things work client side in both desktop and responsive views. But the problem is present column visibility state is not retained!

#3 @afercia
6 years ago

  • Milestone changed from Awaiting Review to 5.1
  • Owner set to afercia
  • Status changed from new to assigned

Seems to me this is caused by two issues:

The Screen Options were hidden in the responsive view before 5.1 and they've been made visible in [42644]. Saving the visibility state is addressed in #46005.

Looks like in the Plugins screen the description was meant to be always visible on mobile. It was not possible to change its visibility via the Screen Options so I guess it was opted to make it always visible, thus the higher specificity selector with display: block.

Now that users can switch the visibility also on mobile, the CSS needs to take that into account. Will update the patch on #46005. When it's ready, some testing would be great.

#4 @afercia
6 years ago

  • Keywords has-patch added; needs-patch removed

#5 @peterwilsoncc
6 years ago

  • Milestone 5.1 deleted
  • Resolution set to duplicate
  • Status changed from assigned to closed

Closing as a duplicate of #46005 which covers the same issue for multiple list tables.

Note: See TracTickets for help on using tickets.