Skip to content

Add News page with update announcements and migration improvements#598

Merged
akirk merged 2 commits intomainfrom
news-page
Mar 21, 2026
Merged

Add News page with update announcements and migration improvements#598
akirk merged 2 commits intomainfrom
news-page

Conversation

@akirk
Copy link
Copy Markdown
Owner

@akirk akirk commented Mar 20, 2026

Summary

Screenshot 2026-03-20 at 10 50 55
  • Adds a News/Welcome tab to the Friends admin that shows version announcements as a changelog with a fixed TOC sidebar. New users see "Welcome" as the tab label with the welcome entry first; existing users see "News" with the latest version first.
  • Shows an admin notice after upgrading to a new major version, linking to the News page. Visiting the page dismisses the notice permanently.
  • Adds news entries for versions 4.0, 3.3, 3.0, 2.4, 2.1, and 2.0 with user-facing feature highlights from CHANGELOG.md.
  • Adds migration dependency support: link_feeds_as_term_children now depends on convert_friend_users_to_subscriptions completing first.
  • Moves link_feeds_as_term_children from 4.1.0 to 4.0.0.
  • Fixes sanitize_usernames migration stuck as pending on alpha versions by giving it a proper status_option.

Test plan

  • Visit the Friends > News tab as an existing user — should show entries newest-first with 4.0 expanded
  • Click TOC items on the left to switch between entries
  • Set friends_welcome_version to 4.0 — admin notice should appear, clicking through should dismiss it
  • On the 4.0 entry, verify migration status table and "Migrations Overview" link work
  • Try running link_feeds_as_term_children before convert_friend_users_to_subscriptions completes — should show dependency error
  • On a fresh install (no subscriptions), tab should say "Welcome" with the welcome entry shown first
  • Test on narrow screens (<1200px) — TOC should collapse to horizontal row

WordPress Playground

https://playground.wordpress.net/#{%22steps%22:[{%22step%22:%22installPlugin%22,%22pluginData%22:{%22resource%22:%22git:directory%22,%22url%22:%22https://github.com/akirk/friends%22,%22ref%22:%22news-page%22,%22refType%22:%22branch%22},%22options%22:{%22activate%22:true}}]}

- Add a News/Welcome tab that shows version announcements as a changelog
  with a fixed TOC sidebar. New users see "Welcome", existing users see "News".
- Show an admin notice after upgrading to a new major version, linking to
  the News page. Visiting the page dismisses the notice permanently.
- Add news entries for versions 4.0, 3.3, 3.0, 2.4, 2.1, and 2.0 with
  user-facing feature highlights drawn from CHANGELOG.md.
- Add migration dependency support: link_feeds_as_term_children now
  depends on convert_friend_users_to_subscriptions completing first.
- Move link_feeds_as_term_children from 4.1.0 to 4.0.0.
- Fix sanitize_usernames migration stuck as pending on alpha versions
  by giving it a proper status_option.
@github-actions
Copy link
Copy Markdown
Contributor

Test this PR in WordPress Playground

You can test this pull request directly in WordPress Playground:

Launch WordPress Playground

This will install and activate the plugin with the changes from this PR.

The migration now runs during upgrade_plugin() for 4.0.0, so the
status option may already be set when the test runs. Clear it first.
@akirk akirk merged commit 40b406a into main Mar 21, 2026
25 checks passed
@akirk akirk deleted the news-page branch March 21, 2026 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant