From 3ed0f1f11a8e2c33098ab067d7f411f20fabae7b Mon Sep 17 00:00:00 2001 From: ashiagr Date: Tue, 2 Jun 2020 10:27:08 +0530 Subject: [PATCH 01/12] Do not translate dot separator --- WordPress/src/main/res/values/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPress/src/main/res/values/strings.xml b/WordPress/src/main/res/values/strings.xml index 29e983a145e1..d94462bd156d 100644 --- a/WordPress/src/main/res/values/strings.xml +++ b/WordPress/src/main/res/values/strings.xml @@ -1304,7 +1304,7 @@ Follow a site Add a tag Log in to WordPress.com - \u0020\u2022\u0020 + \u0020\u2022\u0020 Post saved online From d72fd919d413423ed5fe5b8d40e6a5b39d799cf9 Mon Sep 17 00:00:00 2001 From: vojtasmrcek Date: Tue, 2 Jun 2020 09:18:25 +0200 Subject: [PATCH 02/12] Fix incorrect translation --- WordPress/src/main/res/values/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPress/src/main/res/values/strings.xml b/WordPress/src/main/res/values/strings.xml index d94462bd156d..0684327f508a 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 From bbcbae9f32cb0cea1dbf7dd5215d937f34fb70fc Mon Sep 17 00:00:00 2001 From: vojtasmrcek Date: Wed, 3 Jun 2020 14:17:06 +0200 Subject: [PATCH 03/12] Add homepage indicators to pages list --- .../wordpress/android/ui/pages/PageItem.kt | 5 ++ .../android/ui/pages/PageItemViewHolder.kt | 16 ++++- .../viewmodel/pages/PageListViewModel.kt | 60 ++++++++++--------- .../viewmodel/pages/SearchListViewModel.kt | 24 ++++---- .../src/main/res/layout/page_list_item.xml | 8 +-- WordPress/src/main/res/values/strings.xml | 1 + .../viewmodel/pages/PagesViewModelTest.kt | 2 +- .../pages/SearchListViewModelTest.kt | 36 +++++------ 8 files changed, 88 insertions(+), 64 deletions(-) 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..eeac642a0fb3 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,11 +261,11 @@ class PageListViewModel @Inject constructor( DEFAULT_INDENT } val itemUiStateData = createItemUiStateData(it) - PublishedPage( it.remoteId, it.pageId, it.title, + itemUiStateData.subtitle, it.date, itemUiStateData.labels, itemUiStateData.labelsColor, @@ -292,14 +292,14 @@ class PageListViewModel @Inject constructor( ScheduledPage( it.remoteId, it.pageId, it.title, - it.date, - itemUiStateData.labels, - itemUiStateData.labelsColor, - getFeaturedImageUrl(it.featuredImageId), - itemUiStateData.actions, - actionsEnabled, - itemUiStateData.progressBarUiState, - itemUiStateData.showOverlay + date = it.date, + labels = itemUiStateData.labels, + labelsColor = itemUiStateData.labelsColor, + imageUrl = getFeaturedImageUrl(it.featuredImageId), + actions = itemUiStateData.actions, + actionsEnabled = actionsEnabled, + progressBarUiState = itemUiStateData.progressBarUiState, + showOverlay = itemUiStateData.showOverlay ) } } @@ -316,14 +316,14 @@ class PageListViewModel @Inject constructor( it.remoteId, it.pageId, it.title, - it.date, - itemUiStateData.labels, - itemUiStateData.labelsColor, - getFeaturedImageUrl(it.featuredImageId), - itemUiStateData.actions, - actionsEnabled, - itemUiStateData.progressBarUiState, - itemUiStateData.showOverlay + date = it.date, + labels = itemUiStateData.labels, + labelsColor = itemUiStateData.labelsColor, + imageUrl = getFeaturedImageUrl(it.featuredImageId), + actions = itemUiStateData.actions, + actionsEnabled = actionsEnabled, + progressBarUiState = itemUiStateData.progressBarUiState, + showOverlay = itemUiStateData.showOverlay ) } } @@ -338,14 +338,14 @@ class PageListViewModel @Inject constructor( it.remoteId, it.pageId, it.title, - it.date, - itemUiStateData.labels, - itemUiStateData.labelsColor, - getFeaturedImageUrl(it.featuredImageId), - itemUiStateData.actions, - actionsEnabled, - itemUiStateData.progressBarUiState, - itemUiStateData.showOverlay + 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 +401,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 +414,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..8513dc9ec414 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 @@ -108,9 +108,9 @@ class SearchListViewModel remoteId, pageId, title, - date, - labels, - labelColor, + date = date, + labels = labels, + labelsColor = labelColor, actions = pageListItemActionsUseCase.setupPageActions( PUBLISHED, uploadUiState, @@ -125,9 +125,9 @@ class SearchListViewModel remoteId, pageId, title, - date, - labels, - labelColor, + date = date, + labels = labels, + labelsColor = labelColor, actions = pageListItemActionsUseCase.setupPageActions( DRAFTS, uploadUiState, @@ -142,9 +142,9 @@ class SearchListViewModel remoteId, pageId, title, - date, - labels, - labelColor, + date = date, + labels = labels, + labelsColor = labelColor, actions = pageListItemActionsUseCase.setupPageActions( TRASHED, uploadUiState, @@ -159,9 +159,9 @@ class SearchListViewModel remoteId, pageId, title, - date, - labels, - labelColor, + 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 0684327f508a..5ce6e1cb310c 100644 --- a/WordPress/src/main/res/values/strings.xml +++ b/WordPress/src/main/res/values/strings.xml @@ -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..f7bac88fe538 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 @@ -337,7 +337,7 @@ class PagesViewModelTest { remoteId, 2, "Published page", - Date(), + 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..2d68502d3d9f 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 @@ -148,15 +148,15 @@ class SearchListViewModelTest { 1, 1, "title", - Date(), - listOf(), - 0, - 0, - null, - mock(), - false, - ProgressBarUiState.Hidden, - false + date = Date(), + labels = listOf(), + labelsColor = 0, + indent = 0, + imageUrl = null, + actions = mock(), + actionsEnabled = false, + progressBarUiState = ProgressBarUiState.Hidden, + showOverlay = false ) val action = VIEW_PAGE @@ -171,15 +171,15 @@ class SearchListViewModelTest { 1, 1, "title", - Date(), - listOf(), - 0, - 0, - null, - mock(), - false, - ProgressBarUiState.Hidden, - false + date = Date(), + labels = listOf(), + labelsColor = 0, + indent = 0, + imageUrl = null, + actions = mock(), + actionsEnabled = false, + progressBarUiState = ProgressBarUiState.Hidden, + showOverlay = false ) viewModel.onItemTapped(clickedPage) From 1b3ef9fcdb4ec465e92fc07cc4ddbe78a66c452f Mon Sep 17 00:00:00 2001 From: vojtasmrcek Date: Wed, 3 Jun 2020 14:57:21 +0200 Subject: [PATCH 04/12] Fix ktlint issue --- .../wordpress/android/viewmodel/pages/PageListViewModel.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 eeac642a0fb3..60e8af5e1193 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 @@ -401,7 +401,7 @@ class PageListViewModel @Inject constructor( pagesViewModel.site, pageModel.remoteId ) - val subtitle = when(pageModel.remoteId) { + val subtitle = when (pageModel.remoteId) { pagesViewModel.site.pageOnFront -> R.string.site_settings_homepage pagesViewModel.site.pageForPosts -> R.string.site_settings_posts_page else -> null @@ -415,6 +415,6 @@ class PageListViewModel @Inject constructor( val progressBarUiState: ProgressBarUiState, val showOverlay: Boolean, val actions: Set, - val subtitle: Int? = null + val subtitle: Int? = null ) } From 9cfbc97042fcb21d67e8a28a83d6b443eff28b14 Mon Sep 17 00:00:00 2001 From: vojtasmrcek Date: Wed, 3 Jun 2020 15:06:43 +0200 Subject: [PATCH 05/12] Add names to all the parameters of Page constructors --- .../viewmodel/pages/PageListViewModel.kt | 42 +++++++++---------- .../viewmodel/pages/SearchListViewModel.kt | 24 +++++------ .../pages/SearchListViewModelTest.kt | 12 +++--- 3 files changed, 39 insertions(+), 39 deletions(-) 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 60e8af5e1193..5c64ce73966c 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 @@ -262,19 +262,19 @@ class PageListViewModel @Inject constructor( } val itemUiStateData = createItemUiStateData(it) PublishedPage( - it.remoteId, - it.pageId, - it.title, - itemUiStateData.subtitle, - 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,8 +290,8 @@ class PageListViewModel @Inject constructor( val itemUiStateData = createItemUiStateData(it) ScheduledPage( - it.remoteId, it.pageId, - it.title, + it.remoteId, localId = it.pageId, + title = it.title, date = it.date, labels = itemUiStateData.labels, labelsColor = itemUiStateData.labelsColor, @@ -313,9 +313,9 @@ class PageListViewModel @Inject constructor( return pages.map { val itemUiStateData = createItemUiStateData(it) DraftPage( - it.remoteId, - it.pageId, - it.title, + remoteId = it.remoteId, + localId = it.pageId, + title = it.title, date = it.date, labels = itemUiStateData.labels, labelsColor = itemUiStateData.labelsColor, @@ -335,9 +335,9 @@ class PageListViewModel @Inject constructor( return pages.map { val itemUiStateData = createItemUiStateData(it) TrashedPage( - it.remoteId, - it.pageId, - it.title, + remoteId = it.remoteId, + localId = it.pageId, + title = it.title, date = it.date, labels = itemUiStateData.labels, labelsColor = itemUiStateData.labelsColor, 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 8513dc9ec414..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,9 +105,9 @@ class SearchListViewModel return when (status) { PageStatus.PUBLISHED, PageStatus.PRIVATE -> PublishedPage( - remoteId, - pageId, - title, + remoteId = remoteId, + localId = pageId, + title = title, date = date, labels = labels, labelsColor = labelColor, @@ -122,9 +122,9 @@ class SearchListViewModel showOverlay = showOverlay ) PageStatus.DRAFT, PageStatus.PENDING -> DraftPage( - remoteId, - pageId, - title, + remoteId = remoteId, + localId = pageId, + title = title, date = date, labels = labels, labelsColor = labelColor, @@ -139,9 +139,9 @@ class SearchListViewModel showOverlay = showOverlay ) PageStatus.TRASHED -> TrashedPage( - remoteId, - pageId, - title, + remoteId = remoteId, + localId = pageId, + title = title, date = date, labels = labels, labelsColor = labelColor, @@ -156,9 +156,9 @@ class SearchListViewModel showOverlay = showOverlay ) PageStatus.SCHEDULED -> ScheduledPage( - remoteId, - pageId, - title, + remoteId = remoteId, + localId = pageId, + title = title, date = date, labels = labels, labelsColor = labelColor, 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 2d68502d3d9f..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,9 +145,9 @@ class SearchListViewModelTest { @Test fun `passes action to page view model on menu action`() { val clickedPage = PageItem.PublishedPage( - 1, - 1, - "title", + remoteId = 1, + localId = 1, + title = "title", date = Date(), labels = listOf(), labelsColor = 0, @@ -168,9 +168,9 @@ class SearchListViewModelTest { @Test fun `passes page to page view model on item tapped`() { val clickedPage = PageItem.PublishedPage( - 1, - 1, - "title", + remoteId = 1, + localId = 1, + title = "title", date = Date(), labels = listOf(), labelsColor = 0, From 2f3dabdde5d50830296a8126c8baec81b9fefc2e Mon Sep 17 00:00:00 2001 From: vojtasmrcek Date: Wed, 3 Jun 2020 15:12:08 +0200 Subject: [PATCH 06/12] Add missing named argument --- .../org/wordpress/android/viewmodel/pages/PageListViewModel.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 5c64ce73966c..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 @@ -290,7 +290,8 @@ class PageListViewModel @Inject constructor( val itemUiStateData = createItemUiStateData(it) ScheduledPage( - it.remoteId, localId = it.pageId, + remoteId = it.remoteId, + localId = it.pageId, title = it.title, date = it.date, labels = itemUiStateData.labels, From 5d6345baca24f2acae98f801f85a8111d415abe4 Mon Sep 17 00:00:00 2001 From: vojtasmrcek Date: Wed, 3 Jun 2020 15:12:48 +0200 Subject: [PATCH 07/12] Add missing named argument in a test --- .../wordpress/android/viewmodel/pages/PagesViewModelTest.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 f7bac88fe538..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,9 +334,9 @@ class PagesViewModelTest { } private fun getPublishedPage(remoteId: Long): PublishedPage = PublishedPage( - remoteId, - 2, - "Published page", + remoteId = remoteId, + localId = 2, + title = "Published page", date = Date(), actions = emptySet(), progressBarUiState = ProgressBarUiState.Hidden, From 7452047c4c5dfa037fb5c857c2d7d836c056db87 Mon Sep 17 00:00:00 2001 From: Oguz Kocer Date: Wed, 3 Jun 2020 09:15:45 -0400 Subject: [PATCH 08/12] Update release notes for 15.0 after editorial --- WordPress/metadata/release_notes.txt | 7 ++++--- WordPress/metadata/release_notes_short.txt | 4 +++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/WordPress/metadata/release_notes.txt b/WordPress/metadata/release_notes.txt index 96002ff4aa49..0544ffc9bc73 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. Undo/Redo work more consistently. +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..f1618c818537 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. Undo/Redo work more consistently. +Other updates: Added homepage settings to pages list and to site settings. From ac946e8120846c2f025aac78e3420b483026b0ae Mon Sep 17 00:00:00 2001 From: Oguz Kocer Date: Wed, 3 Jun 2020 09:16:05 -0400 Subject: [PATCH 09/12] Update metadata strings --- WordPress/metadata/PlayStoreStrings.po | 29 +++++++++++++------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/WordPress/metadata/PlayStoreStrings.po b/WordPress/metadata/PlayStoreStrings.po index 82536e6b8df8..4ffa0a945396 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. Undo/Redo work more consistently.\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. Undo/Redo work more consistently.\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." From 721093daae14c04db515a88d5691f4bfdaf295e8 Mon Sep 17 00:00:00 2001 From: Oguz Kocer Date: Thu, 4 Jun 2020 10:09:48 -0400 Subject: [PATCH 10/12] Bump version number --- WordPress/build.gradle | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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" From f38df9e032d2ed015fd8a8c26fda57de3e817824 Mon Sep 17 00:00:00 2001 From: Oguz Kocer Date: Fri, 5 Jun 2020 15:05:17 -0400 Subject: [PATCH 11/12] Remove 15.0 release note for undo/redo being more consistent --- WordPress/metadata/release_notes.txt | 2 +- WordPress/metadata/release_notes_short.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/WordPress/metadata/release_notes.txt b/WordPress/metadata/release_notes.txt index 0544ffc9bc73..6cb321b11b78 100644 --- a/WordPress/metadata/release_notes.txt +++ b/WordPress/metadata/release_notes.txt @@ -1,4 +1,4 @@ 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. Undo/Redo work more consistently. +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 f1618c818537..52d6729ec466 100644 --- a/WordPress/metadata/release_notes_short.txt +++ b/WordPress/metadata/release_notes_short.txt @@ -1,3 +1,3 @@ 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. Undo/Redo work more consistently. +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. From 803a0c272f9cc22d478badcf07aa0f86b5b3f9ba Mon Sep 17 00:00:00 2001 From: Oguz Kocer Date: Fri, 5 Jun 2020 15:05:29 -0400 Subject: [PATCH 12/12] Update metadata strings --- WordPress/metadata/PlayStoreStrings.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/WordPress/metadata/PlayStoreStrings.po b/WordPress/metadata/PlayStoreStrings.po index 4ffa0a945396..27e8980f3169 100644 --- a/WordPress/metadata/PlayStoreStrings.po +++ b/WordPress/metadata/PlayStoreStrings.po @@ -15,7 +15,7 @@ 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. Undo/Redo work more consistently.\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 "" @@ -33,7 +33,7 @@ msgctxt "release_note_short_150" msgid "" "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. Undo/Redo work more consistently.\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 ""