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

Address NullPointerException crash in AztecHeadingSpan #19724

Merged

Conversation

SiobhyB
Copy link
Contributor

@SiobhyB SiobhyB commented Dec 4, 2023

Fixes #18657


Related PRs


To Test

  • Install the app using the installable build from this PR.
  • Navigate to the post editor.
  • Add some heading blocks and ensure there are no unexpected side effects when performing tasks. Example tasks to test include splitting the block, applying new font sizes and line heights, etc.

Regression Notes

  1. Potential unintended areas of impact

    • Although the changes shouldn't create unwanted side effects, we're still changing the chooseHeight override. As described here, that function defines the height for a given element. As such, changes to that override may impact how heights are calculated for heading blocks.
  2. What I did to test those areas of impact (or what existing automated tests I relied on)

    • Manually tested the heading block via the installable build.
  3. What automated tests I added (or what prevented me from doing so)

    • As we're only adding safety checks to the code and the testing is visual, there aren't any obvious ways to implement automated tests.

PR Submission Checklist:

  • I have completed the Regression Notes.
  • 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.

@SiobhyB SiobhyB added [Type] Crash Aztec Gutenberg Editing and display of Gutenberg blocks. gutenberg-mobile labels Dec 4, 2023
@SiobhyB SiobhyB changed the title Update Aztec version Address NullPointerException crash in AztecHeadingSpan Dec 4, 2023
@SiobhyB SiobhyB changed the title Address NullPointerException crash in AztecHeadingSpan Address NullPointerException crash in AztecHeadingSpan Dec 4, 2023
@wpmobilebot
Copy link
Contributor

wpmobilebot commented Dec 4, 2023

Jetpack📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack Jetpack
FlavorJalapeno
Build TypeDebug
Versionpr19724-d814948
Commitd814948
Direct Downloadjetpack-prototype-build-pr19724-d814948.apk
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Dec 4, 2023

WordPress📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress WordPress
FlavorJalapeno
Build TypeDebug
Versionpr19724-d814948
Commitd814948
Direct Downloadwordpress-prototype-build-pr19724-d814948.apk
Note: Google Login is not supported on these builds.

@SiobhyB SiobhyB requested a review from fluiddot December 4, 2023 15:49
@SiobhyB SiobhyB marked this pull request as ready for review December 4, 2023 15:50
@SiobhyB SiobhyB added this to the 23.8 ❄️ milestone Dec 4, 2023
build.gradle Outdated Show resolved Hide resolved
Copy link
Contributor

@fluiddot fluiddot left a comment

Choose a reason for hiding this comment

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

Approved via wordpress-mobile/AztecEditor-Android#1071 (review).

NOTE: If we plan to incorporate this fix in the ongoing beta version 23.8, we should consider pointing this PR to the branch release/23.8.

@SiobhyB SiobhyB changed the base branch from trunk to release/23.8 December 4, 2023 18:53
@wpmobilebot

This comment was marked as outdated.

@wpmobilebot
Copy link
Contributor

Found 1 violations:

The PR caused the following dependency changes:

 \--- project :libs:editor
-     +--- org.wordpress:aztec:{strictly v1.8.0} -> v1.8.0
+     +--- org.wordpress:aztec:{strictly v1.9.0} -> v1.9.0
-     +--- org.wordpress.aztec:wordpress-shortcodes:{strictly v1.8.0} -> v1.8.0
-     |    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10 -> 1.9.10 (*)
-     |    +--- org.wordpress:aztec:v1.8.0 (*)
-     |    \--- androidx.appcompat:appcompat:1.0.0 -> 1.6.1 (*)
+     +--- org.wordpress.aztec:wordpress-shortcodes:{strictly v1.9.0} -> v1.9.0
+     |    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10 -> 1.9.10 (*)
+     |    +--- org.wordpress:aztec:v1.9.0 (*)
+     |    \--- androidx.appcompat:appcompat:1.0.0 -> 1.6.1 (*)
-     +--- org.wordpress.aztec:wordpress-comments:{strictly v1.8.0} -> v1.8.0
-     |    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10 -> 1.9.10 (*)
-     |    +--- org.wordpress:aztec:v1.8.0 (*)
-     |    +--- androidx.legacy:legacy-support-v4:1.0.0 (*)
-     |    \--- com.google.android.material:material:1.0.0 -> 1.9.0 (*)
+     +--- org.wordpress.aztec:wordpress-comments:{strictly v1.9.0} -> v1.9.0
+     |    +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10 -> 1.9.10 (*)
+     |    +--- org.wordpress:aztec:v1.9.0 (*)
+     |    +--- androidx.legacy:legacy-support-v4:1.0.0 (*)
+     |    \--- com.google.android.material:material:1.0.0 -> 1.9.0 (*)
      \--- org.wordpress-mobile.gutenberg-mobile:react-native-gutenberg-bridge:v1.109.1
           \--- org.wordpress-mobile.gutenberg-mobile:react-native-aztec:v1.109.1
-               +--- org.wordpress:aztec:v1.8.0 (*)
+               +--- org.wordpress:aztec:v1.8.0 -> v1.9.0 (*)
-               +--- org.wordpress.aztec:wordpress-shortcodes:v1.8.0 (*)
+               +--- org.wordpress.aztec:wordpress-shortcodes:v1.8.0 -> v1.9.0 (*)
-               +--- org.wordpress.aztec:wordpress-comments:v1.8.0 (*)
+               +--- org.wordpress.aztec:wordpress-comments:v1.8.0 -> v1.9.0 (*)
                \--- org.wordpress.aztec:glide-loader:v1.8.0
-                    \--- org.wordpress:aztec:v1.8.0 (*)
+                    \--- org.wordpress:aztec:v1.8.0 -> v1.9.0 (*)

Please review and act accordingly

@SiobhyB SiobhyB force-pushed the gutenberg/address-nullpointerexception-heading-crash branch from 6ec7ac4 to f0220e1 Compare December 4, 2023 19:02
@SiobhyB SiobhyB changed the base branch from release/23.8 to trunk December 4, 2023 19:03
@SiobhyB SiobhyB changed the base branch from trunk to release/23.8 December 4, 2023 19:03
@SiobhyB SiobhyB closed this Dec 4, 2023
@SiobhyB SiobhyB force-pushed the gutenberg/address-nullpointerexception-heading-crash branch from f0220e1 to e43e8d9 Compare December 4, 2023 19:06
@SiobhyB SiobhyB reopened this Dec 4, 2023
@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

@SiobhyB SiobhyB merged commit afd37fc into release/23.8 Dec 4, 2023
16 checks passed
@SiobhyB SiobhyB deleted the gutenberg/address-nullpointerexception-heading-crash branch December 4, 2023 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Aztec Gutenberg Editing and display of Gutenberg blocks. [Type] Crash
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NullPointerException: org.wordpress.aztec.spans.AztecHeadingSpan in chooseHeight
3 participants