Skip to content

RS Post Settings: Add editable status, password, and sticky fields#22670

Open
nbradbury wants to merge 12 commits intotrunkfrom
feature/rs-posts-status-password-sticky
Open

RS Post Settings: Add editable status, password, and sticky fields#22670
nbradbury wants to merge 12 commits intotrunkfrom
feature/rs-posts-status-password-sticky

Conversation

@nbradbury
Copy link
Contributor

@nbradbury nbradbury commented Mar 9, 2026

Summary

  • Add editable status, password, and sticky fields to the RS Post Settings screen
  • Status selection via single-choice dialog, password with visibility toggle, sticky with switch toggle
  • Save changes via wordpress-rs PostUpdateParams API with server error passthrough
  • Discard confirmation dialog when navigating back with unsaved changes
  • Post list auto-refreshes when returning from settings after a save
  • Edge-to-edge immersive UI with hidden status bar and floating back/save icons over hero image over scrim

Test plan

  • Open post settings, change status, verify dialog shows current status and saves correctly
  • Set a password, reopen dialog, verify it shows the current password
  • Toggle password visibility icon in the password dialog
  • Remove a password via the "Remove password" button
  • Toggle sticky on/off and verify the switch reflects the change
  • Make changes, tap back, verify discard confirmation dialog appears
  • Dismiss the discard dialog and verify changes are preserved
  • Confirm discard and verify the screen closes without saving
  • Save changes and verify the post list refreshes with updated data
  • Try saving a sticky post with a password and verify the server error is shown
Screen_recording_20260309_162203.mp4

nbradbury and others added 9 commits March 9, 2026 09:42
Adds the ability to edit post status (via dialog), password (via dialog),
and sticky toggle in the RS post settings screen. Includes save
functionality with network validation, discard confirmation dialog,
and floating save button.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Pre-populate password dialog with current value, add visibility toggle,
finish screen on successful save instead of reloading, and show server
error messages on save failure.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Finish the settings screen on successful save and return RESULT_OK
so the post list refreshes all initialized tabs to reflect changes.
Also show the server error message on save failure.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace floating back and save buttons with standard TopAppBar
navigation icon and action button for a more consistent UI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove the dark circle background from the floating back and save
buttons so they use standard Material icon styling while remaining
overlaid on the hero image.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Hide the status bar so the hero image and back/save icons extend
to the very top of the screen. The status bar can be temporarily
revealed with a swipe from the top edge.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use takeIf for edited field comparisons, collapse duplicate password
and slug rows, remove unused save_success string, condense createIntent
formatting, and clean up stray blank line in preview.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rename PostFetchException to PostApiException, remove unnecessary
WrongConstant suppression, unify back navigation through ViewModel,
and add dedicated discard dialog strings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dangermattic
Copy link
Collaborator

dangermattic commented Mar 9, 2026

2 Warnings
⚠️ This PR is larger than 300 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.
⚠️ PR is not assigned to a milestone.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Mar 9, 2026

App Icon📲 You can test the changes from this Pull Request in WordPress Android by scanning the QR code below to install the corresponding build.

App NameWordPress Android
Build TypeDebug
Versionpr22670-696d7d6
Build Number1486
Application IDorg.wordpress.android.prealpha
Commit696d7d6
Installation URL0j267vj8cto08
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Mar 9, 2026

App Icon📲 You can test the changes from this Pull Request in Jetpack Android by scanning the QR code below to install the corresponding build.

App NameJetpack Android
Build TypeDebug
Versionpr22670-696d7d6
Build Number1486
Application IDcom.jetpack.android.prealpha
Commit696d7d6
Installation URL4meq8q70scnp8
Note: Google Login is not supported on these builds.

nbradbury and others added 2 commits March 9, 2026 16:10
Extract savePost() from onSaveClicked() to fix LongMethod, reorder
SettingsRow modifier parameter to fix ModifierParameter lint, and
add gradient scrim behind floating icons for readability.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Prevents Android from showing saved password suggestions in the
post password dialog by setting IMPORTANT_FOR_AUTOFILL_NO_EXCLUDE_DESCENDANTS
on the view while the dialog is visible.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 9, 2026

@nbradbury nbradbury marked this pull request as ready for review March 9, 2026 20:55
@nbradbury nbradbury requested a review from adalpari March 9, 2026 20:55
@codecov
Copy link

codecov bot commented Mar 9, 2026

Codecov Report

❌ Patch coverage is 0% with 328 lines in your changes missing coverage. Please review.
✅ Project coverage is 37.92%. Comparing base (c38ca54) to head (696d7d6).

Files with missing lines Patch % Lines
...android/ui/postsrs/screens/PostRsSettingsScreen.kt 0.00% 230 Missing ⚠️
...ress/android/ui/postsrs/PostRsSettingsViewModel.kt 0.00% 81 Missing ⚠️
...dpress/android/ui/postsrs/PostRsSettingsUiState.kt 0.00% 13 Missing ⚠️
...ordpress/android/ui/postsrs/PostRsListViewModel.kt 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            trunk   #22670      +/-   ##
==========================================
- Coverage   38.01%   37.92%   -0.10%     
==========================================
  Files        2268     2268              
  Lines      116720   117000     +280     
  Branches    16180    16216      +36     
==========================================
  Hits        44376    44376              
- Misses      68707    68987     +280     
  Partials     3637     3637              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants