From 81ef1415dc43d291afc96b53e0dad8bfbc2ccdcf Mon Sep 17 00:00:00 2001 From: Jorge Martin Espinosa Date: Fri, 14 Oct 2022 09:59:43 +0200 Subject: [PATCH] Apply design changes to WYSIWYG editor (#7354) * Apply design changes to WYSIWYG editor * Add changelog * Remove unneeded attribute in RichTextComposerLayout * Fix lint issues * Fix style naming issue. * Change rich text editor border radius depending on the number of lines. * Replace standby voice recorder icon. --- changelog.d/7354.misc | 1 + .../src/main/res/values/strings.xml | 8 ++- .../ui-styles/src/main/res/values/colors.xml | 5 ++ .../ui-styles/src/main/res/values/dimens.xml | 3 +- .../src/main/res/values/styles_edit_text.xml | 12 ++++- .../src/main/res/values/theme_dark.xml | 3 ++ .../src/main/res/values/theme_light.xml | 3 ++ vector-app/proguard-rules.pro | 6 ++- .../detail/composer/RichTextComposerLayout.kt | 51 ++++++++++++++++--- .../composer/voice/VoiceMessageViews.kt | 2 +- .../color/selector_rich_text_menu_icon.xml | 8 +++ .../bg_composer_rich_edit_text_expanded.xml | 13 +++++ ...bg_composer_rich_edit_text_single_line.xml | 13 +++++ .../res/drawable/bg_rich_text_menu_button.xml | 18 +++++++ .../src/main/res/drawable/ic_microphone.xml | 9 ++++ vector/src/main/res/drawable/ic_voice_mic.xml | 12 ----- .../res/layout/composer_rich_text_layout.xml | 6 ++- ...ich_text_layout_constraint_set_compact.xml | 30 ++++++----- ...ch_text_layout_constraint_set_expanded.xml | 28 +++++----- .../res/layout/view_rich_text_menu_button.xml | 11 ++-- .../layout/view_voice_message_recorder.xml | 4 +- 21 files changed, 188 insertions(+), 58 deletions(-) create mode 100644 changelog.d/7354.misc create mode 100644 vector/src/main/res/color/selector_rich_text_menu_icon.xml create mode 100644 vector/src/main/res/drawable/bg_composer_rich_edit_text_expanded.xml create mode 100644 vector/src/main/res/drawable/bg_composer_rich_edit_text_single_line.xml create mode 100644 vector/src/main/res/drawable/bg_rich_text_menu_button.xml create mode 100644 vector/src/main/res/drawable/ic_microphone.xml delete mode 100644 vector/src/main/res/drawable/ic_voice_mic.xml diff --git a/changelog.d/7354.misc b/changelog.d/7354.misc new file mode 100644 index 0000000000..0e146a8e02 --- /dev/null +++ b/changelog.d/7354.misc @@ -0,0 +1 @@ +Update WYSIWYG editor designs. diff --git a/library/ui-strings/src/main/res/values/strings.xml b/library/ui-strings/src/main/res/values/strings.xml index 47d3d3bda5..c164b0a519 100644 --- a/library/ui-strings/src/main/res/values/strings.xml +++ b/library/ui-strings/src/main/res/values/strings.xml @@ -447,7 +447,7 @@ Create DM only on first message Enable rich text editor - Use a rich text editor to send formatted messages + Try out the rich text editor (plain text mode coming soon) Invites @@ -3362,4 +3362,10 @@ Tap top right to see the option to feedback. Try it out + + Apply bold format + Apply italic format + Apply strikethrough format + Apply underline format + diff --git a/library/ui-styles/src/main/res/values/colors.xml b/library/ui-styles/src/main/res/values/colors.xml index f4384adb40..85646adb42 100644 --- a/library/ui-styles/src/main/res/values/colors.xml +++ b/library/ui-styles/src/main/res/values/colors.xml @@ -152,4 +152,9 @@ @color/palette_white @color/palette_black_950 + + + #EEF8F4 + #1D292A + diff --git a/library/ui-styles/src/main/res/values/dimens.xml b/library/ui-styles/src/main/res/values/dimens.xml index 0fb03f0ea3..52d16eae7d 100644 --- a/library/ui-styles/src/main/res/values/dimens.xml +++ b/library/ui-styles/src/main/res/values/dimens.xml @@ -47,7 +47,8 @@ 56dp 52dp 1dp - + 28dp + 14dp 28dp 6dp diff --git a/library/ui-styles/src/main/res/values/styles_edit_text.xml b/library/ui-styles/src/main/res/values/styles_edit_text.xml index 8de548dd03..b640fc49d9 100644 --- a/library/ui-styles/src/main/res/values/styles_edit_text.xml +++ b/library/ui-styles/src/main/res/values/styles_edit_text.xml @@ -11,4 +11,14 @@ ?vctr_message_text_color - \ No newline at end of file + + + diff --git a/library/ui-styles/src/main/res/values/theme_dark.xml b/library/ui-styles/src/main/res/values/theme_dark.xml index 9f4e5c1e28..d5aaa88ab8 100644 --- a/library/ui-styles/src/main/res/values/theme_dark.xml +++ b/library/ui-styles/src/main/res/values/theme_dark.xml @@ -152,6 +152,9 @@ @dimen/collapsing_toolbar_layout_medium_size + + + @color/vctr_rich_text_editor_menu_button_background_dark