Skip to content

Commit

Permalink
Merge branch 'feature/reader-ia' into issue/20012-subscribing-tag-upd…
Browse files Browse the repository at this point in the history
…ate-filter-pill
  • Loading branch information
RenanLukas committed Feb 2, 2024
2 parents 39d6127 + 180acda commit 4e67cfc
Show file tree
Hide file tree
Showing 146 changed files with 2,549 additions and 970 deletions.
3 changes: 0 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ updates:
# dependapot.
- dependency-name: "org.wordpress:fluxc"
- dependency-name: "org.wordpress:utils"
# org.wordpress-mobile.gutenberg-mobile is deprecated and org.wordpress.gutenberg-mobile is used instead.
# Temporarily leaving this declaration during transition, but this should be removed soon.
- dependency-name: "org.wordpress-mobile.gutenberg-mobile:react-native-gutenberg-bridge"
- dependency-name: "org.wordpress.gutenberg-mobile:react-native-gutenberg-bridge"
- dependency-name: "org.wordpress:login"
- dependency-name: "com.automattic:stories"
Expand Down
9 changes: 8 additions & 1 deletion RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,18 @@

24.2
-----

* [**] Fix editor crash occurring on large posts [https://github.com/wordpress-mobile/WordPress-Android/pull/20046]
* [*] [Jetpack-only] Site Monitoring: Add Metrics, PHP Logs, and Web Server Logs under Site Monitoring [https://github.com/wordpress-mobile/WordPress-Android/issues/20067]
* [**] Prevent images from temporarily disappearing when uploading media [https://github.com/WordPress/gutenberg/pull/57869]

24.1
-----
* [**] Disabled the ability of creating new Story posts. [#20014]
* [**] Disable Story block [https://github.com/wordpress-mobile/WordPress-Android/pull/20005]

24.0.2
-----
* [**] Fix Aztec editor crash when losing or gaining network connectivity [https://github.com/wordpress-mobile/WordPress-Android/pull/20053]

24.0.1
-----
Expand Down
21 changes: 12 additions & 9 deletions WordPress/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ repositories {
includeGroup "com.automattic"
includeGroup "com.automattic.stories"
includeGroup "com.automattic.tracks"
// 'org.wordpress-mobile' group is deprecated. It's kept for now for smoother transition
// but it should be removed soon (within couple weeks)
includeGroup "org.wordpress-mobile"
includeGroup "org.wordpress-mobile.gutenberg-mobile"
includeGroupByRegex "org.wordpress-mobile.react-native-libraries.*"
}
}
maven {
Expand Down Expand Up @@ -348,6 +343,7 @@ kapt {

dependencies {
implementation 'androidx.webkit:webkit:1.7.0'
implementation "androidx.navigation:navigation-compose:$androidxComposeNavigationVersion"
compileOnly project(path: ':libs:annotations')
kapt project(':libs:processors')
implementation (project(path:':libs:networking')) {
Expand Down Expand Up @@ -391,10 +387,6 @@ dependencies {
}
implementation "org.wordpress:persistentedittext:$wordPressPersistentEditTextVersion"

// To enable Stetho, a debug bridge that enables the Chrome Developer Tools for debug purposes.
debugImplementation "com.facebook.stetho:stetho:$stethoVersion"
debugImplementation "com.facebook.stetho:stetho-okhttp3:$stethoVersion"

implementation "androidx.arch.core:core-common:$androidxArchCoreVersion"
implementation "androidx.arch.core:core-runtime:$androidxArchCoreVersion"
implementation "com.google.code.gson:gson:$googleGsonVersion"
Expand Down Expand Up @@ -562,8 +554,19 @@ dependencies {
// - Jetpack Compose - UI Tests
androidTestImplementation "androidx.compose.ui:ui-test-junit4"
implementation "androidx.compose.material3:material3:$androidxComposeMaterial3Version"

// Cascade - Compose nested menu
implementation "me.saket.cascade:cascade-compose:2.3.0"

// - Flipper
debugImplementation ("com.facebook.flipper:flipper:$flipperVersion") {
exclude group:'org.jetbrains.kotlinx', module:'kotlinx-serialization-json-jvm'
}
debugImplementation "com.facebook.soloader:soloader:$soLoaderVersion"
debugImplementation ("com.facebook.flipper:flipper-network-plugin:$flipperVersion"){
exclude group:'org.jetbrains.kotlinx', module:'kotlinx-serialization-json-jvm'
}
releaseImplementation "com.facebook.flipper:flipper-noop:$flipperVersion"
}

configurations.all {
Expand Down
2 changes: 2 additions & 0 deletions WordPress/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,7 @@
android:name=".ui.debug.preferences.DebugSharedPreferenceFlagsActivity"
android:label="@string/debug_settings_debug_flags_screen"
android:theme="@style/WordPress.NoActionBar" />
<activity android:name="com.facebook.flipper.android.diagnostics.FlipperDiagnosticActivity"
android:exported="true"/>
</application>
</manifest>
22 changes: 19 additions & 3 deletions WordPress/src/debug/java/org/wordpress/android/WordPressDebug.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@

import android.os.StrictMode;

import com.facebook.stetho.Stetho;
import com.facebook.flipper.android.AndroidFlipperClient;
import com.facebook.flipper.android.utils.FlipperUtils;
import com.facebook.flipper.core.FlipperClient;
import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin;
import com.facebook.flipper.plugins.inspector.DescriptorMapping;
import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin;
import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
import com.facebook.soloader.SoLoader;

import org.wordpress.android.util.AppLog;
import org.wordpress.android.util.AppLog.T;
Expand All @@ -11,14 +18,23 @@

@HiltAndroidApp
public class WordPressDebug extends WordPressApp {
public static final NetworkFlipperPlugin NETWORK_FLIPPER_PLUGIN = new NetworkFlipperPlugin();
@Override
public void onCreate() {
super.onCreate();

// enableStrictMode()

// Init Stetho
Stetho.initializeWithDefaults(this);
// init Flipper
SoLoader.init(this, false);

if (BuildConfig.DEBUG && FlipperUtils.shouldEnableFlipper(this)) {
final FlipperClient client = AndroidFlipperClient.getInstance(this);
client.addPlugin(new InspectorFlipperPlugin(this, DescriptorMapping.withDefaults()));
client.addPlugin(NETWORK_FLIPPER_PLUGIN);
client.addPlugin(new DatabasesFlipperPlugin(this));
client.start();
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package org.wordpress.android.modules;

import com.facebook.stetho.okhttp3.StethoInterceptor;
import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;

import org.wordpress.android.WordPressDebug;

import javax.inject.Named;

Expand All @@ -11,11 +13,12 @@
import dagger.multibindings.IntoSet;
import okhttp3.Interceptor;


@InstallIn(SingletonComponent.class)
@Module
public class InterceptorModule {
@Provides @IntoSet @Named("network-interceptors")
public Interceptor provideStethoInterceptor() {
return new StethoInterceptor();
public Interceptor provideFlipperInterceptor() {
return new FlipperOkhttpInterceptor(WordPressDebug.NETWORK_FLIPPER_PLUGIN);
}
}
12 changes: 11 additions & 1 deletion WordPress/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -482,13 +482,23 @@
<data
android:host="wordpress.com"
android:pathPattern="/media/.*"
android:scheme="http" />
android:scheme="https" />

<data
android:host="wordpress.com"
android:pathPattern="/domains/manage"
android:scheme="https" />

<data
android:host="wordpress.com"
android:pathPattern="/site-monitoring/.*"
android:scheme="https" />

<data
android:host="wordpress.com"
android:pathPattern="/site-monitoring/.*"
android:scheme="http" />

</intent-filter>
</activity-alias>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class DesignSystemActivity : LocaleAwareActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
DesignSystem()
DesignSystem(onBackPressedDispatcher::onBackPressed)
}
}

Expand All @@ -24,7 +24,7 @@ class DesignSystemActivity : LocaleAwareActivity() {

@Composable
fun PreviewDesignSystemActivity() {
DesignSystem()
DesignSystem(onBackPressedDispatcher::onBackPressed)
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
package org.wordpress.android.designsystem

import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.dimensionResource
import androidx.compose.ui.tooling.preview.Preview
import org.wordpress.android.R

@Composable
fun DesignSystemComponentsScreen(
modifier: Modifier = Modifier
) {
LazyColumn (
modifier = modifier,
horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.spacedBy(
dimensionResource(id = R.dimen.reader_follow_sheet_button_margin_top)
)
) {
item {
DesignSystemDataSource.componentsScreenButtonOptions.forEach { item ->
SelectOptionButton(
labelResourceId = item,
onClick = {}
)
}
}
}
}

@Preview
@Composable
fun StartDesignSystemComponentsScreenPreview(){
DesignSystemComponentsScreen(
modifier = Modifier
.fillMaxSize()
.padding(dimensionResource(R.dimen.button_container_shadow_height))
)
}

Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,16 @@ package org.wordpress.android.designsystem
import org.wordpress.android.R

object DesignSystemDataSource {
val buttonOptions = listOf(
R.string.design_system_foundation,
R.string.design_system_components
val startScreenButtonOptions = listOf(
Pair(R.string.design_system_foundation, DesignSystemScreen.Foundation.name),
Pair(R.string.design_system_components, DesignSystemScreen.Components.name),
)
val foundationScreenButtonOptions = listOf(
R.string.design_system_foundation_colors,
R.string.design_system_foundation_fonts,
R.string.design_system_foundation_lengths
)
val componentsScreenButtonOptions = listOf(
R.string.design_system_components_dsbutton
)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
package org.wordpress.android.designsystem

import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.dimensionResource
import androidx.compose.ui.tooling.preview.Preview
import org.wordpress.android.R

@Composable
fun DesignSystemFoundationScreen(
modifier: Modifier = Modifier
) {
LazyColumn (
modifier = modifier,
horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.spacedBy(
dimensionResource(id = R.dimen.reader_follow_sheet_button_margin_top)
)
) {
item {
DesignSystemDataSource.foundationScreenButtonOptions.forEach { item ->
SelectOptionButton(
labelResourceId = item,
onClick = {}
)
}
}
}
}

@Preview
@Composable
fun StartDesignSystemFoundationScreenPreview(){
DesignSystemFoundationScreen(
modifier = Modifier
.fillMaxSize()
.padding(dimensionResource(R.dimen.button_container_shadow_height))
)
}

Loading

0 comments on commit 4e67cfc

Please sign in to comment.