Repository navigation
On This Day dashboard widget follow up - #14866
peterwilsoncc wants to merge 35 commits into
Conversation
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
| $( '#wp-on-this-day-posts-form form button' ).on( 'click.postboxes', function( event ) { | ||
| event.preventDefault(); | ||
| var enabled = '1' === $( this ).prop( 'value' ); | ||
|
|
||
| postboxes.setOnThisDayDisplay( enabled ); | ||
| postboxes.save_on_this_day_display( enabled ); | ||
| } ); |
There was a problem hiding this comment.
Is this better in another location?
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @joen. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
|
Co-authored-by: Weston Ruter <westonruter@gmail.com>
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Weston Ruter <westonruter@gmail.com>
|
@propsbot add Joen |
Co-authored-by: Weston Ruter <westonruter@gmail.com>
|
It works as expected. I just noticed two things Spacing at the bottom of the widgetThere is an extra space at the bottom of the widget that's unnecessary. I that that removing it with a last-child property is sufficient.
Zebra stripping in different heightsThe white and grey rows have different sizes (respectively, red and green in the screenshot). I see in Chrome's inspector there is a bottom margin of 6px that pushes the white rows higher.
As suggested in this comment in the trac ticket, it would be great to have the filter options. |
…ered_after_comments_are_deleted
|
Night brain figured out the cause of the extra line, I'll push some commits to fix it over the next few days. At present the opt-in form only displays on days which feature OTD posts. This is so turning the feature on results in a display. I can modify it to display placeholder text when a user toggle the display (and only when they toggle). Is that useful? |
Hours... not days. I guess I am still waking up. |
|
This looks good to me, event if I don't have a strong opinion about he opt-in/opt-out feature. Yes I read your previous comment before, but I'm not that convinced that we need to complexify the interface and the technical implementation that much. But I don't have strong feelings against the proposal, too 🤷 |
|
I've pushed some changes to fix the following:
|
@fcoveram Agreed but I think that can be a stretch goal post beta 2. I think it will add a lot more complexity to the widget. |





Makes the following changes to the On This Day dashboard widget:
wpprefix in a bunch of places (mainly IDs and classes)remove_filterwhere it's not needed, use theget_echo()helper.Trac ticket: https://core.trac.wordpress.org/ticket/65116
Use of AI Tools
get_echo()helper