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

Site Monitoring: Implement WebKit-based Metrics view #22499

Merged
merged 3 commits into from
Feb 1, 2024

Conversation

kean
Copy link
Contributor

@kean kean commented Jan 29, 2024

Reimplement Metrics view using WebKitViewController.

Out of all the WKWebView wrappers in the app, I found the WebKitViewController works best for our use case. There are also WPWebViewController and BlazeViewController, but the former missed custom user agent, and the latter is Blaze-specific, at least in the name.

To test:

  • Uninstall the app or logout
  • Log in and select an Atomic site
  • Verify the Metrics are loading

Note: I noticed an (existing) performance issue with web views – will investigate it later if time allows.

Known Issues: No dark mode or dynamic type support.

Simulator Screenshot - iPad (10th generation) - 2024-01-29 at 13 19 57

Regression Notes

  1. Potential unintended areas of impact: Site Monitoring
  2. What I did to test those areas of impact (or what existing automated tests I relied on): manual
  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.

UI Changes testing checklist:

  • 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 this to the 24.2 milestone Jan 29, 2024
@kean kean requested a review from momo-ozawa January 29, 2024 22:41
@kean kean force-pushed the task/add-metrics-webview-2 branch from 28fc812 to e73bd95 Compare January 29, 2024 22:41
@wpmobilebot
Copy link
Contributor

wpmobilebot commented Jan 29, 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 Numberpr22499-b938aa7
Version24.1
Bundle IDorg.wordpress.alpha
Commitb938aa7
App Center BuildWPiOS - One-Offs #8629
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 Jan 29, 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 Numberpr22499-b938aa7
Version24.1
Bundle IDcom.jetpack.alpha
Commitb938aa7
App Center Buildjetpack-installable-builds #7656
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@kean kean changed the title Implement WebKit-based Metrics view Site Monitoring: Implement WebKit-based Metrics view Jan 29, 2024
Base automatically changed from task/add-metrics-webview to trunk January 30, 2024 10:07
Copy link
Contributor

@momo-ozawa momo-ozawa left a comment

Choose a reason for hiding this comment

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

When I force quit then reopen the app, I have to login again to see the metrics webview.

Also, feel free to delete WebView.swift, as it's no longer needed. Thanks for implementing WebKitView 🙇‍♀️

@kean kean force-pushed the task/add-metrics-webview-2 branch from e73bd95 to 08279b9 Compare January 30, 2024 13:56
@kean
Copy link
Contributor Author

kean commented Jan 30, 2024

When I force quit then reopen the app, I have to login again to see the metrics webview.

Hmm, I couldn't reproduce it. Are there more steps? Are you sure you are not running using the proxy?

Also, feel free to delete WebView.swift, as it's no longer needed. Thanks for implementing WebKitView 🙇‍♀️

Done.

Copy link
Contributor

@momo-ozawa momo-ozawa left a comment

Choose a reason for hiding this comment

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

Turned off the proxy - that was it!

@peril-wordpress-mobile
Copy link

Warnings
⚠️ This PR is assigned to a milestone which is closing in less than 4 days Please, make sure to get it merged by then or assign it to a later expiring milestone

Generated by 🚫 dangerJS

@kean kean enabled auto-merge February 1, 2024 13:35
@dangermattic
Copy link
Collaborator

1 Warning
⚠️ This PR is assigned to the milestone 24.2. This milestone is due in less than 4 days.
Please make sure to get it merged by then or assign it to a milestone with a later deadline.

Generated by 🚫 Danger

@kean kean merged commit 17baf18 into trunk Feb 1, 2024
21 of 22 checks passed
@kean kean deleted the task/add-metrics-webview-2 branch February 1, 2024 14:07
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.

4 participants