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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reading Preferences: Fix sizing issues for post detail and web-based comments #22939

Merged
merged 2 commits into from
Apr 3, 2024

Conversation

dvdchr
Copy link
Contributor

@dvdchr dvdchr commented Apr 2, 2024

Part of #22925
Depends on #22938

This PR fixes the sizing issue for the header view, post webview, and comment webview in Reader Detail. This should also resolve sizing issues raised in #22851 (review) and potentially #21797.

  • For the header view in Reader Detail, since it's built-in SwiftUI, I've found that there aren't any reliable "hooks" to detect the correct content size. Therefore, I've added a GeometryReader to report for content size changes.
  • For the Post and Comment webviews, since ReaderDisplaySetting makes use of the web view's zoom level to increase the content scale, we'd also need to manually calculate the scale after getting the web view's height since it looks like the scrollHeight property does not take zoom level into account.

To test

  • Launch the Jetpack app.
  • Ensure that the Reader Customization flag is turned on.
  • Navigate to the Reader.
  • Open any post. Preferably one that has at least 1 comment.
  • If you have customized settings, please reset the font and size settings to the default option: Sans for font and Normal for size (right in the middle).
  • Open the customization sheet, select 'Mono' font, and move the slider to the rightmost position. Then tap 'Done'.
  • 馃攷 Verify that:
    • The header view is correctly resized.
    • The Post webview is correctly resized.
    • The Comment webview is correctly resized.

Regression Notes

  1. Potential unintended areas of impact
    Should be none. While the web view calculations take ReaderDisplaySetting's scale into account, when the flag is off, the display setting is set to .standard, which has a scale value of 1.0.

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

  3. What automated tests I added (or what prevented me from doing so)
    N/A.

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鈥檛 complete, formatting should still respect the right-to-left layout)
  • iPhone and iPad.
  • Multi-tasking: Split view and Slide over. (iPad)

@dvdchr dvdchr added [Type] Enhancement Reader Part of a WIP Feature This label is used to disable milestone checks for PRs that are not against `develop` or `release`. labels Apr 2, 2024
@dvdchr dvdchr added this to the 24.6 鉂勶笍 milestone Apr 2, 2024
@dvdchr dvdchr requested a review from wargcm April 2, 2024 17:12
@dvdchr dvdchr self-assigned this Apr 2, 2024
@dvdchr dvdchr mentioned this pull request Apr 2, 2024
11 tasks
@dangermattic
Copy link
Collaborator

1 Warning
鈿狅笍 View files have been modified, but no screenshot or video is included in the pull request. Consider adding some for clarity.

Generated by 馃毇 Danger

@wpmobilebot
Copy link
Contributor

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 Numberpr22939-c559d30
Version24.5
Bundle IDorg.wordpress.alpha
Commitc559d30
App Center BuildWPiOS - One-Offs #9351
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@wpmobilebot
Copy link
Contributor

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 Numberpr22939-c559d30
Version24.5
Bundle IDcom.jetpack.alpha
Commitc559d30
App Center Buildjetpack-installable-builds #8395
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

Copy link
Contributor

@wargcm wargcm left a comment

Choose a reason for hiding this comment

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

LGTM, nice work! 馃帀

Base automatically changed from issue/22925-reader-detail-bar-polish to release/24.6 April 3, 2024 06:29
@dvdchr dvdchr merged commit ad836bf into release/24.6 Apr 3, 2024
25 of 30 checks passed
@dvdchr dvdchr deleted the issue/22925-fix-sizing-issues branch April 3, 2024 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Part of a WIP Feature This label is used to disable milestone checks for PRs that are not against `develop` or `release`. Reader [Type] Enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants