Skip to content

Commit

Permalink
Merge branch 'trunk' into issue/v2c-workflow-odds-ends
Browse files Browse the repository at this point in the history
  • Loading branch information
zwarm authored Jun 19, 2024
2 parents 942b497 + 612ec78 commit b3fba93
Show file tree
Hide file tree
Showing 25 changed files with 484 additions and 587 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ gem 'nokogiri'
### Fastlane Plugins

gem 'fastlane-plugin-sentry'
gem 'fastlane-plugin-wpmreleasetoolkit', '~> 9.2'
gem 'fastlane-plugin-wpmreleasetoolkit', '~> 11.0'
# gem 'fastlane-plugin-wpmreleasetoolkit', path: '../../release-toolkit'
# gem 'fastlane-plugin-wpmreleasetoolkit', git: 'https://github.com/wordpress-mobile/release-toolkit', branch: ''

Expand Down
78 changes: 38 additions & 40 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ GEM
base64
nkf
rexml
activesupport (7.1.3)
activesupport (7.1.3.4)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
Expand All @@ -17,30 +17,29 @@ GEM
tzinfo (~> 2.0)
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
artifactory (3.0.15)
artifactory (3.0.17)
ast (2.4.2)
atomos (0.1.3)
aws-eventstream (1.3.0)
aws-partitions (1.894.0)
aws-sdk-core (3.191.2)
aws-partitions (1.944.0)
aws-sdk-core (3.197.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.8)
base64
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.77.0)
aws-sdk-core (~> 3, >= 3.191.0)
aws-sdk-kms (1.84.0)
aws-sdk-core (~> 3, >= 3.197.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.143.0)
aws-sdk-core (~> 3, >= 3.191.0)
aws-sdk-s3 (1.152.3)
aws-sdk-core (~> 3, >= 3.197.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.8)
aws-sigv4 (1.8.0)
aws-eventstream (~> 1, >= 1.0.2)
babosa (1.0.4)
base64 (0.2.0)
bigdecimal (3.1.6)
buildkit (1.5.0)
bigdecimal (3.1.8)
buildkit (1.6.0)
sawyer (>= 0.6)
chroma (0.2.0)
claide (1.1.0)
Expand All @@ -52,7 +51,7 @@ GEM
colored2 (3.1.2)
commander (4.6.0)
highline (~> 2.0.0)
concurrent-ruby (1.2.3)
concurrent-ruby (1.3.3)
connection_pool (2.4.1)
cork (0.3.0)
colored2 (~> 3.1)
Expand Down Expand Up @@ -85,10 +84,9 @@ GEM
rake (>= 12.0.0, < 14.0.0)
domain_name (0.6.20240107)
dotenv (2.8.1)
drb (2.2.0)
ruby2_keywords
drb (2.2.1)
emoji_regex (3.2.3)
excon (0.109.0)
excon (0.110.0)
faraday (1.10.3)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
Expand Down Expand Up @@ -119,15 +117,15 @@ GEM
faraday-retry (1.0.3)
faraday_middleware (1.2.0)
faraday (~> 1.0)
fastimage (2.3.0)
fastlane (2.219.0)
fastimage (2.3.1)
fastlane (2.220.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
aws-sdk-s3 (~> 1.0)
babosa (>= 1.0.3, < 2.0.0)
bundler (>= 1.12.0, < 3.0.0)
colored
colored (~> 1.2)
commander (~> 4.6)
dotenv (>= 2.1.1, < 3.0.0)
emoji_regex (>= 0.1, < 4.0)
Expand All @@ -148,10 +146,10 @@ GEM
mini_magick (>= 4.9.4, < 5.0.0)
multipart-post (>= 2.0.0, < 3.0.0)
naturally (~> 2.2)
optparse (>= 0.1.1)
optparse (>= 0.1.1, < 1.0.0)
plist (>= 3.1.0, < 4.0.0)
rubyzip (>= 2.0.0, < 3.0.0)
security (= 0.1.3)
security (= 0.1.5)
simctl (~> 1.6.3)
terminal-notifier (>= 2.0.0, < 3.0.0)
terminal-table (~> 3)
Expand All @@ -160,10 +158,10 @@ GEM
word_wrap (~> 1.0.0)
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty-travis-formatter (>= 0.0.3)
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
fastlane-plugin-sentry (1.19.0)
os (~> 1.1, >= 1.1.4)
fastlane-plugin-wpmreleasetoolkit (9.4.0)
fastlane-plugin-wpmreleasetoolkit (11.0.2)
activesupport (>= 6.1.7.1)
buildkit (~> 1.5)
chroma (= 0.2.0)
Expand All @@ -172,7 +170,7 @@ GEM
git (~> 1.3)
google-cloud-storage (~> 1.31)
java-properties (~> 0.3.0)
nokogiri (~> 1.11, < 1.16)
nokogiri (~> 1.11, < 1.17)
octokit (~> 6.1)
parallel (~> 1.14)
plist (~> 3.1)
Expand Down Expand Up @@ -200,12 +198,12 @@ GEM
google-apis-core (>= 0.11.0, < 2.a)
google-apis-storage_v1 (0.31.0)
google-apis-core (>= 0.11.0, < 2.a)
google-cloud-core (1.6.1)
google-cloud-core (1.7.0)
google-cloud-env (>= 1.0, < 3.a)
google-cloud-errors (~> 1.0)
google-cloud-env (1.6.0)
faraday (>= 0.17.3, < 3.0)
google-cloud-errors (1.3.1)
google-cloud-errors (1.4.0)
google-cloud-storage (1.47.0)
addressable (~> 2.8)
digest-crc (~> 0.4)
Expand All @@ -221,25 +219,25 @@ GEM
os (>= 0.9, < 2.0)
signet (>= 0.16, < 2.a)
highline (2.0.3)
http-cookie (1.0.5)
http-cookie (1.0.6)
domain_name (~> 0.5)
httpclient (2.8.3)
i18n (1.14.1)
i18n (1.14.5)
concurrent-ruby (~> 1.0)
java-properties (0.3.0)
jmespath (1.6.2)
json (2.7.2)
jwt (2.8.0)
jwt (2.8.1)
base64
kramdown (2.4.0)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
language_server-protocol (3.17.0.3)
mini_magick (4.12.0)
mini_magick (4.13.0)
mini_mime (1.1.5)
mini_portile2 (2.8.5)
minitest (5.22.2)
mini_portile2 (2.8.7)
minitest (5.23.1)
multi_json (1.15.0)
multipart-post (2.4.1)
mutex_m (0.2.0)
Expand All @@ -248,23 +246,23 @@ GEM
naturally (2.2.1)
nkf (0.2.0)
no_proxy_fix (0.1.2)
nokogiri (1.15.5)
nokogiri (1.16.6)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
octokit (6.1.1)
faraday (>= 1, < 3)
sawyer (~> 0.9)
open4 (1.3.4)
options (2.3.2)
optparse (0.4.0)
optparse (0.5.0)
os (1.1.4)
parallel (1.24.0)
parallel (1.25.1)
parser (3.3.2.0)
ast (~> 2.4.1)
racc
plist (3.7.1)
progress_bar (1.3.3)
highline (>= 1.6, < 3)
progress_bar (1.3.4)
highline (>= 1.6)
options (~> 2.3.0)
public_suffix (5.0.5)
racc (1.8.0)
Expand All @@ -279,8 +277,8 @@ GEM
trailblazer-option (>= 0.1.1, < 0.2.0)
uber (< 0.2.0)
retriable (3.1.2)
rexml (3.2.8)
strscan (>= 3.0.9)
rexml (3.2.9)
strscan
rmagick (4.3.0)
rouge (2.0.7)
rubocop (1.64.1)
Expand All @@ -302,7 +300,7 @@ GEM
sawyer (0.9.2)
addressable (>= 2.3.5)
faraday (>= 0.17.3, < 3)
security (0.1.3)
security (0.1.5)
signet (0.19.0)
addressable (~> 2.8)
faraday (>= 0.17.5, < 3.a)
Expand Down Expand Up @@ -344,7 +342,7 @@ DEPENDENCIES
danger-dangermattic (~> 1.0)
fastlane (~> 2)
fastlane-plugin-sentry
fastlane-plugin-wpmreleasetoolkit (~> 9.2)
fastlane-plugin-wpmreleasetoolkit (~> 11.0)
nokogiri
rmagick (~> 4.1)

Expand Down
2 changes: 1 addition & 1 deletion WordPress/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ static def addBuildConfigFieldsFromPrefixedProperties(variant, properties, prefi
}

dependencies {
implementation 'androidx.webkit:webkit:1.10.0'
implementation 'androidx.webkit:webkit:1.11.0'
implementation "androidx.navigation:navigation-compose:$androidxComposeNavigationVersion"
compileOnly project(path: ':libs:annotations')
ksp project(':libs:processors')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ class EditPostActivity : LocaleAwareActivity(), EditorFragmentActivity, EditorIm
}

isNewPost = state.getBoolean(EditPostActivityConstants.STATE_KEY_IS_NEW_POST, false)
isVoiceContentSet = state.getBoolean(EditPostActivityConstants.STATE_KEY_IS_NEW_POST, false)
isVoiceContentSet = state.getBoolean(EditPostActivityConstants.STATE_KEY_IS_VOICE_CONTENT_SET, false)
updatePostLoadingAndDialogState(
fromInt(
state.getInt(EditPostActivityConstants.STATE_KEY_POST_LOADING_STATE, 0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,16 @@
import android.text.TextUtils;
import android.text.TextWatcher;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.view.ContextThemeWrapper;
import androidx.fragment.app.DialogFragment;

import com.google.android.material.dialog.MaterialAlertDialogBuilder;
import com.google.android.material.textfield.TextInputLayout;

import org.wordpress.android.R;
import org.wordpress.android.databinding.PostSettingsInputDialogBinding;
import org.wordpress.android.util.ActivityUtils;

public class PostSettingsInputDialogFragment extends DialogFragment implements TextWatcher {
Expand All @@ -35,6 +32,7 @@ public interface PostSettingsInputDialogListener {
private static final String HINT_TAG = "hint";
private static final String DISABLE_EMPTY_INPUT_TAG = "disable_empty_input";
private static final String MULTILINE_INPUT_TAG = "is_multiline_input";

private String mCurrentInput;
private String mTitle;
private String mHint;
Expand Down Expand Up @@ -94,35 +92,34 @@ public void onDismiss(DialogInterface dialog) {
public Dialog onCreateDialog(Bundle savedInstanceState) {
AlertDialog.Builder builder =
new MaterialAlertDialogBuilder(new ContextThemeWrapper(getActivity(), R.style.PostSettingsTheme));
LayoutInflater layoutInflater = getActivity().getLayoutInflater();
LayoutInflater layoutInflater = requireActivity().getLayoutInflater();
//noinspection InflateParams
View dialogView = layoutInflater.inflate(R.layout.post_settings_input_dialog, null);
builder.setView(dialogView);
final EditText editText = dialogView.findViewById(R.id.post_settings_input_dialog_edit_text);
PostSettingsInputDialogBinding binding =
PostSettingsInputDialogBinding.inflate(layoutInflater, null, false);
builder.setView(binding.getRoot());
if (mIsMultilineInput) {
editText.setRawInputType(InputType.TYPE_TEXT_FLAG_MULTI_LINE);
binding.postSettingsInputDialogEditText.setRawInputType(InputType.TYPE_TEXT_FLAG_MULTI_LINE);
} else {
editText.setInputType(InputType.TYPE_CLASS_TEXT);
binding.postSettingsInputDialogEditText.setInputType(InputType.TYPE_CLASS_TEXT);
}
if (!TextUtils.isEmpty(mCurrentInput)) {
editText.setText(mCurrentInput);
binding.postSettingsInputDialogEditText.setText(mCurrentInput);
// move the cursor to the end
editText.setSelection(mCurrentInput.length());
binding.postSettingsInputDialogEditText.setSelection(mCurrentInput.length());
}
editText.addTextChangedListener(this);
binding.postSettingsInputDialogEditText.addTextChangedListener(this);

TextInputLayout textInputLayout = dialogView.findViewById(R.id.post_settings_input_dialog_input_layout);
textInputLayout.setHint(mTitle);
binding.postSettingsInputDialogInputLayout.setHint(mTitle);

TextView hintTextView = dialogView.findViewById(R.id.post_settings_input_dialog_hint);
hintTextView.setText(mHint);
binding.postSettingsInputDialogHint.setText(mHint);

builder.setNegativeButton(R.string.cancel, null);
builder.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
mCurrentInput = editText.getText().toString();
if (mListener != null) {
Editable text = binding.postSettingsInputDialogEditText.getText();
if (mListener != null && text != null) {
mCurrentInput = text.toString();
mListener.onInputUpdated(mCurrentInput);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ public static boolean shouldShowGutenbergEditor(boolean isNewPost, String postCo

public static String replaceMediaFileWithUrlInGutenbergPost(@NonNull String postContent,
@NonNull String localMediaId, MediaFile mediaFile,
String siteUrl) {
@NonNull String siteUrl) {
if (mediaFile != null && contentContainsGutenbergBlocks(postContent)) {
MediaUploadCompletionProcessor processor = new MediaUploadCompletionProcessor(localMediaId, mediaFile,
siteUrl);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,18 @@ import org.jsoup.nodes.Document
import org.wordpress.android.util.helpers.MediaFile

class AudioBlockProcessor(localId: String, mediaFile: MediaFile) : BlockProcessor(localId, mediaFile) {
override fun processBlockContentDocument(document: Document?): Boolean {
val audioElements = document?.select(AUDIO_TAG)
override fun processBlockContentDocument(document: Document): Boolean {
val audioElements = document.select(AUDIO_TAG)

audioElements?.let { elements ->
for (element in elements) {
// replaces the src attribute's local url with the remote counterpart.
element.attr(SRC_ATTRIBUTE, remoteUrl)
}
return true
for (element in audioElements) {
// replaces the src attribute's local url with the remote counterpart.
element.attr(SRC_ATTRIBUTE, remoteUrl)
}
return false
return true
}

override fun processBlockJsonAttributes(jsonAttributes: JsonObject?): Boolean {
val id = jsonAttributes?.get(ID_ATTRIBUTE)
override fun processBlockJsonAttributes(jsonAttributes: JsonObject): Boolean {
val id = jsonAttributes.get(ID_ATTRIBUTE)

return if (id != null && !id.isJsonNull && id.asString == localId) {
jsonAttributes.apply {
Expand Down
Loading

0 comments on commit b3fba93

Please sign in to comment.