feat: Active/Completed tabs on My Log page (v3.4.0)
Replaces the two stacked sections (Active above, Completed below) on the main Logbook page with a single-pane WP-admin tabbed view using the native subsubsub pattern (same as Posts/Comments/Plugins). - Two tabs: Active (N) | Completed (M) with live counts - URL-driven state via ?tab=active|completed; bookmarkable, refresh-stable, back-button works, invalid values fall back to Active server-side via whitelist + sanitize_key - No JavaScript — each tab is a hyperlink built with add_query_arg - WP-admin core CSS handles .subsubsub + .current; only a small margin block added in wp-notes-styles.php - Single-pane render: only the selected tab's section is in the DOM, so no flash-of-wrong-content - "Add a Note" form stays visible on both tabs for UI consistency Flagged in the 2026-05-25 UX audit as the highest-payoff next move (Tier 3 item #7). When the v4 timer/time_logged field ships, the structure can extend to 3 tabs (TODO/IN PROGRESS/Completed) in the same place; without it, an IN PROGRESS tab would always be empty, so v3.4.0 ships the 2-tab version matching the current data model. Storage model unchanged — Active and Completed remain in their separate options (wp_notes, wp_done_notes). The wp_notes_display_notes($type) function is unchanged. MINOR bump: new feature, no breaking changes.
This commit is contained in:
@@ -198,6 +198,14 @@ function wp_notes_admin_styles() {
|
||||
color: #3c763d;
|
||||
}
|
||||
|
||||
/* v3.4.0 — Active/Completed tab strip on the My Log page.
|
||||
WP-admin core already styles .subsubsub and .current;
|
||||
we only need to add breathing room above + below. */
|
||||
.wp-notes-page .subsubsub,
|
||||
.wrap > .subsubsub {
|
||||
margin: 12px 0 18px;
|
||||
}
|
||||
|
||||
/* Responsive Design */
|
||||
@media screen and (max-width: 782px) {
|
||||
.wp-notes-formatting {
|
||||
|
||||
Reference in New Issue
Block a user