Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#34570 closed defect (bug) (fixed)

.below-h2 notices are moved to above the page title

Reported by: stephenharris's profile stephenharris Owned by: afercia's profile afercia
Milestone: 4.4 Priority: normal
Severity: normal Version: 4.4
Component: Administration Keywords: has-patch
Focuses: Cc:

Description (last modified by SergeyBiryukov)

If you create a notice with the .below-h2 class e.g.

<div class="updated below-h2">
   ...
</div>

then it is moved to above the title header. Previously notices with that class were kept inline. There is another class that could (should) be used instead: inline, but until [35238] support for .below-h2 continued.

With a view of not breaking plug-ins still using the .below-h2 class I'd like to suggest we re-instate it.

Attachments (1)

34570.diff (550 bytes) - added by stephenharris 9 years ago.
Do not move notices with .below-h2 above the page title

Download all attachments as: .zip

Change History (10)

@stephenharris
9 years ago

Do not move notices with .below-h2 above the page title

#1 @stephenharris
9 years ago

  • Keywords has-patch dev-feedback added

#2 @SergeyBiryukov
9 years ago

  • Description modified (diff)

#3 @SergeyBiryukov
9 years ago

  • Milestone changed from Awaiting Review to 4.4

#4 @SergeyBiryukov
9 years ago

  • Owner set to afercia
  • Status changed from new to assigned

#5 @afercia
9 years ago

  • Keywords reporter-feedback added; dev-feedback removed

@stephenharris can you please provide an example/plugin where this is happening? As far as I see, the below-h2 ones are never moved above the title, see screenshot. The class below-h2 is simply ignored now, all notices are moved below the title except the ones with a inline class. It's entirely possible I'm missing something though :)

https://cldup.com/57p7FbDuMJ.png

#6 @stephenharris
9 years ago

@afercia You are right, I meant immediately beneath the title. An example of this is https://wordpress.org/plugins/event-organiser. When editing a recurring event there is a
notice that appears within the metabox:

https://cldup.com/elgHjnAd9I.png

However trunk current moves this to the top of the page, under the screen title:

https://cldup.com/F-yOzRUIJs.png

This is particularly problematic as the notice has a checkbox inside of it, however it has now been moved outside of the <form>.

Of course .inline can (and should) be used instead, but until 4.4 .below-h2 also performed the same purpose, and the intention of this patch is to continue that behaviour. I wasn't aware that it was being removed (nor until now was I aware of .inline), and I'm sure I can't be the only one using it still.

#7 @afercia
9 years ago

  • Keywords reporter-feedback removed

@stephenharris thanks, I understand now :) Yep, I see the issue for notices intended to appear in the middle of the page. Maybe the best thing to do would be discourage someway the use of below-h2 in favor of inline but in the meanwhile yes there should be some back compatibility. Thanks!

This ticket was mentioned in Slack in #core-editor by afercia. View the logs.


9 years ago

#9 @afercia
9 years ago

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

In 35516:

Admin: Ensure notices with the below-h2 class are not repositioned after [35238].

Keeps the .below-h2 class for backwards compatibility with plugins that are (incorrectly) using it. Plugins should use .inline instead.

Props stephenharris.
Fixes #34570. See #34294.

Note: See TracTickets for help on using tickets.