Opened 9 years ago
Closed 9 years ago
#34987 closed defect (bug) (fixed)
"Configure" link for dashboard widgets no longer displayed.
Reported by: | catchmyfame | Owned by: | swissspidy |
---|---|---|---|
Milestone: | 4.4.1 | Priority: | normal |
Severity: | normal | Version: | 4.4 |
Component: | Administration | Keywords: | has-patch has-screenshots commit fixed-major |
Focuses: | ui | Cc: |
Description
The "configure" links for dashboard widgets are now hidden by CSS. The HTML, which is generated automatically by wp_add_dashboard_widget when the $control_callback argument is provided is:
<span class="postbox-title-action"><a href="/wp-admin/index.php?edit=widget#" class="edit-box open-box">Configure</a></span>
The CSS being applied from:
wp-admin/load-styles.php?c=0&dir=ltr&load=dashicons,admin-bar,wp-admin,buttons,wp-auth-check&ver=4.4
Creates the rule online 7518:
.edit-box { display: none; }
Which hides the anchor element as it has
class="edit-box open-box"
Another issue is that even when the rule is removed, the "configure" link is no longer right justified.
Attachments (10)
Change History (32)
#1
@
9 years ago
- Component changed from Widgets to Administration
- Focuses administration removed
- Keywords needs-patch added
- Milestone changed from Awaiting Review to 4.4.1
#3
@
9 years ago
After I submitted this ticket I remembered that the configure link wasn't always visible and became visible on hover of the title. Thanks @swissspidy for updating that.
This ticket was mentioned in Slack in #core by afercia. View the logs.
9 years ago
#5
@
9 years ago
Refreshed patch to make the Configure link appear also when tabbing with the keyboard.
Side note: actually, there are 2 "Configure" link, we should probably completely hide the first one. Some testing would be nice :)
#6
@
9 years ago
After the discussion on Slack, 34987.4.patch is an updated patch that also removes the unneeded right: 33px;
rule. Successfully tested on Firefox, Chrome, Safari, Opera, Internet Explorer with both JS enabled and disabled. Tested with RTL and LTR.
What the patch does:
- Shows the Configure link again on
:hover
- Improves accessibility by also showing the link on
:focus
(usingopacity
instead ofdisplay: none
) - Hides the second Configure link that is inside the toggle button
- Fixes vertical alignment by not using absolute positioning but floats instead
This ticket was mentioned in Slack in #design by swissspidy. View the logs.
9 years ago
#11
in reply to:
↑ 10
@
9 years ago
- Keywords commit added; needs-testing removed
Replying to tywayne:
The vertically alignment of the Configure link doesn't look quite right to me - seems to sit lower than the other elements. Adjusting the line height on the
#dashboard-widgets .hndle .postbox-title-action
selector should fix it. Maybe atline-height: 1.2
?
You're right, after looking at it again I realized that the alignment is not ideal.
In 34987.5.patch I decided to not change absolute positioning to floats. So basically this patch just re-introduces the Configure link.
#13
@
9 years ago
@afercia Good point!
I guess under that circumstances 34987.4.patch makes more sense with a line-height of 1.2, as suggested by @tywayne.
Here's how a long title looks like when using floats:
Short title, using adjusted line-height:
#15
@
9 years ago
- Keywords commit added
Looks good to me. The only thing to be aware of is that opacity won't work in IE 8 (still supported in the admin) and the link would need proprietary filters and to have hasLayout
. The link is always visible in IE 8 and I'm perfectly fine with that.
The problem is not the
display: none
, but the incorrect line afterwards:h3:hover .edit-box
.It's now a
h2
(introduced in #33557), that's why it doesn't work anymore. We should change that to.hndle
(or.handle
, see #32017)