-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Gutenberg: Remove Upload Options for Users Who Lack Permission #16188
Conversation
There are so many parameters to the GutenbergPropsBuilder class now, that it feels worthwhile to do this to use Kotlin's named parameters and reduce the risk of getting the parameters mixed up.
You can trigger optional UI/connected tests for these changes by visiting CircleCI here. |
Found 1 violations: The PR caused the following dependency changes: \--- project :libs:editor:WordPressEditor
- \--- org.wordpress-mobile.gutenberg-mobile:react-native-gutenberg-bridge:v1.73.0-alpha4
- +--- com.facebook.fresco:animated-gif:2.0.0
- | +--- com.parse.bolts:bolts-tasks:1.4.0
- | +--- com.facebook.soloader:soloader:0.6.0 -> 0.10.1
- | | +--- com.facebook.soloader:annotation:0.10.1
- | | \--- com.facebook.soloader:nativeloader:0.10.1
- | +--- com.facebook.fresco:fbcore:2.0.0 -> 2.5.0
- | \--- com.facebook.fresco:animated-base:2.0.0
- | +--- com.facebook.fresco:fbcore:2.0.0 -> 2.5.0
- | +--- com.facebook.fresco:imagepipeline-base:2.0.0 -> 2.5.0
- | | +--- com.facebook.infer.annotation:infer-annotation:0.18.0
- | | | +--- com.google.code.findbugs:jsr305:3.0.1 -> 3.0.2
- | | | \--- org.jetbrains.kotlin:kotlin-annotations-jvm:1.3.72
- | | +--- com.facebook.soloader:annotation:0.10.1
- | | +--- com.parse.bolts:bolts-tasks:1.4.0
- | | \--- com.facebook.fresco:fbcore:2.5.0
- | +--- com.facebook.fresco:imagepipeline:2.0.0 -> 2.5.0
- | | +--- com.facebook.soloader:nativeloader:0.10.1
- | | +--- com.facebook.soloader:annotation:0.10.1
- | | +--- com.parse.bolts:bolts-tasks:1.4.0
- | | +--- com.facebook.fresco:fbcore:2.5.0
- | | \--- com.facebook.fresco:imagepipeline-base:2.5.0 (*)
- | +--- com.facebook.fresco:animated-drawable:2.0.0
- | | +--- com.facebook.fresco:imagepipeline:2.0.0 -> 2.5.0 (*)
- | | +--- com.facebook.fresco:drawee:2.0.0 -> 2.5.0
- | | | +--- com.facebook.fresco:fbcore:2.5.0
- | | | +--- com.facebook.fresco:imagepipeline:2.5.0 (*)
- | | | +--- com.facebook.fresco:imagepipeline-native:2.5.0
- | | | | +--- com.facebook.fresco:imagepipeline:2.5.0 (*)
- | | | | +--- com.facebook.fresco:fbcore:2.5.0
- | | | | \--- com.facebook.soloader:soloader:0.10.1 (*)
- | | | +--- com.facebook.fresco:memory-type-ashmem:2.5.0
- | | | | +--- com.facebook.fresco:fbcore:2.5.0
- | | | | \--- com.facebook.fresco:imagepipeline:2.5.0 (*)
- | | | +--- com.facebook.fresco:memory-type-native:2.5.0
- | | | | +--- com.facebook.fresco:fbcore:2.5.0
- | | | | +--- com.facebook.fresco:imagepipeline:2.5.0 (*)
- | | | | +--- com.facebook.fresco:imagepipeline-native:2.5.0 (*)
- | | | | \--- com.facebook.soloader:nativeloader:0.10.1
- | | | +--- com.facebook.fresco:memory-type-java:2.5.0
- | | | | +--- com.facebook.fresco:fbcore:2.5.0
- | | | | +--- com.facebook.fresco:imagepipeline:2.5.0 (*)
- | | | | \--- com.facebook.fresco:imagepipeline-native:2.5.0 (*)
- | | | +--- com.facebook.fresco:ui-common:2.5.0
- | | | | \--- com.facebook.fresco:fbcore:2.5.0
- | | | \--- com.facebook.fresco:middleware:2.5.0
- | | | +--- com.facebook.fresco:fbcore:2.5.0
- | | | \--- com.facebook.fresco:ui-common:2.5.0 (*)
- | | \--- com.facebook.fresco:fbcore:2.0.0 -> 2.5.0
- | \--- com.parse.bolts:bolts-tasks:1.4.0
- +--- com.google.android.material:material:1.2.1 -> 1.6.0-alpha01 (*)
- +--- com.facebook.react:react-native:0.66.2
- | +--- com.facebook.infer.annotation:infer-annotation:0.18.0 (*)
- | +--- com.facebook.yoga:proguard-annotations:1.19.0
- | +--- javax.inject:javax.inject:1
- | +--- androidx.appcompat:appcompat:1.0.2 -> 1.3.1 (*)
- | +--- androidx.autofill:autofill:1.1.0 (*)
- | +--- androidx.swiperefreshlayout:swiperefreshlayout:1.0.0 -> 1.1.0 (*)
- | +--- com.facebook.fresco:fresco:2.5.0
- | | +--- com.facebook.fresco:soloader:2.5.0
- | | | +--- com.facebook.fresco:fbcore:2.5.0
- | | | \--- com.facebook.soloader:soloader:0.10.1 (*)
- | | +--- com.facebook.soloader:nativeloader:0.10.1
- | | +--- com.facebook.fresco:ui-common:2.5.0 (*)
- | | +--- com.facebook.fresco:fbcore:2.5.0
- | | +--- com.facebook.fresco:drawee:2.5.0 (*)
- | | +--- com.facebook.fresco:imagepipeline:2.5.0 (*)
- | | +--- com.facebook.fresco:imagepipeline-native:2.5.0 (*)
- | | +--- com.facebook.fresco:memory-type-ashmem:2.5.0 (*)
- | | +--- com.facebook.fresco:memory-type-native:2.5.0 (*)
- | | +--- com.facebook.fresco:memory-type-java:2.5.0 (*)
- | | +--- com.facebook.fresco:nativeimagefilters:2.5.0
- | | | +--- com.facebook.fresco:imagepipeline:2.5.0 (*)
- | | | +--- com.facebook.fresco:imagepipeline-native:2.5.0 (*)
- | | | +--- com.facebook.fresco:memory-type-ashmem:2.5.0 (*)
- | | | +--- com.facebook.fresco:memory-type-native:2.5.0 (*)
- | | | +--- com.facebook.fresco:memory-type-java:2.5.0 (*)
- | | | +--- com.facebook.soloader:nativeloader:0.10.1
- | | | +--- com.parse.bolts:bolts-tasks:1.4.0
- | | | \--- com.facebook.fresco:fbcore:2.5.0
- | | \--- com.facebook.fresco:nativeimagetranscoder:2.5.0
- | | +--- com.facebook.fresco:imagepipeline-base:2.5.0 (*)
- | | +--- com.facebook.soloader:nativeloader:0.10.1
- | | +--- com.parse.bolts:bolts-tasks:1.4.0
- | | \--- com.facebook.fresco:fbcore:2.5.0
- | +--- com.facebook.fresco:imagepipeline-okhttp3:2.5.0
- | | +--- com.facebook.fresco:fbcore:2.5.0
- | | +--- com.facebook.fresco:imagepipeline:2.5.0 (*)
- | | +--- com.facebook.fresco:imagepipeline-native:2.5.0 (*)
- | | +--- com.facebook.fresco:memory-type-ashmem:2.5.0 (*)
- | | +--- com.facebook.fresco:memory-type-native:2.5.0 (*)
- | | +--- com.facebook.fresco:memory-type-java:2.5.0 (*)
- | | \--- com.squareup.okhttp3:okhttp:3.12.1 -> 4.9.2 (*)
- | +--- com.facebook.fresco:ui-common:2.5.0 (*)
- | +--- com.facebook.soloader:soloader:0.10.1 (*)
- | +--- com.google.code.findbugs:jsr305:3.0.2
- | +--- com.squareup.okhttp3:okhttp:4.9.1 -> 4.9.2 (*)
- | +--- com.squareup.okhttp3:okhttp-urlconnection:4.9.1 -> 4.9.2 (*)
- | +--- com.squareup.okio:okio:2.9.0 (*)
- | \--- com.facebook.fbjni:fbjni-java-only:0.2.2
- | \--- com.facebook.soloader:nativeloader:0.10.1
- +--- org.wordpress-mobile:react-native-svg:9.13.6
- | \--- com.facebook.react:react-native:0.66.2 (*)
- +--- com.github.wordpress-mobile:react-native-video:5.2.0-wp-2
- | +--- com.facebook.react:react-native:0.66.2 (*)
- | +--- com.google.android.exoplayer:exoplayer:2.13.3
- | | +--- com.google.android.exoplayer:exoplayer-core:2.13.3
- | | | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
- | | | +--- com.google.android.exoplayer:exoplayer-common:2.13.3
- | | | | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
- | | | | \--- com.google.guava:guava:27.1-android
- | | | | +--- com.google.guava:failureaccess:1.0.1
- | | | | \--- com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
- | | | \--- com.google.android.exoplayer:exoplayer-extractor:2.13.3
- | | | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
- | | | \--- com.google.android.exoplayer:exoplayer-common:2.13.3 (*)
- | | +--- com.google.android.exoplayer:exoplayer-dash:2.13.3
- | | | +--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
- | | | \--- androidx.annotation:annotation:1.1.0 -> 1.2.0
- | | +--- com.google.android.exoplayer:exoplayer-hls:2.13.3
- | | | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
- | | | \--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
- | | +--- com.google.android.exoplayer:exoplayer-smoothstreaming:2.13.3
- | | | +--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
- | | | \--- androidx.annotation:annotation:1.1.0 -> 1.2.0
- | | +--- com.google.android.exoplayer:exoplayer-transformer:2.13.3
- | | | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
- | | | \--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
- | | \--- com.google.android.exoplayer:exoplayer-ui:2.13.3
- | | +--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
- | | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
- | | +--- androidx.recyclerview:recyclerview:1.1.0 (*)
- | | \--- androidx.media:media:1.2.1 (*)
- | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
- | +--- androidx.core:core:1.1.0 -> 1.7.0 (*)
- | +--- androidx.media:media:1.1.0 -> 1.2.1 (*)
- | +--- com.google.android.exoplayer:extension-okhttp:2.13.3
- | | +--- com.google.android.exoplayer:exoplayer-common:2.13.3 (*)
- | | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
- | | \--- com.squareup.okhttp3:okhttp:3.12.11 -> 4.9.2 (*)
- | \--- com.squareup.okhttp3:okhttp:${OKHTTP_VERSION} -> 4.9.2 (*)
- +--- com.github.wordpress-mobile:react-native-linear-gradient:2.5.6-wp-2
- | \--- com.facebook.react:react-native:0.66.2 (*)
- +--- com.github.wordpress-mobile:react-native-slider:3.0.2-wp-2
- | \--- com.facebook.react:react-native:0.66.2 (*)
- +--- org.wordpress-mobile:react-native-get-random-values:1.4.0
- | \--- com.facebook.react:react-native:0.66.2 (*)
- +--- org.wordpress-mobile:react-native-masked-view:0.2.6
- | \--- com.facebook.react:react-native:0.66.2 (*)
- +--- com.github.wordpress-mobile:react-native-gesture-handler:2.2.0-wp-4
- | +--- com.github.wordpress-mobile:react-native-reanimated:2.4.1-wp-1
- | +--- com.facebook.react:react-native:0.66.2 (*)
- | +--- androidx.appcompat:appcompat:1.2.0 -> 1.3.1 (*)
- | +--- androidx.core:core-ktx:1.6.0 -> 1.7.0 (*)
- | \--- org.jetbrains.kotlin:kotlin-stdlib:1.5.20 -> 1.6.0 (*)
- +--- org.wordpress-mobile:react-native-screens:2.9.0
- | +--- com.facebook.react:react-native:0.66.2 (*)
- | +--- androidx.appcompat:appcompat:1.1.0 -> 1.3.1 (*)
- | +--- androidx.fragment:fragment:1.2.1 -> 1.3.6 (*)
- | +--- androidx.coordinatorlayout:coordinatorlayout:1.1.0 (*)
- | +--- androidx.swiperefreshlayout:swiperefreshlayout:1.0.0 -> 1.1.0 (*)
- | \--- com.google.android.material:material:1.1.0 -> 1.6.0-alpha01 (*)
- +--- org.wordpress-mobile:react-native-safe-area-context:3.2.0
- | \--- com.facebook.react:react-native:0.66.2 (*)
- +--- com.github.wordpress-mobile:react-native-reanimated:2.4.1-wp-1
- +--- com.github.wordpress-mobile:react-native-prompt-android:1.0.0-wp-2
- | +--- com.facebook.react:react-native:0.66.2 (*)
- | \--- androidx.appcompat:appcompat:1.0.0 -> 1.3.1 (*)
- +--- org.wordpress-mobile:react-native-webview:11.6.2
- | +--- com.facebook.react:react-native:0.66.2 (*)
- | \--- org.jetbrains.kotlin:kotlin-stdlib:1.4.10 -> 1.6.0 (*)
- +--- org.wordpress-mobile:react-native-clipboard:1.9.0
- | \--- com.facebook.react:react-native:0.66.2 (*)
- +--- org.wordpress-mobile.gutenberg-mobile:react-native-aztec:v1.73.0-alpha4
- | +--- androidx.legacy:legacy-support-v4:1.0.0 (*)
- | +--- androidx.gridlayout:gridlayout:1.0.0 (*)
- | +--- androidx.cardview:cardview:1.0.0 (*)
- | +--- androidx.appcompat:appcompat:1.2.0 -> 1.3.1 (*)
- | +--- androidx.recyclerview:recyclerview:1.1.0 (*)
- | +--- com.facebook.react:react-native:0.66.2 (*)
- | +--- org.wordpress:aztec:v1.5.4 (*)
- | +--- org.wordpress.aztec:wordpress-shortcodes:v1.5.4 (*)
- | +--- org.wordpress.aztec:wordpress-comments:v1.5.4 (*)
- | +--- org.wordpress.aztec:glide-loader:v1.5.4
- | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.4.20 -> 1.6.0 (*)
- | | +--- org.wordpress:aztec:v1.5.4 (*)
- | | \--- com.github.bumptech.glide:glide:4.10.0 -> 4.11.0 (*)
- | \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.32 (*)
- +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.32 (*)
- \--- org.wordpress-mobile:hermes-release-mirror:0.66.2
+ \--- org.wordpress-mobile.gutenberg-mobile:react-native-gutenberg-bridge:4696-9d0176c8b8994c7a97b0d9aff4c11ee837419f25
+ +--- com.facebook.fresco:animated-gif:2.0.0
+ | +--- com.parse.bolts:bolts-tasks:1.4.0
+ | +--- com.facebook.soloader:soloader:0.6.0 -> 0.10.1
+ | | +--- com.facebook.soloader:annotation:0.10.1
+ | | \--- com.facebook.soloader:nativeloader:0.10.1
+ | +--- com.facebook.fresco:fbcore:2.0.0 -> 2.5.0
+ | \--- com.facebook.fresco:animated-base:2.0.0
+ | +--- com.facebook.fresco:fbcore:2.0.0 -> 2.5.0
+ | +--- com.facebook.fresco:imagepipeline-base:2.0.0 -> 2.5.0
+ | | +--- com.facebook.infer.annotation:infer-annotation:0.18.0
+ | | | +--- com.google.code.findbugs:jsr305:3.0.1 -> 3.0.2
+ | | | \--- org.jetbrains.kotlin:kotlin-annotations-jvm:1.3.72
+ | | +--- com.facebook.soloader:annotation:0.10.1
+ | | +--- com.parse.bolts:bolts-tasks:1.4.0
+ | | \--- com.facebook.fresco:fbcore:2.5.0
+ | +--- com.facebook.fresco:imagepipeline:2.0.0 -> 2.5.0
+ | | +--- com.facebook.soloader:nativeloader:0.10.1
+ | | +--- com.facebook.soloader:annotation:0.10.1
+ | | +--- com.parse.bolts:bolts-tasks:1.4.0
+ | | +--- com.facebook.fresco:fbcore:2.5.0
+ | | \--- com.facebook.fresco:imagepipeline-base:2.5.0 (*)
+ | +--- com.facebook.fresco:animated-drawable:2.0.0
+ | | +--- com.facebook.fresco:imagepipeline:2.0.0 -> 2.5.0 (*)
+ | | +--- com.facebook.fresco:drawee:2.0.0 -> 2.5.0
+ | | | +--- com.facebook.fresco:fbcore:2.5.0
+ | | | +--- com.facebook.fresco:imagepipeline:2.5.0 (*)
+ | | | +--- com.facebook.fresco:imagepipeline-native:2.5.0
+ | | | | +--- com.facebook.fresco:imagepipeline:2.5.0 (*)
+ | | | | +--- com.facebook.fresco:fbcore:2.5.0
+ | | | | \--- com.facebook.soloader:soloader:0.10.1 (*)
+ | | | +--- com.facebook.fresco:memory-type-ashmem:2.5.0
+ | | | | +--- com.facebook.fresco:fbcore:2.5.0
+ | | | | \--- com.facebook.fresco:imagepipeline:2.5.0 (*)
+ | | | +--- com.facebook.fresco:memory-type-native:2.5.0
+ | | | | +--- com.facebook.fresco:fbcore:2.5.0
+ | | | | +--- com.facebook.fresco:imagepipeline:2.5.0 (*)
+ | | | | +--- com.facebook.fresco:imagepipeline-native:2.5.0 (*)
+ | | | | \--- com.facebook.soloader:nativeloader:0.10.1
+ | | | +--- com.facebook.fresco:memory-type-java:2.5.0
+ | | | | +--- com.facebook.fresco:fbcore:2.5.0
+ | | | | +--- com.facebook.fresco:imagepipeline:2.5.0 (*)
+ | | | | \--- com.facebook.fresco:imagepipeline-native:2.5.0 (*)
+ | | | +--- com.facebook.fresco:ui-common:2.5.0
+ | | | | \--- com.facebook.fresco:fbcore:2.5.0
+ | | | \--- com.facebook.fresco:middleware:2.5.0
+ | | | +--- com.facebook.fresco:fbcore:2.5.0
+ | | | \--- com.facebook.fresco:ui-common:2.5.0 (*)
+ | | \--- com.facebook.fresco:fbcore:2.0.0 -> 2.5.0
+ | \--- com.parse.bolts:bolts-tasks:1.4.0
+ +--- com.google.android.material:material:1.2.1 -> 1.6.0-alpha01 (*)
+ +--- com.facebook.react:react-native:0.66.2
+ | +--- com.facebook.infer.annotation:infer-annotation:0.18.0 (*)
+ | +--- com.facebook.yoga:proguard-annotations:1.19.0
+ | +--- javax.inject:javax.inject:1
+ | +--- androidx.appcompat:appcompat:1.0.2 -> 1.3.1 (*)
+ | +--- androidx.autofill:autofill:1.1.0 (*)
+ | +--- androidx.swiperefreshlayout:swiperefreshlayout:1.0.0 -> 1.1.0 (*)
+ | +--- com.facebook.fresco:fresco:2.5.0
+ | | +--- com.facebook.fresco:soloader:2.5.0
+ | | | +--- com.facebook.fresco:fbcore:2.5.0
+ | | | \--- com.facebook.soloader:soloader:0.10.1 (*)
+ | | +--- com.facebook.soloader:nativeloader:0.10.1
+ | | +--- com.facebook.fresco:ui-common:2.5.0 (*)
+ | | +--- com.facebook.fresco:fbcore:2.5.0
+ | | +--- com.facebook.fresco:drawee:2.5.0 (*)
+ | | +--- com.facebook.fresco:imagepipeline:2.5.0 (*)
+ | | +--- com.facebook.fresco:imagepipeline-native:2.5.0 (*)
+ | | +--- com.facebook.fresco:memory-type-ashmem:2.5.0 (*)
+ | | +--- com.facebook.fresco:memory-type-native:2.5.0 (*)
+ | | +--- com.facebook.fresco:memory-type-java:2.5.0 (*)
+ | | +--- com.facebook.fresco:nativeimagefilters:2.5.0
+ | | | +--- com.facebook.fresco:imagepipeline:2.5.0 (*)
+ | | | +--- com.facebook.fresco:imagepipeline-native:2.5.0 (*)
+ | | | +--- com.facebook.fresco:memory-type-ashmem:2.5.0 (*)
+ | | | +--- com.facebook.fresco:memory-type-native:2.5.0 (*)
+ | | | +--- com.facebook.fresco:memory-type-java:2.5.0 (*)
+ | | | +--- com.facebook.soloader:nativeloader:0.10.1
+ | | | +--- com.parse.bolts:bolts-tasks:1.4.0
+ | | | \--- com.facebook.fresco:fbcore:2.5.0
+ | | \--- com.facebook.fresco:nativeimagetranscoder:2.5.0
+ | | +--- com.facebook.fresco:imagepipeline-base:2.5.0 (*)
+ | | +--- com.facebook.soloader:nativeloader:0.10.1
+ | | +--- com.parse.bolts:bolts-tasks:1.4.0
+ | | \--- com.facebook.fresco:fbcore:2.5.0
+ | +--- com.facebook.fresco:imagepipeline-okhttp3:2.5.0
+ | | +--- com.facebook.fresco:fbcore:2.5.0
+ | | +--- com.facebook.fresco:imagepipeline:2.5.0 (*)
+ | | +--- com.facebook.fresco:imagepipeline-native:2.5.0 (*)
+ | | +--- com.facebook.fresco:memory-type-ashmem:2.5.0 (*)
+ | | +--- com.facebook.fresco:memory-type-native:2.5.0 (*)
+ | | +--- com.facebook.fresco:memory-type-java:2.5.0 (*)
+ | | \--- com.squareup.okhttp3:okhttp:3.12.1 -> 4.9.2 (*)
+ | +--- com.facebook.fresco:ui-common:2.5.0 (*)
+ | +--- com.facebook.soloader:soloader:0.10.1 (*)
+ | +--- com.google.code.findbugs:jsr305:3.0.2
+ | +--- com.squareup.okhttp3:okhttp:4.9.1 -> 4.9.2 (*)
+ | +--- com.squareup.okhttp3:okhttp-urlconnection:4.9.1 -> 4.9.2 (*)
+ | +--- com.squareup.okio:okio:2.9.0 (*)
+ | \--- com.facebook.fbjni:fbjni-java-only:0.2.2
+ | \--- com.facebook.soloader:nativeloader:0.10.1
+ +--- org.wordpress-mobile:react-native-svg:9.13.6
+ | \--- com.facebook.react:react-native:0.66.2 (*)
+ +--- com.github.wordpress-mobile:react-native-video:5.2.0-wp-2
+ | +--- com.facebook.react:react-native:0.66.2 (*)
+ | +--- com.google.android.exoplayer:exoplayer:2.13.3
+ | | +--- com.google.android.exoplayer:exoplayer-core:2.13.3
+ | | | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
+ | | | +--- com.google.android.exoplayer:exoplayer-common:2.13.3
+ | | | | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
+ | | | | \--- com.google.guava:guava:27.1-android
+ | | | | +--- com.google.guava:failureaccess:1.0.1
+ | | | | \--- com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava
+ | | | \--- com.google.android.exoplayer:exoplayer-extractor:2.13.3
+ | | | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
+ | | | \--- com.google.android.exoplayer:exoplayer-common:2.13.3 (*)
+ | | +--- com.google.android.exoplayer:exoplayer-dash:2.13.3
+ | | | +--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
+ | | | \--- androidx.annotation:annotation:1.1.0 -> 1.2.0
+ | | +--- com.google.android.exoplayer:exoplayer-hls:2.13.3
+ | | | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
+ | | | \--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
+ | | +--- com.google.android.exoplayer:exoplayer-smoothstreaming:2.13.3
+ | | | +--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
+ | | | \--- androidx.annotation:annotation:1.1.0 -> 1.2.0
+ | | +--- com.google.android.exoplayer:exoplayer-transformer:2.13.3
+ | | | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
+ | | | \--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
+ | | \--- com.google.android.exoplayer:exoplayer-ui:2.13.3
+ | | +--- com.google.android.exoplayer:exoplayer-core:2.13.3 (*)
+ | | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
+ | | +--- androidx.recyclerview:recyclerview:1.1.0 (*)
+ | | \--- androidx.media:media:1.2.1 (*)
+ | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
+ | +--- androidx.core:core:1.1.0 -> 1.7.0 (*)
+ | +--- androidx.media:media:1.1.0 -> 1.2.1 (*)
+ | +--- com.google.android.exoplayer:extension-okhttp:2.13.3
+ | | +--- com.google.android.exoplayer:exoplayer-common:2.13.3 (*)
+ | | +--- androidx.annotation:annotation:1.1.0 -> 1.2.0
+ | | \--- com.squareup.okhttp3:okhttp:3.12.11 -> 4.9.2 (*)
+ | \--- com.squareup.okhttp3:okhttp:${OKHTTP_VERSION} -> 4.9.2 (*)
+ +--- com.github.wordpress-mobile:react-native-linear-gradient:2.5.6-wp-2
+ | \--- com.facebook.react:react-native:0.66.2 (*)
+ +--- com.github.wordpress-mobile:react-native-slider:3.0.2-wp-2
+ | \--- com.facebook.react:react-native:0.66.2 (*)
+ +--- org.wordpress-mobile:react-native-get-random-values:1.4.0
+ | \--- com.facebook.react:react-native:0.66.2 (*)
+ +--- org.wordpress-mobile:react-native-masked-view:0.2.6
+ | \--- com.facebook.react:react-native:0.66.2 (*)
+ +--- com.github.wordpress-mobile:react-native-gesture-handler:2.2.0-wp-4
+ | +--- com.github.wordpress-mobile:react-native-reanimated:2.4.1-wp-1
+ | +--- com.facebook.react:react-native:0.66.2 (*)
+ | +--- androidx.appcompat:appcompat:1.2.0 -> 1.3.1 (*)
+ | +--- androidx.core:core-ktx:1.6.0 -> 1.7.0 (*)
+ | \--- org.jetbrains.kotlin:kotlin-stdlib:1.5.20 -> 1.6.0 (*)
+ +--- org.wordpress-mobile:react-native-screens:2.9.0
+ | +--- com.facebook.react:react-native:0.66.2 (*)
+ | +--- androidx.appcompat:appcompat:1.1.0 -> 1.3.1 (*)
+ | +--- androidx.fragment:fragment:1.2.1 -> 1.3.6 (*)
+ | +--- androidx.coordinatorlayout:coordinatorlayout:1.1.0 (*)
+ | +--- androidx.swiperefreshlayout:swiperefreshlayout:1.0.0 -> 1.1.0 (*)
+ | \--- com.google.android.material:material:1.1.0 -> 1.6.0-alpha01 (*)
+ +--- org.wordpress-mobile:react-native-safe-area-context:3.2.0
+ | \--- com.facebook.react:react-native:0.66.2 (*)
+ +--- com.github.wordpress-mobile:react-native-reanimated:2.4.1-wp-1
+ +--- com.github.wordpress-mobile:react-native-prompt-android:1.0.0-wp-2
+ | +--- com.facebook.react:react-native:0.66.2 (*)
+ | \--- androidx.appcompat:appcompat:1.0.0 -> 1.3.1 (*)
+ +--- org.wordpress-mobile:react-native-webview:11.6.2
+ | +--- com.facebook.react:react-native:0.66.2 (*)
+ | \--- org.jetbrains.kotlin:kotlin-stdlib:1.4.10 -> 1.6.0 (*)
+ +--- org.wordpress-mobile:react-native-clipboard:1.9.0
+ | \--- com.facebook.react:react-native:0.66.2 (*)
+ +--- org.wordpress-mobile.gutenberg-mobile:react-native-aztec:4696-9d0176c8b8994c7a97b0d9aff4c11ee837419f25
+ | +--- androidx.legacy:legacy-support-v4:1.0.0 (*)
+ | +--- androidx.gridlayout:gridlayout:1.0.0 (*)
+ | +--- androidx.cardview:cardview:1.0.0 (*)
+ | +--- androidx.appcompat:appcompat:1.2.0 -> 1.3.1 (*)
+ | +--- androidx.recyclerview:recyclerview:1.1.0 (*)
+ | +--- com.facebook.react:react-native:0.66.2 (*)
+ | +--- org.wordpress:aztec:v1.5.4 (*)
+ | +--- org.wordpress.aztec:wordpress-shortcodes:v1.5.4 (*)
+ | +--- org.wordpress.aztec:wordpress-comments:v1.5.4 (*)
+ | +--- org.wordpress.aztec:glide-loader:v1.5.4
+ | | +--- org.jetbrains.kotlin:kotlin-stdlib:1.4.20 -> 1.6.0 (*)
+ | | +--- org.wordpress:aztec:v1.5.4 (*)
+ | | \--- com.github.bumptech.glide:glide:4.10.0 -> 4.11.0 (*)
+ | \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.32 (*)
+ +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.32 (*)
+ \--- org.wordpress-mobile:hermes-release-mirror:0.66.2
Please review and act accordingly
|
You can test the changes on this Pull Request by downloading the APKs: |
fun getGutenbergPropsBuilder( | ||
site: SiteModel, | ||
isPage: Boolean, | ||
isXPostsCapable: Boolean?, | ||
isJetpackSsoEnabled: Boolean, | ||
editPostRepository: EditPostRepository, | ||
editorThemeStore: EditorThemeStore, | ||
context: Context | ||
): GutenbergPropsBuilder { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👋 @ParaskP7 ! This method is giving me a detekt violation since it has 7 parameters (1 more than the max of 6). I don't disagree that this is a good rule, but I'm wondering if you have any suggestions for how to address this because I kind of feel like ignoring this specific violation might be the best way to proceed.
I'm creating this method in order to avoid passing almost 20 unnamed parameters within Java. Many of those parameters are simple booleans, so I'm concerned that there is a pretty high risk of getting two of them mixed up.
I considered creating a proper Java builder object for Java to use to construct the GutenbergPropsBuilder
, but that's quite a bit more code to maintain (could use something like https://github.com/ThinkingLogic/kotlin-builder-annotation, but I'm trying to avoid the temptation to over-engineer more than I already am 😉 ), and I don't see how that would give us any advantages over just relying on Kotlin's named parameters like I am here. Basically, I'm just curious if you have any thoughts about how we might go about improving this or approaching it differently. Thanks so much! 🙇
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👋 @mchowning and thank you for the ping, apologies for keeping you waiting on my reply! 🙈
! This method is giving me a detekt violation since it has 7 parameters (1 more than the max of 6). I don't disagree that this is a good rule, but I'm wondering if you have any suggestions for how to address this because I kind of feel like ignoring this specific violation might be the best way to proceed.
The main purpose of this kind of rules is to help us identify that there might be a potential issue so that to trigger us thinking about it in order for us to (a) try and solve it or (b) suppress it anyway because this might be an exception to the rule and we really believe that this is the best way to proceed anyway.
As such, it seems that you did all the above and end up thinking that it is best to ignore it. I don't see any harm in that and indeed in lots of situations like that ignoring is totally valid.
I'm creating this method in order to avoid passing almost 20 unnamed parameters within Java. Many of those parameters are simple booleans, so I'm concerned that there is a pretty high risk of getting two of them mixed up.
👍
I considered creating a proper Java builder object for Java to use to construct the GutenbergPropsBuilder, but that's quite a bit more code to maintain (could use something like https://github.com/ThinkingLogic/kotlin-builder-annotation, but I'm trying to avoid the temptation to over-engineer more than I already am 😉 ), and I don't see how that would give us any advantages over just relying on Kotlin's named parameters like I am here. Basically, I'm just curious if you have any thoughts about how we might go about improving this or approaching it differently. Thanks so much! 🙇
I agree and thank you so much for thinking about it so deeply. I too believe that with Kotlin coming into play the builder pattern goes away... that rhymes! 😝 So, all in all, I would also avoid the temptation of over-engineering this. 💯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with Kotlin coming into play the builder pattern goes away.... that rhymes!
Well I'm certainly not going to argue against anything that rhymes so well! 😄 I've updated the PR to ignore that lint violation. Thanks so much for sharing your thoughts Petros!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well I'm certainly not going to argue against anything that rhymes so well! 😄
🤣
I've updated the PR to ignore that lint violation. Thanks so much for sharing your thoughts Petros!
🥇
Generated by 🚫 dangerJS |
See the related Gutenberg PR for a description of these changes and test steps.
Regression Notes
Potential unintended areas of impact
This touches the passing of data between native and Gutenberg. Because we are passing so many parameters to the
GutenbergPropsBuilder
, I refactored this to use Kotlin's named parameters in order to reduce the risk of us mixing up the parameters. Of course, there is always a risk that I mixed up some of the parameters in doing that.What I did to test those areas of impact (or what existing automated tests I relied on)
Manually testing various parts of the Gutenberg editor to ensure normal functioning.
What automated tests I added (or what prevented me from doing so)
There is not much benefit to adding automated tests around the passage of a variable like this but, as discussed earlier, I did less likely that we will mix up parameters in the future by using named parameters instead of the very long unnamed parameter list we were using before.
PR submission checklist:
RELEASE-NOTES.txt
if necessary.