Skip to content

Commit 78e0a65

Browse files
authored
Merge branch 'master-auto-upload' into issue/10174-update-changes-confirmed-at
2 parents 0910bb0 + 18eee4b commit 78e0a65

File tree

47 files changed

+1160
-276
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1160
-276
lines changed

RELEASE-NOTES.txt

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,30 @@
1+
XX.X
2+
----
3+
* Add Remote Preview support for posts and pages.
4+
* Post List: Trashed post must now be restored before edit or preview.
5+
* All changes to posts and pages will be automatically synced with the server.
6+
17
13.1
28
-----
3-
* All changes to posts and pages will be automatically synced with the server.
4-
9+
* Added ability to switch between Desktop and Mobile versions of the content for Site and Page preview.
10+
* Improvement to the functionality and design of Web Preview.
11+
512
13.0
613
-----
7-
* Add Remote Preview support for posts and pages.
8-
* Post List: Trashed post must now be restored before edit or preview
9-
1014
* Block editor: Auto-enabled upon first open of a block post, unless opted out in v12.9.
1115
* Block editor: You can now enable and disable the block editor on a per-site basis.
1216
* Improve accessibility in the Stats
1317
* Block editor: Adding a block from the post title now shows the add block here indicator.
1418
* Block editor: Deselect post title any time a block is added
1519
* Block editor: Fix loss of center alignment in image captions
16-
20+
1721
12.9
1822
-----
1923
* Add Publish screen to Edit post settings - with notification for scheduled posts and option to add event to calendar
2024
* Block editor: Video block is now available in the Inserter
2125
* Block editor: Tapping on an empty editor area will create a new paragraph block
2226
* Block editor: Fix content loss issue when loading unsupported blocks containing inner blocks.
2327
* Block editor: Adding a block from the Post Title now inserts the block at the top of the Post.
24-
2528
* Setting featured image on a post doesn't require network connection
2629
* Full screen comments view
2730
* Added Domain Registration functionality for customers with unclaimed domain credit

WordPress/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ android {
4949

5050
defaultConfig {
5151
applicationId "org.wordpress.android"
52-
versionName "alpha-183"
53-
versionCode 762
52+
versionName "alpha-185"
53+
versionCode 766
5454
minSdkVersion 21
5555
targetSdkVersion 28
5656

@@ -74,8 +74,8 @@ android {
7474
productFlavors {
7575
vanilla { // used for release and beta
7676
dimension "buildType"
77-
versionName "13.0-rc-1"
78-
versionCode 761
77+
versionName "13.0-rc-3"
78+
versionCode 765
7979
}
8080

8181
zalpha { // alpha version - enable experimental features

WordPress/metadata/PlayStoreStrings.po

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,23 @@ msgstr ""
1010
"X-Generator: VsCode\n"
1111
"Project-Id-Version: Release Notes & Play Store Descriptions\n"
1212

13+
#. translators: Release notes for this version to be displayed in the Play Store. Limit to 500 characters including spaces and commas!
14+
msgctxt "release_note_130"
15+
msgid ""
16+
"13.0:\n"
17+
"* Block editor improvements: the editor is auto-enabled when you open a block post (unless you opted out in v12.9), or you can enable it on a per-site basis.\n"
18+
"* Accessibility improvements: screen readers can now read more of the stats screen.\n"
19+
"* General usability improvements: logging in is speedier, colors are more consistent across screens, and bug fixes put an end to some crashes.\n"
20+
msgstr ""
21+
1322
#. translators: Release notes for this version to be displayed in the Play Store. Limit to 500 characters including spaces and commas!
1423
msgctxt "release_note_129"
1524
msgid ""
1625
"12.9:\n"
1726
"* Customers with unclaimed domain credits can register domains in the app.\n"
1827
"* You can expand the Comment Editor to Full Screen for more space while editing.\n"
1928
"* The Block editor has a few improvements: Video blocks are available, and a some issues that led to content loss when using unsupported blocks have been resolved.\n"
29+
"* The block editor is now the default for new posts after you open a block-based post for the first time.\n"
2030
msgstr ""
2131

2232
msgctxt "release_note_128"
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
* Fixes a crash that could happen when viewing help from the login screen
2-
* Allow setting which editor to use on a per-site basis
3-
* Improves accessibility in stats
4-
* Makes it easier to log in by validating the URL to your site more quickly.
5-
* Some minor tweaks to the colour scheme
1+
* Block editor improvements: the editor is auto-enabled when you open a block post (unless you opted out in v12.9), or you can enable it on a per-site basis.
2+
* Accessibility improvements: screen readers can now read more of the stats screen.
3+
* General usability improvements: logging in is speedier, colors are more consistent across screens, and bug fixes put an end to some crashes.

WordPress/src/main/java/org/wordpress/android/WordPress.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,7 @@ public void onAppComesFromBackground() {
880880
sDeleteExpiredStats.runIfNotLimited();
881881

882882
// Let's migrate the old editor preference if available in AppPrefs to the remote backend
883-
SiteUtils.migrateAppWideMobileEditorPreferenceToRemote(mContext, mDispatcher, mSiteStore);
883+
SiteUtils.migrateAppWideMobileEditorPreferenceToRemote(mContext, mDispatcher);
884884

885885
if (mFirstActivityResumed) {
886886
deferredInit();

WordPress/src/main/java/org/wordpress/android/ui/ActivityLauncher.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -476,14 +476,16 @@ public static void viewCurrentSite(Context context, SiteModel site, boolean open
476476
String siteUrl = site.getUrl();
477477
if (site.isWPCom()) {
478478
// Show wp.com sites authenticated
479-
WPWebViewActivity.openUrlByUsingGlobalWPCOMCredentials(context, siteUrl);
479+
WPWebViewActivity.openUrlByUsingGlobalWPCOMCredentials(context, siteUrl, true);
480480
} else if (!TextUtils.isEmpty(site.getUsername()) && !TextUtils.isEmpty(site.getPassword())) {
481481
// Show self-hosted sites as authenticated since we should have the username & password
482-
WPWebViewActivity.openUrlByUsingBlogCredentials(context, site, null, siteUrl, new String[]{}, false);
482+
WPWebViewActivity
483+
.openUrlByUsingBlogCredentials(context, site, null, siteUrl, new String[]{}, false, true,
484+
false);
483485
} else {
484486
// Show non-wp.com sites without a password unauthenticated. These would be Jetpack sites that are
485487
// connected through REST API.
486-
WPWebViewActivity.openURL(context, siteUrl);
488+
WPWebViewActivity.openURL(context, siteUrl, true);
487489
}
488490
}
489491
}
@@ -598,6 +600,7 @@ private static void browsePostOrPageEx(
598600
url,
599601
shareableUrl,
600602
shareSubject,
603+
true,
601604
startPreviewForResult);
602605
} else if (site.isJetpackConnected()) {
603606
WPWebViewActivity
@@ -607,6 +610,7 @@ private static void browsePostOrPageEx(
607610
shareableUrl,
608611
shareSubject,
609612
site.getFrameNonce(),
613+
true,
610614
startPreviewForResult);
611615
} else {
612616
// Add the original post URL to the list of allowed URLs.
@@ -621,6 +625,7 @@ private static void browsePostOrPageEx(
621625
url,
622626
new String[]{post.getLink()},
623627
true,
628+
true,
624629
startPreviewForResult);
625630
}
626631
}

WordPress/src/main/java/org/wordpress/android/ui/FullScreenDialogFragment.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ private void initToolbar(View view) {
258258
mToolbar.setSubtitleTextAppearance(view.getContext(), R.style.Toolbar_Subtitle);
259259
mToolbar.setBackgroundColor(getResources().getColor(mToolbarColor));
260260
mToolbar.setNavigationIcon(ContextCompat.getDrawable(view.getContext(), R.drawable.ic_close_white_24dp));
261+
mToolbar.setNavigationContentDescription(R.string.close_dialog_button_desc);
261262
mToolbar.setNavigationOnClickListener(new View.OnClickListener() {
262263
@Override
263264
public void onClick(View view) {

WordPress/src/main/java/org/wordpress/android/ui/JetpackConnectionWebViewActivity.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ public void onCreate(Bundle savedInstanceState) {
8181
mSource = (JetpackConnectionSource) getIntent().getSerializableExtra(TRACKING_SOURCE_KEY);
8282
// We need to get the site before calling super since it'll create the web client
8383
super.onCreate(savedInstanceState);
84+
toggleNavbarVisibility(false);
8485
}
8586

8687
@Override
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
package org.wordpress.android.ui
2+
3+
import android.content.Context
4+
import android.view.LayoutInflater
5+
import android.view.View
6+
import android.view.ViewGroup
7+
import android.widget.BaseAdapter
8+
import android.widget.ImageView
9+
import android.widget.TextView
10+
11+
import org.wordpress.android.R
12+
import org.wordpress.android.viewmodel.wpwebview.WPWebViewViewModel.PreviewMode
13+
14+
class PreviewModeMenuAdapter(context: Context, private val selectedPreviewMode: PreviewMode) : BaseAdapter() {
15+
private val inflater: LayoutInflater = LayoutInflater.from(context)
16+
private val menuItems = arrayOf(PreviewMode.DEFAULT, PreviewMode.DESKTOP)
17+
18+
override fun getCount(): Int {
19+
return menuItems.size
20+
}
21+
22+
override fun getItem(position: Int): PreviewMode {
23+
return menuItems[position]
24+
}
25+
26+
override fun getItemId(position: Int): Long {
27+
return position.toLong()
28+
}
29+
30+
override fun getView(position: Int, convertView: View?, parent: ViewGroup): View? {
31+
var view = convertView
32+
val holder: PreviewModeMenuHolder
33+
if (view == null) {
34+
view = inflater.inflate(R.layout.preview_mode_popup_menu_item, parent, false)
35+
holder = PreviewModeMenuHolder(view)
36+
view.tag = holder
37+
} else {
38+
holder = view.tag as PreviewModeMenuHolder
39+
}
40+
41+
val previewMode = menuItems[position]
42+
val labelResId = when (previewMode) {
43+
PreviewMode.DEFAULT -> R.string.web_preview_default
44+
PreviewMode.DESKTOP -> R.string.web_preview_desktop
45+
}
46+
47+
holder.label.setText(labelResId)
48+
49+
if (previewMode === selectedPreviewMode) {
50+
holder.checkmark.visibility = View.VISIBLE
51+
} else {
52+
holder.checkmark.visibility = View.GONE
53+
}
54+
55+
return view
56+
}
57+
58+
internal inner class PreviewModeMenuHolder(view: View) {
59+
val label: TextView = view.findViewById(R.id.preview_mode_label)
60+
val checkmark: ImageView = view.findViewById(R.id.checkmark)
61+
}
62+
}

0 commit comments

Comments
 (0)