Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix an issue with posts shown embedded in the notifications popover #23889

Merged
merged 2 commits into from
Dec 13, 2024

Conversation

kean
Copy link
Contributor

@kean kean commented Dec 12, 2024

Fixes #23883. New behavior on iPad:

Simulator.Screen.Recording.-.iPad.Pro.11-inch.M4.-.2024-12-12.at.09.51.42.mp4

Reader will now also no longer lose the current navigation state when opening a deep link with a post.

To test:

Regression Notes

  1. Potential unintended areas of impact

  2. What I did to test those areas of impact (or what existing automated tests I relied on)

  3. 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.txt if 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)

@kean kean added the Reader label Dec 12, 2024
@kean kean added this to the 25.6 milestone Dec 12, 2024
@kean kean requested a review from crazytonyli December 12, 2024 15:00
@dangermattic
Copy link
Collaborator

1 Warning
⚠️ This PR is assigned to the milestone 25.6. 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 🚫 Danger

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Dec 12, 2024

WordPress Alpha📲 You can test the changes from this Pull Request in WordPress Alpha by scanning the QR code below to install the corresponding build.
App NameWordPress Alpha WordPress Alpha
ConfigurationRelease-Alpha
Build Numberpr23889-b0ecab1
Version25.5
Bundle IDorg.wordpress.alpha
Commitb0ecab1
App Center BuildWPiOS - One-Offs #11171
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Dec 12, 2024

Jetpack Alpha📲 You can test the changes from this Pull Request in Jetpack Alpha by scanning the QR code below to install the corresponding build.
App NameJetpack Alpha Jetpack Alpha
ConfigurationRelease-Alpha
Build Numberpr23889-b0ecab1
Version25.5
Bundle IDcom.jetpack.alpha
Commitb0ecab1
App Center Buildjetpack-installable-builds #10209
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

readerViewController.coordinator?.notificationID = note.notificationId
displayViewController(readerViewController)

if isSidebarModeEnabled && splitViewController == nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be a roundabout way to check if the notifications view controller is displayed in a popover.

Maybe it's more intuitive to check whether self.modalPresentationStyle or self.navigationController.modalPresentationStyle is popover?

Copy link
Contributor Author

@kean kean Dec 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but after a quick search I couldn't find a reliable way to check if something is displayed in a popover. I guess the modalPresentationStyle check could work in this case. I'm a bit reluctant to use it because it's only not a completely reliable indicator as on iPhone .popover is displayed in a sheet by default (obviously not the case here for this screen).

Btw, I'll try to remove isSidebarModeEnabled as well during these couple of weeks. It was added there as a temporary measure during the iPad rework and is a type of a feature flag.

@kean kean force-pushed the fix/post-shown-embedded-in-notifications branch from 4d9bb72 to b0ecab1 Compare December 13, 2024 13:31
@kean kean enabled auto-merge December 13, 2024 13:31
@kean kean added this pull request to the merge queue Dec 13, 2024
Merged via the queue into trunk with commit 1389f54 Dec 13, 2024
25 checks passed
@kean kean deleted the fix/post-shown-embedded-in-notifications branch December 13, 2024 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

iPad: Open posts in main navigation area when accessing them from the Notifications popover
4 participants