Commit Graph

8 Commits

Author SHA1 Message Date
ranger c773a21c25 fix: stop the duplicate "Create a New WP Note" form rendering at the bottom of My Notes
WordPress registers BOTH the parent menu's callback AND a submenu's
callback against the same page hook when they share a menu_slug, and
runs both in registration order. The My Notes submenu was passing
wp_notes_create_page as its callback (a separate bare-form renderer
used by the Tools-menu shortcut), so its output was being appended
below the main page content — appearing as a duplicate "Create a
New WP Note" form at the bottom of the My Notes page.

The submenu now passes an empty string as the callback — the
standard WP pattern when a submenu just relabels the parent (same
slug, same target page). Only the parent's wp_notes_page_callback
renders now.

The wp_notes_create_page function is unchanged and still serves
the Tools → My Notes shortcut at ?page=wp-notes-create.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-25 07:54:54 +01:00
ranger 71df974a93 ux: make the "No notes found" empty-state notice dismissible
The inline notice on the My Notes page rendered with class="notice
notice-info" but no is-dismissible modifier, so WordPress's core
common.js never attached an X close button. Users had no way to
clear the empty-state message for the current view.

Audited every notice the plugin emits while I was in there — the
migration notice and the settings_errors() calls were already
correctly dismissible AND only fired in their intended state. The
empty-state notice was the only laggard. All four notice paths now
share the same contract: dismissible by the user, AND only rendered
when the underlying state warrants it.

Dismissal is per-page-load (WP core's default behavior — clicking X
hides the element for the current view only). Cross-page-load
persistence would need user_meta or a transient and isn't built
yet; flagged in the changelog for a future enhancement.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-25 07:51:39 +01:00
ranger 3f881b01ca ux: remove duplicate smiley-face button on the emoji picker
The "Add emoji" formatting option rendered two clickable elements
stacked: the "Click to add emoji" text input AND a separate button
beside it with a smiley-face dashicon. Both opened the same dropdown
picker — visually duplicated and slightly confusing for users who
expected one or the other to be the trigger.

The button is gone. Clicking the input itself still opens the
picker (the existing JS already wired both .emoji-picker-button and
.emoji-input to the same click handler — the click handler now just
targets .emoji-input). Keyboard navigation (Enter/Space to toggle,
Escape to close) refocuses the input instead of the removed button.

Orphaned .emoji-picker-button CSS rule deleted.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-25 07:49:09 +01:00
ranger b34d2d8f70 ux: rename "Create WP Note" → "My Notes" and "About WP Notes" → "About"
The "Create WP Note" submenu was misleadingly narrow — that page is
the central dashboard (create form + active list + completed list +
edit + restore). Renamed to "My Notes" to match the WP-native
"Posts → All Posts" pattern and reflect that users land there for
everything, not just creation.

"About WP Notes" → "About": the WP Notes brand is already carried by
the parent menu, so the submenu can be plain-spoken.

CHANGES
- wp-notes.php: WP Notes submenu "Create WP Note" → "My Notes"
- wp-notes.php: Tools menu shortcut "Create WP Note" → "My Notes"
  (same target page)
- wp-notes.php: WP Notes submenu "About WP Notes" → "About"
- wp-notes.php: callback docblock updated to reflect new name
- inc/wp-notes-about.php: page H1 trimmed to match the Tier-1 style
  on the main page (h1 "About" + version chip + wp-header-end hr),
  replacing the previous "Welcome to WP Notes About Page v3.0.2"
- inc/wp-notes-about.php: removed a redundant nested
  <div id="header"> with display:none that was dead markup leftover
  from an older layout

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-25 07:44:04 +01:00
ranger 868911dfa6 ux: move banner from Create-Note page to About page (side-by-side intro)
The banner image was the first thing under the page title on the
Create-Note page — taking significant vertical space before the user
saw the textarea. The Create-Note page is for *doing*, not for
*reading-about*.

CHANGES
- Banner removed from wp_notes_page_callback() — Create-Note page
  now opens straight into the form.
- Banner added to the top of the About page in a new side-by-side
  row: image on the left capped at 320px wide (not full-bleed), and
  a short intro paragraph + "Go to WP Notes →" CTA on the right.
  Stacks vertically on narrow screens via flex-wrap.
- The side-by-side block lives in its own .wp-notes-about-intro
  container so it doesn't tangle with the rest of the About page's
  pre-existing nested toggles (those are still on the Tier 2 list).
- .wp-notes-header-banner / .wp-notes-banner-img CSS removed from
  wp-notes-styles.php — no longer referenced anywhere.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-25 07:41:09 +01:00
ranger 930e605b2d ux: Tier 1 cleanup of wp_notes_page_callback — single H1, collapse triple welcome surfaces, footer support link
Single-pass UX cleanup of the main WP Notes admin page. Functionality
unchanged; the page is shorter, has one H1, and stops contradicting
itself.

CHANGES
- Single H1 on the page (was five different H1s).
- Welcome/about content collapsed from THREE on-page surfaces (top
  dismissible notice + nested toggle + Show/Close button row) to one
  single description line linking to the dedicated About page where
  the long copy already lives.
- Two duplicate "Toggle Welcome Section" buttons with the SAME label
  but different targets — both removed.
- Embedded "What's New v3.0.0" changelog block deleted: it was
  hard-coded to v3.0.0 while the plugin reports v3.0.2. The real
  history is in CHANGELOG.md.
- "Buy me a coffee" button moved from page header to page footer —
  promo shouldn't be the first thing under the page title.
- Invalid HTML cleaned up (li outside ul, p wrapping div/ul) by way
  of removing the welcome blob that contained it.
- Dead bulk-action UI removed: per-row checkboxes and "Select all"
  header in both wp_notes_display_notes() and wp_notes_list_table()
  rendered but nothing acted on the selection. Removed with inline
  comments marking the spot for when real bulk-actions land. Edit
  form colspan adjusted to match the new column count.
- ~80 lines of inline style+script for the about-box dismissal
  removed (localStorage tracking, show/hide handlers, two style
  blocks). WordPress's notice notice-info is-dismissible + user-meta
  is the right path if a banner needs to return.
- toggleSection() JS helper removed (no toggles remain).
- Small CSS additions to inc/wp-notes-styles.php for the header
  banner and footer-support link.

ALSO FIXED
- PHP 8.2 deprecation: ${size}px → {$size}px in the dashboard
  list-table render. ${var} interpolation is deprecated since 8.2
  and will hard-error in 9.0.

NET DIFF: wp-notes.php -213 lines, total -111 lines across 4 files
(plus a new CHANGELOG entry). Storage model unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-25 07:37:07 +01:00
ranger 05d8ad52ad fix: hide unused wp_note CPT from admin UI to stop "Add New Note" misroute
The plugin registered a wp_note CPT with show_ui=true and show_in_menu=
'wp-notes', which caused WordPress to auto-inject "All Notes" and
"Add New" submenus under the WP Notes admin menu. The "Add New"
submenu routed to post-new.php?post_type=wp_note — the standard WP
post editor — but the live plugin stores notes in wp_options
(get_option('wp_notes')), not as CPT posts. Anyone clicking that
submenu ended up writing to the wrong storage and their note never
appeared in the WP Notes list.

Fix: show_ui and show_in_menu set to false on the wp_note CPT, and
show_ui / show_admin_column / show_in_rest set to false on the
wp_note_category taxonomy. The CPT/taxonomy remain registered so the
wp_notes_migrate_to_cpt() helper can still call wp_insert_post() —
just no admin UI side-effects until the migration is completed and
the live storage swaps over.

Also adds CHANGELOG.md in Keep-a-Changelog format with the
[Unreleased] entry for this fix and a 3.0.2 baseline note for the
"trimmed from v1.1.5 feature-creep" lineage.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-25 07:26:04 +01:00
ranger 433de27d9b chore: archive A-WP-Notes v3.0.2 — minimalist parallel fork
Imports the v3.0.2 line of A-WP-Notes as it existed on M5 at:
  Local Sites/wordpress/public/wp-content/plugins/a-wp-notes/

This is a deliberately minimal parallel fork of the plugin, distinct
from the v1.2.0 line in ranger/a-wp-notes. It carries only the core
note-taking functionality:

  wp-notes.php                       — plugin bootstrap + admin UI
  inc/wp-notes-display.php           — note rendering
  inc/wp-notes-about.php             — About page
  inc/wp-notes-feedback.php          — feedback module
  inc/wp-notes-styles.php            — style enqueues
  inc/wp-notes-updater.php           — self-hosted updater stub
  inc/admin-bar.php                  — admin bar integration
  js/wp-notes-feedback.js            — feedback front-end
  js/Chart.js                        — charting (bundled)
  assets/wp-notes-banner.jpg         — plugin banner

The AI ecosystem (chat, personalities, MCP), speed-test system, OS info
pages, and the bulk of the v1.2.0 / v2.0.x feature surface are
intentionally absent — this fork was created by copying the plugin to a
second WP install and trimming back to a lighter baseline.

Archived for comparison and parallel-line testing. No further development
is planned on this line; the active line continues at v1.2.0 in
ranger/a-wp-notes.
2026-05-22 16:43:03 +01:00