ClassicPress / ClassicPress-v2

NOT READY FOR PRODUCTION.
GNU General Public License v2.0
13 stars 4 forks source link

Make up/down buttons work again on dashboard and post screens #253

Closed KTS915 closed 11 months ago

KTS915 commented 11 months ago

This is a fix caused by the recent change from JavaScript-based widgets to use of the native HTML5 disclosure widget on the admin dashboard and post edit screens.

The buttons (represented by arrows) in the top right-hand corner of each widget had effectively been deactivated by those changes, and the appearance of the widgets on webkit-based browsers was sub-optimal. This PR corrects those issues by adding a new div within the summary element and then taking the buttons out of the h2 tag. It also adjusts the CSS accordingly.

mattyrob commented 11 months ago

Before and After images from a Post Edit page in Safari 17.0

Before:

Screenshot 2023-10-16 at 19 46 43

After:

Screenshot 2023-10-16 at 19 47 21

I didn't notice any visual changes in Firefox 118.0.2 or Chrome 117.0.5938.132 on Mac.

Looks good to me.

mattyrob commented 11 months ago

@KTS915 - in the original description above the up and down arrows are described as not working - is that just in Screen Reader use? Asking as in Safari they still move the meta boxes up and down for me. (I still agree that the appearance can be improved).

KTS915 commented 11 months ago

@mattyrob It depends on the browser. In Firefox on Linux they weren't working with a mouse click. The change ensures they work in every browser as well as improving the appearance in Safari.