#34295 closed enhancement (fixed)
"Apply" button for screen options isn't just for the per-page setting
Reported by: | helen | Owned by: | helen |
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Administration | Keywords: | has-patch has-screenshots |
Focuses: | ui | Cc: |
Description
The "Apply" button for screen options is output inside WP_Screen::render_per_page_options()
and is displayed next to the per-page setting. By default right now this makes sense, as all other core screen options update via Ajax or are links (problematic in itself). However, there is a screen_settings
filter that displays below the per page options, which are not always shown. Plugins that use this filter either also update via Ajax, piggyback onto the per-page's apply button, or add their own.
This makes adding other non-Ajax screen options not very pleasant for developers or users, both for plugins and when looking at them in core, such as in #22222.
Additionally, the button is secondary, when it's really your primary action and takes you away from the page. Related: #23738
Attachments (1)
Change History (8)
#2
@
9 years ago
- Keywords has-patch has-screenshots added
- Milestone changed from Awaiting Review to 4.4
#3
@
9 years ago
And thanks to @afercia, here are a couple screenshots with plugins, one that uses the submit button and one that applies the changes live. The results are very good - except for the UX issue of the mixed saving contexts (which I suspect is a bit of a rabbit hole, and exists now in mostly worse ways), I think we can roll with this and document this filter in a Make/Core guide post about various button changes.
#4
@
9 years ago
- Owner set to helen
- Resolution set to fixed
- Status changed from new to closed
In 35161:
#5
@
9 years ago
Derp, failed to mention in the commit that the button will continue to only show by default when the per-page option is there, but is on its own line and can be turned on by plugins by using add_filter( 'screen_options_show_submit', '__return_true' )
.
#6
@
9 years ago
Want to mention that I just accidentally clicked on the "Apply" button after changing a column setting… ¯\_(ツ)_/¯
My inclination would be to put Apply on its own line and make it a primary button. There are, however, some issues with this:
I *think* we could do something a little funky here around filtering whether to show the button, defaulting it to off and turning it on in some of our own render methods. Not sure what to do about the UX trickiness of the last point, though.