Skip to content

Commit

Permalink
Merge branch 'feature/notifications_refresh_p1' into issue/20024-like…
Browse files Browse the repository at this point in the history
…-inline-action

# Conflicts:
#	WordPress/src/main/java/org/wordpress/android/ui/notifications/adapters/NotesAdapter.java
  • Loading branch information
Jarvis Lin committed Feb 7, 2024
2 parents 25fd354 + fa83b6f commit ac7d04c
Show file tree
Hide file tree
Showing 268 changed files with 7,251 additions and 3,991 deletions.
3 changes: 2 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ Fixes #

-----

## UI Changes Testing Checklist:
## Testing Checklist:

- [ ] WordPress.com sites and self-hosted Jetpack sites.
- [ ] Portrait and landscape orientations.
- [ ] Light and dark modes.
- [ ] Fonts: Larger, smaller and bold text.
Expand Down
6 changes: 6 additions & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
*** PLEASE FOLLOW THIS FORMAT: [<priority indicator, more stars = higher priority>] <description> [<PR URL>]

24.3
-----


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]
* [***] [Jetpack-only] Reader: introduced new UI/UX for content navigation and filtering [https://github.com/wordpress-mobile/WordPress-Android/pull/19978]

24.1
-----
Expand Down
13 changes: 11 additions & 2 deletions WordPress/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,14 @@ dependencies {
implementation "com.google.android.play:review:$googlePlayReviewVersion"
implementation "com.google.android.play:review-ktx:$googlePlayReviewVersion"
implementation "com.google.android.gms:play-services-auth:$googlePlayServicesAuthVersion"
implementation "com.google.android.gms:play-services-code-scanner:$googlePlayServicesCodeScannerVersion"
implementation "com.google.mlkit:barcode-scanning-common:$googleMLKitBarcodeScanningVersion"
implementation "com.google.mlkit:barcode-scanning-common:$googleMLKitBarcodeScanningCommonVersion"
implementation "com.google.mlkit:text-recognition:$googleMLKitTextRecognitionVersion"
implementation "com.google.mlkit:barcode-scanning:$googleMLKitBarcodeScanningVersion"

// CameraX
implementation "androidx.camera:camera-camera2:$androidxCameraVersion"
implementation "androidx.camera:camera-lifecycle:$androidxCameraVersion"
implementation "androidx.camera:camera-view:$androidxCameraVersion"

implementation "com.android.installreferrer:installreferrer:$androidInstallReferrerVersion"
implementation "com.github.chrisbanes:PhotoView:$chrisbanesPhotoviewVersion"
Expand Down Expand Up @@ -555,6 +561,9 @@ dependencies {
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'
Expand Down
10 changes: 4 additions & 6 deletions WordPress/jetpack_metadata/release_notes.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
- Get notified when you’re working offline.
- Image block uploads pause/resume with internet connection.
- See custom gradient selections in the editor.
- Fixed forward/back arrows for right-to-left readers.
- Daily Prompt tags work properly.
- Tap Site Domain cards to manage domains.
* [**] 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]
* [***] [Jetpack-only] Reader: introduced new UI/UX for content navigation and filtering [https://github.com/wordpress-mobile/WordPress-Android/pull/19978]
6 changes: 2 additions & 4 deletions WordPress/metadata/release_notes.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
- Get notified when you’re working offline.
- Image block uploads pause when you lose internet and resume when you reconnect.
- Select a custom gradient in the editor and see a color indicator.
- “Forward” and “back” arrows are correct for right-to-left readers.
* [**] Fix editor crash occurring on large posts [https://github.com/wordpress-mobile/WordPress-Android/pull/20046]
* [**] Prevent images from temporarily disappearing when uploading media [https://github.com/WordPress/gutenberg/pull/57869]
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package org.wordpress.android.e2e

import dagger.hilt.android.testing.HiltAndroidTest
import org.junit.Before
import org.junit.Ignore
import org.junit.Test
import org.wordpress.android.e2e.pages.ReaderPage
import org.wordpress.android.support.BaseTest
Expand All @@ -18,6 +19,7 @@ class ReaderTests : BaseTest() {
}

@Test
@Ignore("Ignored for now considering the context of Reader IA feature that completely changes the Reader design")
fun e2eNavigateThroughPosts() {
ReaderPage()
.tapFollowingTab()
Expand All @@ -31,6 +33,7 @@ class ReaderTests : BaseTest() {
}

@Test
@Ignore("Ignored for now considering the context of Reader IA feature that completely changes the Reader design")
fun e2eLikePost() {
ReaderPage()
.tapFollowingTab()
Expand All @@ -43,6 +46,7 @@ class ReaderTests : BaseTest() {
}

@Test
@Ignore("Ignored for now considering the context of Reader IA feature that completely changes the Reader design")
fun e2eBookmarkPost() {
ReaderPage()
.tapFollowingTab()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -658,14 +658,14 @@ public static String getOldestDateWithTag(final ReaderTag tag) {
public static String getOldestPubDateInBlog(long blogId) {
String sql = "SELECT date_published FROM tbl_posts"
+ " WHERE blog_id=? AND tag_name='' AND tag_type=0"
+ " ORDER BY date_published LIMIT 1";
+ " ORDER BY datetime(date_published) LIMIT 1";
return SqlUtils.stringForQuery(ReaderDatabase.getReadableDb(), sql, new String[]{Long.toString(blogId)});
}

public static String getOldestPubDateInFeed(long feedId) {
String sql = "SELECT date_published FROM tbl_posts"
+ " WHERE feed_id=? AND tag_name='' AND tag_type=0"
+ " ORDER BY date_published LIMIT 1";
+ " ORDER BY datetime(date_published) LIMIT 1";
return SqlUtils.stringForQuery(ReaderDatabase.getReadableDb(), sql, new String[]{Long.toString(feedId)});
}

Expand Down Expand Up @@ -743,15 +743,15 @@ public static String getGapMarkerDateForTag(ReaderTag tag) {
*/
private static String getSortColumnForTag(ReaderTag tag) {
if (tag.isPostsILike()) {
return "date_liked";
return "datetime(date_liked)";
} else if (tag.isFollowedSites()) {
return "date_published";
return "datetime(date_published)";
} else if (tag.tagType == ReaderTagType.SEARCH) {
return "score";
} else if (tag.isTagTopic() || tag.isBookmarked()) {
return "date_tagged";
return "datetime(date_tagged)";
} else {
return "date_published";
return "datetime(date_published)";
}
}

Expand Down Expand Up @@ -982,7 +982,7 @@ public static ReaderPostList getPostsInBlog(long blogId, int maxPosts, boolean e
String columns = (excludeTextColumn ? COLUMN_NAMES_NO_TEXT : "*");
String sql =
"SELECT " + columns + " FROM tbl_posts WHERE blog_id=? AND tag_name='' AND tag_type=0"
+ " ORDER BY date_published DESC";
+ " ORDER BY datetime(date_published) DESC";

if (maxPosts > 0) {
sql += " LIMIT " + maxPosts;
Expand Down Expand Up @@ -1020,7 +1020,7 @@ public static ReaderPostList getPostsInFeed(long feedId, int maxPosts, boolean e
String columns = (excludeTextColumn ? COLUMN_NAMES_NO_TEXT : "*");
String sql =
"SELECT " + columns + " FROM tbl_posts WHERE feed_id=? AND tag_name='' AND tag_type=0"
+ " ORDER BY date_published DESC";
+ " ORDER BY datetime(date_published) DESC";

if (maxPosts > 0) {
sql += " LIMIT " + maxPosts;
Expand Down Expand Up @@ -1097,7 +1097,7 @@ private static ReaderBlogIdPostIdList getBlogIdPostIds(@NonNull String sql, @Non
*/
public static ReaderBlogIdPostIdList getBlogIdPostIdsInBlog(long blogId, int maxPosts) {
String sql = "SELECT post_id FROM tbl_posts WHERE blog_id=? AND tag_name='' AND tag_type=0"
+ " ORDER BY date_published DESC";
+ " ORDER BY datetime(date_published) DESC";

if (maxPosts > 0) {
sql += " LIMIT " + maxPosts;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package org.wordpress.android.designsystem

import android.content.res.Configuration
import android.os.Bundle
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.runtime.Composable
import androidx.compose.ui.tooling.preview.Preview
import org.wordpress.android.ui.LocaleAwareActivity
Expand All @@ -10,8 +11,10 @@ import org.wordpress.android.util.extensions.setContent
class DesignSystemActivity : LocaleAwareActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
DesignSystem(onBackPressedDispatcher::onBackPressed)
setContent {
DesignSystemTheme(isSystemInDarkTheme()) {
DesignSystem(onBackPressedDispatcher::onBackPressed)
}
}
}

Expand All @@ -21,11 +24,10 @@ class DesignSystemActivity : LocaleAwareActivity() {
showBackground = true,
name = "Dark Mode"
)

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


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

import androidx.compose.runtime.Stable
import androidx.compose.ui.graphics.Color

/**
* Object containing static common colors used throughout the project. Note that the colors here are not SEMANTIC,
* meaning they don't represent the usage of the color (e.g.: PrimaryButtonBackground) but instead they are raw
* colors used throughout this app's design (e.g.: Green50).
*/
object DesignSystemAppColor {
// Black & White
@Stable
val Black = Color(0xFF000000)

@Stable
val White = Color(0xFFFFFFFF)

// Grays
@Stable
val Gray = Color(0xFFF2F2F7)

@Stable
val Gray10 = Color(0xFFC2C2C6)

@Stable
val Gray20 = Color(0x99EBEBF5)

@Stable
val Gray30 = Color(0xFF9B9B9E)

@Stable
val Gray40 = Color(0x993C3C43)

@Stable
val Gray50 = Color(0x4D3C3C43)

@Stable
val Gray60 = Color(0xFF4E4E4F)

@Stable
val Gray70 = Color(0xFF3A3A3C)

@Stable
val Gray80 = Color(0xFF2C2C2E)

// Blues
@Stable
val Blue = Color(0xFF0675C4)

@Stable
val Blue10 = Color(0xFF399CE3)

@Stable
val Blue20 = Color(0xFF1689DB)

// Greens
@Stable
val Green = Color(0xFF008710)

@Stable
val Green10 = Color(0xFF2FB41F)

@Stable
val Green20 = Color(0xFF069E08)

// Reds
@Stable
val Red = Color(0xFFD63638)

@Stable
val Red10 = Color(0xFFE65054)

// Oranges
@Stable
val Orange = Color(0xFFD67709)

@Stable
val Orange10 = Color(0xFFE68B28)
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package org.wordpress.android.designsystem

import androidx.annotation.StringRes
import androidx.compose.foundation.background
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.widthIn
Expand Down Expand Up @@ -37,7 +39,10 @@ fun SelectOptionButton(
Button(
onClick = onClick,
modifier = modifier.widthIn(min = 250.dp),
colors = ButtonDefaults.buttonColors(containerColor = MaterialTheme.colorScheme.primary)
colors = ButtonDefaults.buttonColors(
containerColor = MaterialTheme.colorScheme.brand,
contentColor = MaterialTheme.colorScheme.primaryContainer
)
) {
Text(stringResource(labelResourceId))
}
Expand All @@ -46,7 +51,9 @@ fun SelectOptionButton(
@Preview
@Composable
fun StartDesignSystemPreview(){
DesignSystem {}
DesignSystemTheme(isSystemInDarkTheme()) {
DesignSystem {}
}
}

@Composable
Expand All @@ -60,18 +67,19 @@ fun DesignSystem(
title = stringResource(R.string.preference_design_system),
navigationIcon = NavigationIcons.BackIcon,
onNavigationIconClick = { onBackTapped() },
backgroundColor = MaterialTheme.colorScheme.surface,
contentColor = MaterialTheme.colorScheme.onSurface,
backgroundColor = MaterialTheme.colorScheme.primaryContainer,
contentColor = MaterialTheme.colorScheme.primary,
)
},
}
) { innerPadding ->
NavHost(
modifier = Modifier.background(MaterialTheme.colorScheme.primaryContainer),
navController = navController,
startDestination = DesignSystemScreen.Start.name
) {
composable(route = DesignSystemScreen.Start.name) {
DesignSystemStartScreen(
onNextButtonClicked = {
onButtonClicked = {
navController.navigate(it)
},
modifier = Modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import org.wordpress.android.R

@Composable
fun DesignSystemStartScreen(
onNextButtonClicked: (String) -> Unit,
onButtonClicked: (String) -> Unit,
modifier: Modifier = Modifier
) {
LazyColumn (
Expand All @@ -27,7 +27,7 @@ fun DesignSystemStartScreen(
DesignSystemDataSource.startScreenButtonOptions.forEach { item ->
SelectOptionButton(
labelResourceId = item.first,
onClick = { onNextButtonClicked(item.second) }
onClick = { onButtonClicked(item.second) }
)
}
}
Expand All @@ -38,7 +38,7 @@ fun DesignSystemStartScreen(
@Composable
fun StartDesignSystemStartScreenPreview(){
DesignSystemStartScreen(
onNextButtonClicked = {},
onButtonClicked = {},
modifier = Modifier
.fillMaxSize()
.padding(dimensionResource(R.dimen.button_container_shadow_height))
Expand Down
Loading

0 comments on commit ac7d04c

Please sign in to comment.