Skip to content

Clean up edit-friend UI: add username field, remove legacy roles#629

Merged
akirk merged 2 commits intomainfrom
fix/remove-friend-request-links-add-username-edit
Mar 27, 2026
Merged

Clean up edit-friend UI: add username field, remove legacy roles#629
akirk merged 2 commits intomainfrom
fix/remove-friend-request-links-add-username-edit

Conversation

@akirk
Copy link
Copy Markdown
Owner

@akirk akirk commented Mar 27, 2026

Summary

  • Remove dead friend request / acquaintance role-switching links from the edit-friend template (these roles were removed in 4.0)
  • Add an editable Username field so subscription usernames can be renamed
  • Add Subscription::update_user_login() to rename the underlying taxonomy term
  • Fix redirect after save to always point to the correct edit page (handles renames)
  • Remove redundant "Type: Virtual User" and "Status: Subscription" rows from edit-friend page, move "Created" to bottom
  • Remove role name chip from the frontend author header (always showed "Subscription")

Test plan

  • Edit a subscription and verify the new Username field appears
  • Change a subscription's username and save — verify it persists and the page redirects correctly
  • Try renaming to an already-taken username — verify it doesn't overwrite
  • Confirm the old "Send Friend Request" / "Accept Friend Request" / role-switching links no longer appear
  • Verify "Type" and "Status" rows are gone from the edit page, and "Created" appears at the bottom
  • Verify the frontend author header no longer shows a "Subscription" chip

Test in WordPress Playground

akirk added 2 commits March 27, 2026 20:09
Remove dead friend request / acquaintance role-switching UI from the
edit-friend template since friendships were removed in 4.0. Replace
with an editable username field, and add Subscription::update_user_login()
to rename the underlying taxonomy term. The redirect after save now
always points to the (potentially renamed) user's edit page.
@akirk akirk changed the title Replace legacy friend request links with editable username field Clean up edit-friend UI: add username field, remove legacy roles Mar 27, 2026
@akirk akirk merged commit 23436ea into main Mar 27, 2026
25 checks passed
@akirk akirk deleted the fix/remove-friend-request-links-add-username-edit branch March 27, 2026 20:46
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