diff --git a/WordPress/build.gradle b/WordPress/build.gradle
index d2af31bd9f91..5905a5c6ba19 100644
--- a/WordPress/build.gradle
+++ b/WordPress/build.gradle
@@ -55,9 +55,9 @@ android {
if (project.hasProperty("versionName")) {
versionName project.property("versionName")
} else {
- versionName "alpha-226"
+ versionName "alpha-227"
}
- versionCode 875
+ versionCode 877
minSdkVersion rootProject.minSdkVersion
targetSdkVersion rootProject.targetSdkVersion
@@ -85,9 +85,9 @@ android {
dimension "buildType"
// Only set the release version if one isn't provided
if (!project.hasProperty("versionName")) {
- versionName "15.0-rc-1"
+ versionName "15.0-rc-2"
}
- versionCode 874
+ versionCode 876
buildConfigField "boolean", "ME_ACTIVITY_AVAILABLE", "false"
buildConfigField "boolean", "TENOR_AVAILABLE", "false"
buildConfigField "boolean", "READER_IMPROVEMENTS_PHASE_2", "false"
diff --git a/WordPress/metadata/PlayStoreStrings.po b/WordPress/metadata/PlayStoreStrings.po
index 82536e6b8df8..27e8980f3169 100644
--- a/WordPress/metadata/PlayStoreStrings.po
+++ b/WordPress/metadata/PlayStoreStrings.po
@@ -11,6 +11,15 @@ msgstr ""
"Project-Id-Version: Release Notes & Play Store Descriptions\n"
#. translators: Release notes for this version to be displayed in the Play Store. Limit to 500 characters including spaces and commas!
+msgctxt "release_note_150"
+msgid ""
+"15.0:\n"
+"Block editor additions: New Verse block. Support for overlay colors in Cover block. Enter/exit animation for the Floating Toolbar. Tooltip for page template selection buttons.\n"
+"Block editor updates: “Trash block” in a menu reachable from the block toolbar.\n"
+"Block editor fixes: Text block merging issue, button alignment in page templates, string inconsistencies.\n"
+"Other updates: Added homepage settings to pages list and to site settings. Improved Reader UI.\n"
+msgstr ""
+
msgctxt "release_note_149"
msgid ""
"14.9:\n"
@@ -19,29 +28,21 @@ msgid ""
"Block editor fixes: Free Photo Library bug that inserted single images even if several were selected, preview failure when switching to the classic editor. Removed non-functional Subscription Button from Blog template.\n"
msgstr ""
-msgctxt "release_note_148"
+#. translators: A shorter version of the Release notes to be displayed in the Play Store. Limit to 500 characters including spaces and commas!
+msgctxt "release_note_short_150"
msgid ""
-"14.8:\n"
-"Block editor additions: Buttons block displays multiple buttons in a single row; Image blocks prefill captions when available; Cover blocks allow uploading; inserted images can be cropped, zoomed, or rotated; Heading block includes alignment options.\n"
-"Block editor improvements: Relocated floating toolbar, fixed bug impact white space in Text blocks, fixed misaligned toolbar icons in RTL mode.\n"
-"General updates: Added reblog functionality.\n"
+"15.0:\n"
+"Block editor additions: New Verse block. Support for overlay colors in Cover block. Enter/exit animation for Floating Toolbar. Tooltip for page template selection buttons.\n"
+"Block editor updates: “Trash block” in a menu reachable from the block toolbar.\n"
+"Other updates: Added homepage settings to pages list and to site settings.\n"
msgstr ""
-#. translators: A shorter version of the Release notes to be displayed in the Play Store. Limit to 500 characters including spaces and commas!
msgctxt "release_note_short_149"
msgid ""
"14.9:\n"
"Block editor enhancements: New Pullquote block, Button block color options, updated page templates.\n"
msgstr ""
-msgctxt "release_note_short_148"
-msgid ""
-"14.8:\n"
-"Block editor additions: Buttons block displays multiple buttons in a single row; Image blocks prefill captions when available; Cover blocks allow uploading; inserted images can be cropped, zoomed, or rotated; Heading block includes alignment options.\n"
-"Block editor improvements: Relocated floating toolbar, fixed bug impact white space in Text blocks, fixed misaligned toolbar icons in RTL mode.\n"
-"General updates: Added reblog functionality.\n"
-msgstr ""
-
#. translators: Release notes for this version to be displayed in the Play Store. Limit to 500 characters including spaces and commas!
msgctxt "sample_post_content"
msgid "The best moment of any trip, for me, is when I first step foot off the plane. The whole of the trip is in front me, ripe with possibility."
diff --git a/WordPress/metadata/release_notes.txt b/WordPress/metadata/release_notes.txt
index 96002ff4aa49..6cb321b11b78 100644
--- a/WordPress/metadata/release_notes.txt
+++ b/WordPress/metadata/release_notes.txt
@@ -1,3 +1,4 @@
-Block editor enhancements: New Pullquote block, Button block color options, updated page templates.
-
-Block editor fixes: Free Photo Library bug that inserted single images even if several were selected, preview failure when switching to the classic editor. Removed non-functional Subscription Button from Blog template.
+Block editor additions: New Verse block. Support for overlay colors in Cover block. Enter/exit animation for the Floating Toolbar. Tooltip for page template selection buttons.
+Block editor updates: “Trash block” in a menu reachable from the block toolbar.
+Block editor fixes: Text block merging issue, button alignment in page templates, string inconsistencies.
+Other updates: Added homepage settings to pages list and to site settings. Improved Reader UI.
diff --git a/WordPress/metadata/release_notes_short.txt b/WordPress/metadata/release_notes_short.txt
index 30920e21d21f..52d6729ec466 100644
--- a/WordPress/metadata/release_notes_short.txt
+++ b/WordPress/metadata/release_notes_short.txt
@@ -1 +1,3 @@
-Block editor enhancements: New Pullquote block, Button block color options, updated page templates.
\ No newline at end of file
+Block editor additions: New Verse block. Support for overlay colors in Cover block. Enter/exit animation for Floating Toolbar. Tooltip for page template selection buttons.
+Block editor updates: “Trash block” in a menu reachable from the block toolbar.
+Other updates: Added homepage settings to pages list and to site settings.
diff --git a/WordPress/src/main/java/org/wordpress/android/ui/pages/PageItem.kt b/WordPress/src/main/java/org/wordpress/android/ui/pages/PageItem.kt
index 5aee516fa480..a8a99d8d3d4f 100644
--- a/WordPress/src/main/java/org/wordpress/android/ui/pages/PageItem.kt
+++ b/WordPress/src/main/java/org/wordpress/android/ui/pages/PageItem.kt
@@ -16,6 +16,7 @@ sealed class PageItem(open val type: Type) {
open val remoteId: Long,
open val localId: Int,
open val title: String,
+ open val subtitle: Int? = null,
open val date: Date,
open val labels: List,
@ColorRes open val labelsColor: Int?,
@@ -32,6 +33,7 @@ sealed class PageItem(open val type: Type) {
override val remoteId: Long,
override val localId: Int,
override val title: String,
+ override val subtitle: Int? = null,
override val date: Date,
override val labels: List = emptyList(),
override val labelsColor: Int? = null,
@@ -61,6 +63,7 @@ sealed class PageItem(open val type: Type) {
override val remoteId: Long,
override val localId: Int,
override val title: String,
+ override val subtitle: Int? = null,
override val date: Date,
override val labels: List = emptyList(),
override val labelsColor: Int? = null,
@@ -89,6 +92,7 @@ sealed class PageItem(open val type: Type) {
override val remoteId: Long,
override val localId: Int,
override val title: String,
+ override val subtitle: Int? = null,
override val date: Date,
override val labels: List = emptyList(),
override val labelsColor: Int? = null,
@@ -117,6 +121,7 @@ sealed class PageItem(open val type: Type) {
override val remoteId: Long,
override val localId: Int,
override val title: String,
+ override val subtitle: Int? = null,
override val date: Date,
override val labels: List = emptyList(),
override val labelsColor: Int? = null,
diff --git a/WordPress/src/main/java/org/wordpress/android/ui/pages/PageItemViewHolder.kt b/WordPress/src/main/java/org/wordpress/android/ui/pages/PageItemViewHolder.kt
index 865a97511067..3e7063f8bffe 100644
--- a/WordPress/src/main/java/org/wordpress/android/ui/pages/PageItemViewHolder.kt
+++ b/WordPress/src/main/java/org/wordpress/android/ui/pages/PageItemViewHolder.kt
@@ -35,6 +35,7 @@ import org.wordpress.android.viewmodel.uistate.ProgressBarUiState
import org.wordpress.android.viewmodel.uistate.ProgressBarUiState.Determinate
import org.wordpress.android.viewmodel.uistate.ProgressBarUiState.Indeterminate
import java.util.Date
+import java.util.Locale
sealed class PageItemViewHolder(internal val parent: ViewGroup, @LayoutRes layout: Int) :
RecyclerView.ViewHolder(LayoutInflater.from(parent.context).inflate(layout, parent, false)) {
@@ -51,7 +52,7 @@ sealed class PageItemViewHolder(internal val parent: ViewGroup, @LayoutRes layou
) : PageItemViewHolder(parentView, R.layout.page_list_item) {
private val pageTitle = itemView.findViewById(R.id.page_title)
private val pageMore = itemView.findViewById(R.id.page_more)
- private val time = itemView.findViewById(R.id.time_posted)
+ private val pageSubtitle = itemView.findViewById(R.id.page_subtitle)
private val labels = itemView.findViewById(R.id.labels)
private val featuredImage = itemView.findViewById(R.id.featured_image)
private val uploadProgressBar: ProgressBar = itemView.findViewById(R.id.upload_progress)
@@ -80,8 +81,19 @@ sealed class PageItemViewHolder(internal val parent: ViewGroup, @LayoutRes layou
page.title
val date = if (page.date == Date(0)) Date() else page.date
- time.text = DateTimeUtils.javaDateToTimeSpan(date, parent.context)
+ val stringDate = DateTimeUtils.javaDateToTimeSpan(date, parent.context)
.capitalizeWithLocaleWithoutLint(parent.context.currentLocale)
+ val subtitle = page.subtitle
+ pageSubtitle.text = if (subtitle == null) {
+ stringDate
+ } else {
+ String.format(
+ Locale.getDefault(),
+ parent.context.getString(R.string.pages_item_subtitle),
+ stringDate,
+ parent.context.getString(subtitle)
+ )
+ }
labels.text = page.labels.map { uiHelper.getTextOfUiString(parent.context, it) }.sorted()
.joinToString(separator = " · ")
diff --git a/WordPress/src/main/java/org/wordpress/android/viewmodel/pages/PageListViewModel.kt b/WordPress/src/main/java/org/wordpress/android/viewmodel/pages/PageListViewModel.kt
index b3a03f3a626d..fae39e1263e4 100644
--- a/WordPress/src/main/java/org/wordpress/android/viewmodel/pages/PageListViewModel.kt
+++ b/WordPress/src/main/java/org/wordpress/android/viewmodel/pages/PageListViewModel.kt
@@ -261,20 +261,20 @@ class PageListViewModel @Inject constructor(
DEFAULT_INDENT
}
val itemUiStateData = createItemUiStateData(it)
-
PublishedPage(
- it.remoteId,
- it.pageId,
- it.title,
- it.date,
- itemUiStateData.labels,
- itemUiStateData.labelsColor,
- pageItemIndent,
- getFeaturedImageUrl(it.featuredImageId),
- itemUiStateData.actions,
- actionsEnabled,
- itemUiStateData.progressBarUiState,
- itemUiStateData.showOverlay
+ remoteId = it.remoteId,
+ localId = it.pageId,
+ title = it.title,
+ subtitle = itemUiStateData.subtitle,
+ date = it.date,
+ labels = itemUiStateData.labels,
+ labelsColor = itemUiStateData.labelsColor,
+ indent = pageItemIndent,
+ imageUrl = getFeaturedImageUrl(it.featuredImageId),
+ actions = itemUiStateData.actions,
+ actionsEnabled = actionsEnabled,
+ progressBarUiState = itemUiStateData.progressBarUiState,
+ showOverlay = itemUiStateData.showOverlay
)
}
}
@@ -290,16 +290,17 @@ class PageListViewModel @Inject constructor(
val itemUiStateData = createItemUiStateData(it)
ScheduledPage(
- it.remoteId, it.pageId,
- it.title,
- it.date,
- itemUiStateData.labels,
- itemUiStateData.labelsColor,
- getFeaturedImageUrl(it.featuredImageId),
- itemUiStateData.actions,
- actionsEnabled,
- itemUiStateData.progressBarUiState,
- itemUiStateData.showOverlay
+ remoteId = it.remoteId,
+ localId = it.pageId,
+ title = it.title,
+ date = it.date,
+ labels = itemUiStateData.labels,
+ labelsColor = itemUiStateData.labelsColor,
+ imageUrl = getFeaturedImageUrl(it.featuredImageId),
+ actions = itemUiStateData.actions,
+ actionsEnabled = actionsEnabled,
+ progressBarUiState = itemUiStateData.progressBarUiState,
+ showOverlay = itemUiStateData.showOverlay
)
}
}
@@ -313,17 +314,17 @@ class PageListViewModel @Inject constructor(
return pages.map {
val itemUiStateData = createItemUiStateData(it)
DraftPage(
- it.remoteId,
- it.pageId,
- it.title,
- it.date,
- itemUiStateData.labels,
- itemUiStateData.labelsColor,
- getFeaturedImageUrl(it.featuredImageId),
- itemUiStateData.actions,
- actionsEnabled,
- itemUiStateData.progressBarUiState,
- itemUiStateData.showOverlay
+ remoteId = it.remoteId,
+ localId = it.pageId,
+ title = it.title,
+ date = it.date,
+ labels = itemUiStateData.labels,
+ labelsColor = itemUiStateData.labelsColor,
+ imageUrl = getFeaturedImageUrl(it.featuredImageId),
+ actions = itemUiStateData.actions,
+ actionsEnabled = actionsEnabled,
+ progressBarUiState = itemUiStateData.progressBarUiState,
+ showOverlay = itemUiStateData.showOverlay
)
}
}
@@ -335,17 +336,17 @@ class PageListViewModel @Inject constructor(
return pages.map {
val itemUiStateData = createItemUiStateData(it)
TrashedPage(
- it.remoteId,
- it.pageId,
- it.title,
- it.date,
- itemUiStateData.labels,
- itemUiStateData.labelsColor,
- getFeaturedImageUrl(it.featuredImageId),
- itemUiStateData.actions,
- actionsEnabled,
- itemUiStateData.progressBarUiState,
- itemUiStateData.showOverlay
+ remoteId = it.remoteId,
+ localId = it.pageId,
+ title = it.title,
+ date = it.date,
+ labels = itemUiStateData.labels,
+ labelsColor = itemUiStateData.labelsColor,
+ imageUrl = getFeaturedImageUrl(it.featuredImageId),
+ actions = itemUiStateData.actions,
+ actionsEnabled = actionsEnabled,
+ progressBarUiState = itemUiStateData.progressBarUiState,
+ showOverlay = itemUiStateData.showOverlay
)
}
}
@@ -401,7 +402,12 @@ class PageListViewModel @Inject constructor(
pagesViewModel.site,
pageModel.remoteId
)
- return ItemUiStateData(labels, labelColor, progressBarUiState, showOverlay, actions)
+ val subtitle = when (pageModel.remoteId) {
+ pagesViewModel.site.pageOnFront -> R.string.site_settings_homepage
+ pagesViewModel.site.pageForPosts -> R.string.site_settings_posts_page
+ else -> null
+ }
+ return ItemUiStateData(labels, labelColor, progressBarUiState, showOverlay, actions, subtitle)
}
private data class ItemUiStateData(
@@ -409,6 +415,7 @@ class PageListViewModel @Inject constructor(
@ColorRes val labelsColor: Int?,
val progressBarUiState: ProgressBarUiState,
val showOverlay: Boolean,
- val actions: Set
+ val actions: Set,
+ val subtitle: Int? = null
)
}
diff --git a/WordPress/src/main/java/org/wordpress/android/viewmodel/pages/SearchListViewModel.kt b/WordPress/src/main/java/org/wordpress/android/viewmodel/pages/SearchListViewModel.kt
index 3d8c5f35e5ba..f95876dd85e2 100644
--- a/WordPress/src/main/java/org/wordpress/android/viewmodel/pages/SearchListViewModel.kt
+++ b/WordPress/src/main/java/org/wordpress/android/viewmodel/pages/SearchListViewModel.kt
@@ -105,12 +105,12 @@ class SearchListViewModel
return when (status) {
PageStatus.PUBLISHED, PageStatus.PRIVATE ->
PublishedPage(
- remoteId,
- pageId,
- title,
- date,
- labels,
- labelColor,
+ remoteId = remoteId,
+ localId = pageId,
+ title = title,
+ date = date,
+ labels = labels,
+ labelsColor = labelColor,
actions = pageListItemActionsUseCase.setupPageActions(
PUBLISHED,
uploadUiState,
@@ -122,12 +122,12 @@ class SearchListViewModel
showOverlay = showOverlay
)
PageStatus.DRAFT, PageStatus.PENDING -> DraftPage(
- remoteId,
- pageId,
- title,
- date,
- labels,
- labelColor,
+ remoteId = remoteId,
+ localId = pageId,
+ title = title,
+ date = date,
+ labels = labels,
+ labelsColor = labelColor,
actions = pageListItemActionsUseCase.setupPageActions(
DRAFTS,
uploadUiState,
@@ -139,12 +139,12 @@ class SearchListViewModel
showOverlay = showOverlay
)
PageStatus.TRASHED -> TrashedPage(
- remoteId,
- pageId,
- title,
- date,
- labels,
- labelColor,
+ remoteId = remoteId,
+ localId = pageId,
+ title = title,
+ date = date,
+ labels = labels,
+ labelsColor = labelColor,
actions = pageListItemActionsUseCase.setupPageActions(
TRASHED,
uploadUiState,
@@ -156,12 +156,12 @@ class SearchListViewModel
showOverlay = showOverlay
)
PageStatus.SCHEDULED -> ScheduledPage(
- remoteId,
- pageId,
- title,
- date,
- labels,
- labelColor,
+ remoteId = remoteId,
+ localId = pageId,
+ title = title,
+ date = date,
+ labels = labels,
+ labelsColor = labelColor,
actions = pageListItemActionsUseCase.setupPageActions(
SCHEDULED,
uploadUiState,
diff --git a/WordPress/src/main/res/layout/page_list_item.xml b/WordPress/src/main/res/layout/page_list_item.xml
index 729fad1045de..1783f1837355 100644
--- a/WordPress/src/main/res/layout/page_list_item.xml
+++ b/WordPress/src/main/res/layout/page_list_item.xml
@@ -31,7 +31,7 @@
android:textAppearance="?attr/textAppearanceSubtitle1"
android:textAlignment="textStart"
android:textStyle="bold"
- app:layout_constraintBottom_toTopOf="@+id/time_posted"
+ app:layout_constraintBottom_toTopOf="@+id/page_subtitle"
app:layout_constraintEnd_toStartOf="@+id/featured_image"
app:layout_constraintHorizontal_bias="0"
app:layout_constraintStart_toStartOf="parent"
@@ -41,7 +41,7 @@
tools:text="Porro totam quia architecto ducimus laudantium minus autem"/>
diff --git a/WordPress/src/main/res/values/strings.xml b/WordPress/src/main/res/values/strings.xml
index 29e983a145e1..5ce6e1cb310c 100644
--- a/WordPress/src/main/res/values/strings.xml
+++ b/WordPress/src/main/res/values/strings.xml
@@ -248,7 +248,7 @@
Homepage successfully updated
Homepage update failed
Posts Page successfully updated
- Homepage update failed
+ Posts Page update failed
We cannot open the posts right now. Please try again later
@@ -1304,7 +1304,7 @@
Follow a site
Add a tag
Log in to WordPress.com
- \u0020\u2022\u0020
+ \u0020\u2022\u0020
Post saved online
@@ -2665,6 +2665,7 @@
The selected page is not available
Cancel upload
We cannot open pages at the moment. Please try again later
+ %1$s · %2$s
@string/post_status_pending_review
@string/post_status_post_private
diff --git a/WordPress/src/test/java/org/wordpress/android/viewmodel/pages/PagesViewModelTest.kt b/WordPress/src/test/java/org/wordpress/android/viewmodel/pages/PagesViewModelTest.kt
index 4e274fc8e363..564d5d91903a 100644
--- a/WordPress/src/test/java/org/wordpress/android/viewmodel/pages/PagesViewModelTest.kt
+++ b/WordPress/src/test/java/org/wordpress/android/viewmodel/pages/PagesViewModelTest.kt
@@ -334,10 +334,10 @@ class PagesViewModelTest {
}
private fun getPublishedPage(remoteId: Long): PublishedPage = PublishedPage(
- remoteId,
- 2,
- "Published page",
- Date(),
+ remoteId = remoteId,
+ localId = 2,
+ title = "Published page",
+ date = Date(),
actions = emptySet(),
progressBarUiState = ProgressBarUiState.Hidden,
showOverlay = false
diff --git a/WordPress/src/test/java/org/wordpress/android/viewmodel/pages/SearchListViewModelTest.kt b/WordPress/src/test/java/org/wordpress/android/viewmodel/pages/SearchListViewModelTest.kt
index 144d30a5e793..a717f0e8946b 100644
--- a/WordPress/src/test/java/org/wordpress/android/viewmodel/pages/SearchListViewModelTest.kt
+++ b/WordPress/src/test/java/org/wordpress/android/viewmodel/pages/SearchListViewModelTest.kt
@@ -145,18 +145,18 @@ class SearchListViewModelTest {
@Test
fun `passes action to page view model on menu action`() {
val clickedPage = PageItem.PublishedPage(
- 1,
- 1,
- "title",
- Date(),
- listOf(),
- 0,
- 0,
- null,
- mock(),
- false,
- ProgressBarUiState.Hidden,
- false
+ remoteId = 1,
+ localId = 1,
+ title = "title",
+ date = Date(),
+ labels = listOf(),
+ labelsColor = 0,
+ indent = 0,
+ imageUrl = null,
+ actions = mock(),
+ actionsEnabled = false,
+ progressBarUiState = ProgressBarUiState.Hidden,
+ showOverlay = false
)
val action = VIEW_PAGE
@@ -168,18 +168,18 @@ class SearchListViewModelTest {
@Test
fun `passes page to page view model on item tapped`() {
val clickedPage = PageItem.PublishedPage(
- 1,
- 1,
- "title",
- Date(),
- listOf(),
- 0,
- 0,
- null,
- mock(),
- false,
- ProgressBarUiState.Hidden,
- false
+ remoteId = 1,
+ localId = 1,
+ title = "title",
+ date = Date(),
+ labels = listOf(),
+ labelsColor = 0,
+ indent = 0,
+ imageUrl = null,
+ actions = mock(),
+ actionsEnabled = false,
+ progressBarUiState = ProgressBarUiState.Hidden,
+ showOverlay = false
)
viewModel.onItemTapped(clickedPage)