#37510 closed enhancement (fixed)
Shiny Updates: consider to improve the bulk update failure notices
Reported by: | afercia | Owned by: | jorbin |
---|---|---|---|
Milestone: | 4.6 | Priority: | normal |
Severity: | normal | Version: | 4.6 |
Component: | Plugins | Keywords: | has-screenshots has-patch commit i18n-change |
Focuses: | ui, accessibility, javascript | Cc: |
Description
When bulk-updating plugins and there's some failure in the update process, Shiny Updates displays a notice on top of the screen:
Users can use bulk update also to update just one plugin. In this case, the error message could be improved a bit:
To reproduce a failure message:
- select one or more plugins to update
- disconnect from the internet
- select "Update" from the Bulk Actions
- press "Apply" and wait for a few seconds
Also, since the "1 failure" is a button that expands a panel with the error details, it should use an aria-expanded
attribute to be dynamically toggled to give assistive technologies users some feedback about what's happening on the screen.
Attachments (9)
Change History (30)
#2
in reply to:
↑ 1
@
8 years ago
Replying to swissspidy:
Unfortunately I don't have much time at the moment, but it would be great if we could fix this in 4.6
I tried to fix this. As per @afercia suggestion, added aria-expanded attribute.
I am tester so not much good in coding. May be this needs improvement.
I have added toggle arrow, so by this user can know what's happening on the screen.
#4
@
8 years ago
@juhise
Seems you missed the case when more than one failure appears. I have added this case in your code.
Thanks
#6
@
8 years ago
@juhise @Ankit K Gupta thanks very much the approach looks good. I'd recommend a few things:
- the
%s failure
(singular and plural) string should be improved a bit; to keep it simple, maybe there's no need to distinguish between plugins and themes - this should be translatable:
<span class="screen-reader-text">Toggle panel: Failure Notice</span>
- the patch should use some coding standards, mainly about braces and spaces; also, WordPress uses tabs for indentation and not spaces, this has probbly something to do with some settings in the editor you're using
- the if/else to toggle the
aria-expanded
value maybe could be avoided and use just the value of$bulkActionNotice.find( 'ul' ).hasClass( 'hidden' )
which already returns true or false - jQuery optimisation: instead of getting the same elements multiple times, I'd get them once and store them in a variable for later reuse
#10
in reply to:
↑ 1
@
8 years ago
Replying to swissspidy:
Unfortunately I don't have much time at the moment, but it would be great if we could fix this in 4.6
@swissspidy
Are we not going to fix this in 4.6?
This ticket was mentioned in Slack in #feature-shinyupdates by swissspidy. View the logs.
8 years ago
#12
@
8 years ago
- Keywords commit added; needs-testing removed
Refreshed a bit the patch, looks good to me.
- changed the "failure/s" strings
- added a couple CSS classes to make things easier
- removed a few unnecessary things
In updates.js
the patch removes also some tab characters (my editor does that automatically) probably previous developments leftovers, so there will be 5 lines with unrelated changes.
If it's going to make it in 4.6, then it should have the i18n-change
keyword.
This ticket was mentioned in Slack in #feature-shinyupdates by afercia. View the logs.
8 years ago
#14
@
8 years ago
- Owner set to ocean90
- Status changed from new to assigned
I've updated the patch to use a class and target it for the css. I kept the 'Toggle panel: Failure Notice' string as we use a similar string already in https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes/template.php#L1039
#15
follow-up:
↓ 16
@
8 years ago
- Keywords shiny-updates commit removed
37510.diff doesn't work because there is no such CSS class, 37510.3.patch works as expected.
I kept the 'Toggle panel: Failure Notice' string as we use a similar string already
Yep, but "toggle" and "panel" are words which are not easy translatable in some languages. Can we use "Show more details"?
#16
in reply to:
↑ 15
@
8 years ago
Replying to ocean90:
37510.diff doesn't work because there is no such CSS class
Looking, I guess it just needs {{ data.className }}
to be added in the template.
"toggle" and "panel" are words which are not easy translatable in some languages. Can we use "Show more details"?
"Toggle" is handy because, for example, you don't need to dynamically update "Show details" in "Hide details" and vice-versa but yeah it's difficult to translate in many languages, Italian too. Considering the whole string, and how it gets announced by screen readers thanks to the aria-expanded
attribute, I'd say it's OK. See screenshots below:
#19
@
8 years ago
- Owner changed from ocean90 to jorbin
- Status changed from assigned to reviewing
37510.2.diff looks good to me. @jorbin, what you you think?
Bulk updates were improved in Shiny Updates V2, so clearly a regression in trunk. The second screenshot indeed looks odd.
Unfortunately I don't have much time at the moment, but it would be great if we could fix this in 4.6