Fix Site Switcher screen not dismissing after adding self-hosted site
Fixes #24091
The Site Switcher screen wasn't being dismissed automatically after successfully adding a self-hosted site. This PR adds proper handling of the WPSigninDidFinishNotification notification to ensure the screen is dismissed when authentication completes.
Testing Instructions
- Log in with a wp.com account
- Open Site Switcher
- Add a self-hosted site
- Verify that after successful authentication, the Site Switcher screen is dismissed automatically.
Screen recording
Regression Notes
-
Potential unintended areas of impact
-
What I did to test those areas of impact (or what existing automated tests I relied on)
-
What automated tests I added (or what prevented me from doing so)
PR submission checklist:
- [ ] I have completed the Regression Notes.
- [ ] I have considered adding unit tests for my changes.
- [ ] I have considered adding accessibility improvements for my changes.
- [ ] I have considered if this change warrants user-facing release notes and have added them to
RELEASE-NOTES.txtif necessary.
Testing checklist:
- [ ] WordPress.com sites and self-hosted Jetpack sites.
- [ ] Portrait and landscape orientations.
- [ ] Light and dark modes.
- [ ] Fonts: Larger, smaller and bold text.
- [ ] High contrast.
- [ ] VoiceOver.
- [ ] Languages with large words or with letters/accents not frequently used in English.
- [ ] Right-to-left languages. (Even if translation isn’t complete, formatting should still respect the right-to-left layout)
- [ ] iPhone and iPad.
- [ ] Multi-tasking: Split view and Slide over. (iPad)
| 1 Warning | |
|---|---|
| :warning: | This PR is assigned to the milestone 26.0. The due date for this milestone has already passed. Please assign it to a milestone with a later deadline or check whether the release for this milestone has already been finished. |
Generated by :no_entry_sign: Danger
📲 You can test the changes from this Pull Request in WordPress Alpha by scanning the QR code below to install the corresponding build.
| App Name | WordPress Alpha |
|
| Configuration | Release-Alpha | |
| Build Number | pr24273-27fc699 | |
| Version | 25.8 | |
| Bundle ID | org.wordpress.alpha | |
| Commit | 27fc699eb6a82bae11a8fadc04cefd53447d58b6 | |
| App Center Build | WPiOS - One-Offs #11856 |
📲 You can test the changes from this Pull Request in Jetpack Alpha by scanning the QR code below to install the corresponding build.
| App Name | Jetpack Alpha |
|
| Configuration | Release-Alpha | |
| Build Number | pr24273-27fc699 | |
| Version | 25.8 | |
| Bundle ID | com.jetpack.alpha | |
| Commit | 27fc699eb6a82bae11a8fadc04cefd53447d58b6 | |
| App Center Build | jetpack-installable-builds #10879 |
📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
| App Name | Jetpack | |
| Configuration | Release-Alpha | |
| Build Number | 26857 | |
| Version | PR #24273 | |
| Bundle ID | com.jetpack.alpha | |
| Commit | 7495f7b5e86ff164159b7448927aaf11be8275a3 | |
| Installation URL | 1gc2l0fdnr18g |
📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
| App Name | WordPress | |
| Configuration | Release-Alpha | |
| Build Number | 26857 | |
| Version | PR #24273 | |
| Bundle ID | org.wordpress.alpha | |
| Commit | 7495f7b5e86ff164159b7448927aaf11be8275a3 | |
| Installation URL | 0tvf8rpk2gc68 |
Version 25.9 has now entered code-freeze, so the milestone of this PR has been updated to 26.0.
Will revisit this later with a potentially different solution that wouldn't require the observer at this level.