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

feat: Log GutenbergKit errors #24012

Merged
merged 5 commits into from
Jan 28, 2025
Merged

feat: Log GutenbergKit errors #24012

merged 5 commits into from
Jan 28, 2025

Conversation

dcalhoun
Copy link
Member

@dcalhoun dcalhoun commented Jan 25, 2025

Log GutenbergKit (GBK) errors to the observability platform.

Related:

To test:

  1. Checkout this WP-iOS branch.
  2. Clone the sibling GBK branch.
  3. Modify Package.swift to point GutenbergKit to your local clone of the GBK repository.
  4. Referencing GBK documentation, start the GBK project server and configuring environment variables. However, configure the environment variables within WordPress-iOS, not GBK's Demo app.
  5. Run the WP-iOS app.
  6. Introduce an intentional error in GBK (example diff below).
  7. Verify the error arrives in relevant Sentry project.
Example error diff

diff --git a/src/components/editor/index.jsx b/src/components/editor/index.jsx
index 582d33c..6aa5d48 100644
--- a/src/components/editor/index.jsx
+++ b/src/components/editor/index.jsx
@@ -67,6 +67,7 @@ export default function Editor({ post, children }) {

	return (
		<div className="gutenberg-kit-editor-interface">
+			{intentionalReferenceError}
			<EditorLoadNotice className="gutenberg-kit-editor-interface__load-notice" />
			<BlockEditorProvider
				value={postBlocks}

Regression Notes

  1. Potential unintended areas of impact
    Regressions in Gutenberg Mobile or Aztec editors.
  2. What I did to test those areas of impact (or what existing automated tests I relied on)
    Manually tested.
  3. What automated tests I added (or what prevented me from doing so)
    Deemed unnecessary for the experimental editor.

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)

@dangermattic
Copy link
Collaborator

dangermattic commented Jan 25, 2025

2 Warnings
⚠️ Modules/Package.swift was changed without updating its corresponding Package.resolved. Please resolve the Swift packages as appropriate to your project setup (e.g. in Xcode or by running swift package resolve).
⚠️ PR is not assigned to a milestone.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Jan 27, 2025

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 Numberpr24012-4c4325d
Version25.7
Bundle IDcom.jetpack.alpha
Commit4c4325d
App Center Buildjetpack-installable-builds #10438
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 27, 2025

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 Numberpr24012-4c4325d
Version25.7
Bundle IDorg.wordpress.alpha
Commit4c4325d
App Center BuildWPiOS - One-Offs #11406
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@dcalhoun dcalhoun marked this pull request as ready for review January 27, 2025 22:32
@dcalhoun dcalhoun requested a review from kean January 27, 2025 22:32
@dcalhoun dcalhoun added this pull request to the merge queue Jan 28, 2025
Merged via the queue into trunk with commit 250dcbd Jan 28, 2025
26 checks passed
@dcalhoun dcalhoun deleted the feat/log-gutenberg-kit-errors branch January 28, 2025 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Gutenberg Editing and display of Gutenberg blocks. [Type] Enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants