Browse Source

Merge pull request #693 from vector-im/feature/bma/removeOldResources

Remove old resources
feature/julioromano/geocoding_api
Benoit Marty 1 year ago committed by GitHub
parent
commit
01a1b1c776
  1. 2
      app/src/main/res/values-night/themes.xml
  2. 2
      app/src/main/res/values/themes.xml
  3. 1
      features/analytics/impl/build.gradle.kts
  4. 1
      features/createroom/impl/build.gradle.kts
  5. 1
      features/login/impl/build.gradle.kts
  6. 1
      features/logout/impl/build.gradle.kts
  7. 1
      features/onboarding/impl/build.gradle.kts
  8. 1
      features/preferences/impl/build.gradle.kts
  9. 1
      features/rageshake/impl/build.gradle.kts
  10. 1
      features/roomdetails/impl/build.gradle.kts
  11. 1
      features/roomlist/impl/build.gradle.kts
  12. 1
      features/verifysession/impl/build.gradle.kts
  13. 1
      libraries/designsystem/build.gradle.kts
  14. 26
      libraries/elementresources/build.gradle.kts
  15. 20
      libraries/elementresources/src/main/AndroidManifest.xml
  16. 177
      libraries/elementresources/src/main/res/values/colors.xml
  17. 96
      libraries/elementresources/src/main/res/values/dimens.xml
  18. 30
      libraries/elementresources/src/main/res/values/dimens_font.xml
  19. 63
      libraries/elementresources/src/main/res/values/palette.xml
  20. 72
      libraries/elementresources/src/main/res/values/palette_mobile.xml
  21. 28
      libraries/elementresources/src/main/res/values/styles_bottom_sheet.xml
  22. 33
      libraries/elementresources/src/main/res/values/styles_edit_text.xml
  23. 136
      libraries/elementresources/src/main/res/values/theme_light.xml
  24. 1
      libraries/permissions/impl/build.gradle.kts
  25. 1
      libraries/textcomposer/build.gradle.kts
  26. 4
      libraries/textcomposer/src/main/kotlin/io/element/android/libraries/textcomposer/TextComposer.kt
  27. 24
      libraries/textcomposer/src/main/res/color/selector_rich_text_menu_icon.xml
  28. 36
      libraries/textcomposer/src/main/res/drawable/ic_reply.xml
  29. 27
      libraries/textcomposer/src/main/res/values/dimens.xml
  30. 24
      libraries/textcomposer/src/main/res/values/strings.xml
  31. BIN
      tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.actionlist_null_DefaultGroup_SheetContentDarkPreview_0_null_2,NEXUS_5,1.0,en].png
  32. BIN
      tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.actionlist_null_DefaultGroup_SheetContentLightPreview_0_null_2,NEXUS_5,1.0,en].png

2
app/src/main/res/values-night/themes.xml

@ -22,5 +22,5 @@
<item name="postSplashScreenTheme">@style/Theme.ElementX</item> <item name="postSplashScreenTheme">@style/Theme.ElementX</item>
</style> </style>
<style name="Theme.ElementX" parent="Theme.ElementAndroid" /> <style name="Theme.ElementX" parent="Theme.Material3.Dark" />
</resources> </resources>

2
app/src/main/res/values/themes.xml

@ -21,5 +21,5 @@
<item name="windowSplashScreenAnimatedIcon">@drawable/splash_icon</item> <item name="windowSplashScreenAnimatedIcon">@drawable/splash_icon</item>
<item name="postSplashScreenTheme">@style/Theme.ElementX</item> <item name="postSplashScreenTheme">@style/Theme.ElementX</item>
</style> </style>
<style name="Theme.ElementX" parent="Theme.ElementAndroid" /> <style name="Theme.ElementX" parent="Theme.Material3.Light" />
</resources> </resources>

1
features/analytics/impl/build.gradle.kts

@ -36,7 +36,6 @@ dependencies {
implementation(projects.libraries.core) implementation(projects.libraries.core)
implementation(projects.libraries.architecture) implementation(projects.libraries.architecture)
implementation(projects.libraries.designsystem) implementation(projects.libraries.designsystem)
implementation(projects.libraries.elementresources)
implementation(projects.libraries.uiStrings) implementation(projects.libraries.uiStrings)
api(projects.features.analytics.api) api(projects.features.analytics.api)
api(projects.services.analytics.api) api(projects.services.analytics.api)

1
features/createroom/impl/build.gradle.kts

@ -43,7 +43,6 @@ dependencies {
implementation(projects.libraries.matrix.api) implementation(projects.libraries.matrix.api)
implementation(projects.libraries.matrixui) implementation(projects.libraries.matrixui)
implementation(projects.libraries.designsystem) implementation(projects.libraries.designsystem)
implementation(projects.libraries.elementresources)
implementation(projects.libraries.uiStrings) implementation(projects.libraries.uiStrings)
implementation(projects.libraries.androidutils) implementation(projects.libraries.androidutils)
implementation(projects.libraries.mediapickers.api) implementation(projects.libraries.mediapickers.api)

1
features/login/impl/build.gradle.kts

@ -46,7 +46,6 @@ dependencies {
implementation(projects.libraries.matrix.api) implementation(projects.libraries.matrix.api)
implementation(projects.libraries.network) implementation(projects.libraries.network)
implementation(projects.libraries.designsystem) implementation(projects.libraries.designsystem)
implementation(projects.libraries.elementresources)
implementation(projects.libraries.testtags) implementation(projects.libraries.testtags)
implementation(projects.libraries.uiStrings) implementation(projects.libraries.uiStrings)
implementation(libs.androidx.browser) implementation(libs.androidx.browser)

1
features/logout/impl/build.gradle.kts

@ -35,7 +35,6 @@ dependencies {
implementation(projects.libraries.architecture) implementation(projects.libraries.architecture)
implementation(projects.libraries.matrix.api) implementation(projects.libraries.matrix.api)
implementation(projects.libraries.designsystem) implementation(projects.libraries.designsystem)
implementation(projects.libraries.elementresources)
implementation(projects.libraries.testtags) implementation(projects.libraries.testtags)
implementation(projects.libraries.uiStrings) implementation(projects.libraries.uiStrings)
implementation(projects.libraries.dateformatter.api) implementation(projects.libraries.dateformatter.api)

1
features/onboarding/impl/build.gradle.kts

@ -36,7 +36,6 @@ dependencies {
implementation(projects.libraries.architecture) implementation(projects.libraries.architecture)
implementation(projects.libraries.matrix.api) implementation(projects.libraries.matrix.api)
implementation(projects.libraries.designsystem) implementation(projects.libraries.designsystem)
implementation(projects.libraries.elementresources)
implementation(projects.libraries.testtags) implementation(projects.libraries.testtags)
implementation(projects.libraries.uiStrings) implementation(projects.libraries.uiStrings)
implementation(projects.libraries.androidutils) implementation(projects.libraries.androidutils)

1
features/preferences/impl/build.gradle.kts

@ -39,7 +39,6 @@ dependencies {
implementation(projects.libraries.designsystem) implementation(projects.libraries.designsystem)
implementation(projects.libraries.featureflag.api) implementation(projects.libraries.featureflag.api)
implementation(projects.libraries.featureflag.ui) implementation(projects.libraries.featureflag.ui)
implementation(projects.libraries.elementresources)
implementation(projects.libraries.network) implementation(projects.libraries.network)
implementation(projects.libraries.testtags) implementation(projects.libraries.testtags)
implementation(projects.libraries.uiStrings) implementation(projects.libraries.uiStrings)

1
features/rageshake/impl/build.gradle.kts

@ -36,7 +36,6 @@ dependencies {
implementation(projects.libraries.core) implementation(projects.libraries.core)
implementation(projects.libraries.architecture) implementation(projects.libraries.architecture)
implementation(projects.libraries.designsystem) implementation(projects.libraries.designsystem)
implementation(projects.libraries.elementresources)
implementation(projects.libraries.uiStrings) implementation(projects.libraries.uiStrings)
api(libs.squareup.seismic) api(libs.squareup.seismic)
api(projects.features.rageshake.api) api(projects.features.rageshake.api)

1
features/roomdetails/impl/build.gradle.kts

@ -38,7 +38,6 @@ dependencies {
implementation(projects.libraries.matrix.api) implementation(projects.libraries.matrix.api)
implementation(projects.libraries.matrixui) implementation(projects.libraries.matrixui)
implementation(projects.libraries.designsystem) implementation(projects.libraries.designsystem)
implementation(projects.libraries.elementresources)
implementation(projects.libraries.uiStrings) implementation(projects.libraries.uiStrings)
implementation(projects.libraries.androidutils) implementation(projects.libraries.androidutils)
implementation(projects.libraries.mediapickers.api) implementation(projects.libraries.mediapickers.api)

1
features/roomlist/impl/build.gradle.kts

@ -44,7 +44,6 @@ dependencies {
implementation(projects.libraries.matrix.api) implementation(projects.libraries.matrix.api)
implementation(projects.libraries.matrixui) implementation(projects.libraries.matrixui)
implementation(projects.libraries.designsystem) implementation(projects.libraries.designsystem)
implementation(projects.libraries.elementresources)
implementation(projects.libraries.testtags) implementation(projects.libraries.testtags)
implementation(projects.libraries.uiStrings) implementation(projects.libraries.uiStrings)
implementation(projects.libraries.dateformatter.api) implementation(projects.libraries.dateformatter.api)

1
features/verifysession/impl/build.gradle.kts

@ -37,7 +37,6 @@ dependencies {
implementation(projects.libraries.matrix.api) implementation(projects.libraries.matrix.api)
implementation(projects.libraries.matrixui) implementation(projects.libraries.matrixui)
implementation(projects.libraries.designsystem) implementation(projects.libraries.designsystem)
implementation(projects.libraries.elementresources)
implementation(projects.libraries.uiStrings) implementation(projects.libraries.uiStrings)
api(libs.statemachine) api(libs.statemachine)
api(projects.features.verifysession.api) api(projects.features.verifysession.api)

1
libraries/designsystem/build.gradle.kts

@ -32,7 +32,6 @@ android {
implementation(libs.coil.compose) implementation(libs.coil.compose)
implementation(libs.accompanist.systemui) implementation(libs.accompanist.systemui)
implementation(libs.vanniktech.blurhash) implementation(libs.vanniktech.blurhash)
implementation(projects.libraries.elementresources)
implementation(projects.libraries.uiStrings) implementation(projects.libraries.uiStrings)
ksp(libs.showkase.processor) ksp(libs.showkase.processor)

26
libraries/elementresources/build.gradle.kts

@ -1,26 +0,0 @@
/*
* Copyright (c) 2022 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
plugins {
id("io.element.android-library")
}
android {
namespace = "io.element.android.libraries.resources"
}
dependencies {
implementation(libs.androidx.material)
}

20
libraries/elementresources/src/main/AndroidManifest.xml

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2022 New Vector Ltd
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<manifest>
</manifest>

177
libraries/elementresources/src/main/res/values/colors.xml

@ -1,177 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2022 New Vector Ltd
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources>
<!-- Error colors -->
<color name="vector_warning_color_2">@color/palette_melon</color>
<color name="vector_info_color">#2f9edb</color>
<!-- Notification view colors -->
<color name="soft_resource_limit_exceeded">#2f9edb</color>
<color name="hard_resource_limit_exceeded">?colorError</color>
<!-- Notification (do not depends on theme) -->
<color name="notification_accent_color">@color/palette_azure</color>
<color name="key_share_req_accent_color">@color/palette_melon</color>
<!-- Source: https://zpl.io/aBKw9Mk -->
<color name="bg_call_screen_blur">#99000000</color>
<color name="bg_call_screen">#27303A</color>
<color name="vctr_notice_secondary_alpha12">#1E61708B</color>
<!-- Other useful color -->
<!-- Emoji text has to use a black text color -->
<color name="emoji_color">@android:color/black</color>
<color name="join_conference_animated_color">#0BAC7E</color>
<color name="half_transparent_status_bar">#80000000</color>
<color name="black_alpha">#55000000</color>
<color name="black_54">#8A000000</color>
<!-- For Android status bar and navigation bar -->
<color name="android_status_bar_background_light">@color/element_system_light</color>
<color name="android_navigation_bar_background_light">@color/element_system_light</color>
<color name="android_status_bar_background_dark">@color/element_background_dark</color>
<color name="android_navigation_bar_background_dark">@color/element_system_dark</color>
<!-- Used for toolbar background -->
<attr name="vctr_toolbar_background" format="color" />
<!-- Used for header background -->
<attr name="vctr_header_background" format="color" />
<!-- Used for item separators in list -->
<attr name="vctr_list_separator" format="color" />
<!-- Used for item separators in list, variant using element system color -->
<attr name="vctr_list_separator_system" format="color" />
<!-- Used for item separators in list, on surface -->
<attr name="vctr_list_separator_on_surface" format="color" />
<!-- Background color used for:
- unread badge background for a room item in the room list
- start unread indicator for a room item in the room list
- Background for unread badge background in the bottom navigation -->
<attr name="vctr_unread_background" format="color" />
<!-- Other colors, which are not in the palette -->
<attr name="vctr_fab_label_bg" format="color" />
<color name="vctr_fab_label_bg_light">@android:color/white</color>
<color name="vctr_fab_label_bg_dark">#FF181B21</color>
<color name="vctr_fab_label_bg_black">#FF181B21</color>
<attr name="vctr_fab_label_stroke" format="color" />
<color name="vctr_fab_label_stroke_light">#1EFFFFFF</color>
<color name="vctr_fab_label_stroke_dark">@android:color/black</color>
<color name="vctr_fab_label_stroke_black">@android:color/black</color>
<attr name="vctr_fab_label_color" format="color" />
<color name="vctr_fab_label_color_light">#FF2E2F32</color>
<color name="vctr_fab_label_color_dark">#FFA1B2D1</color>
<color name="vctr_fab_label_color_black">#FFA1B2D1</color>
<attr name="vctr_touch_guard_bg" format="color" />
<color name="vctr_touch_guard_bg_light">#66000000</color>
<color name="vctr_touch_guard_bg_dark">#BF000000</color>
<color name="vctr_touch_guard_bg_black">#BF000000</color>
<attr name="vctr_room_active_widgets_banner_bg" format="color" />
<color name="vctr_room_active_widgets_banner_bg_light">#EBEFF5</color>
<color name="vctr_room_active_widgets_banner_bg_dark">#27303A</color>
<color name="vctr_room_active_widgets_banner_bg_black">#27303A</color>
<attr name="vctr_room_active_widgets_banner_text" format="color" />
<color name="vctr_room_active_widgets_banner_text_light">#61708B</color>
<color name="vctr_room_active_widgets_banner_text_dark">#E3E8F0</color>
<color name="vctr_room_active_widgets_banner_text_black">#E3E8F0</color>
<attr name="vctr_waiting_background_color" format="color" />
<color name="vctr_waiting_background_color_light">#AAAAAAAA</color>
<color name="vctr_waiting_background_color_dark">#55555555</color>
<color name="vctr_disabled_view_color_light">#EEEEEE</color>
<attr name="vctr_reaction_background_off" format="color" />
<color name="vctr_reaction_background_off_light">#FFF3F8FD</color>
<color name="vctr_reaction_background_off_dark">#22252B</color>
<color name="vctr_reaction_background_off_black">#22252B</color>
<attr name="vctr_reaction_background_on" format="color" />
<color name="vctr_reaction_background_on_light">#2011BC8A</color>
<color name="vctr_reaction_background_on_dark">#4011BC8A</color>
<color name="vctr_reaction_background_on_black">#4011BC8A</color>
<!-- (color from RiotWeb) -->
<attr name="vctr_keys_backup_banner_accent_color" format="color" />
<color name="vctr_keys_backup_banner_accent_color_light">#FFF8E3</color>
<color name="vctr_keys_backup_banner_accent_color_dark">#22262E</color>
<attr name="vctr_chat_effect_snow_background" format="color" />
<color name="vctr_chat_effect_snow_background_light">@color/black_alpha</color>
<color name="vctr_chat_effect_snow_background_dark">@android:color/transparent</color>
<attr name="vctr_toast_background" format="color" />
<color name="vctr_toast_background_light">@color/palette_black_900</color>
<color name="vctr_toast_background_dark">@color/palette_gray_400</color>
<!-- Presence Indicator colors -->
<attr name="vctr_presence_indicator_offline" format="color" />
<color name="vctr_presence_indicator_offline_light">@color/palette_gray_100</color>
<color name="vctr_presence_indicator_offline_dark">@color/palette_gray_450</color>
<attr name="vctr_presence_indicator_online" format="color" />
<color name="vctr_presence_indicator_online_light">@color/palette_element_green</color>
<color name="vctr_presence_indicator_online_dark">@color/palette_element_green</color>
<attr name="vctr_presence_indicator_busy" format="color" />
<color name="vctr_presence_indicator_busy_light">@color/element_alert_light</color>
<color name="vctr_presence_indicator_busy_dark">@color/element_alert_dark</color>
<attr name="vctr_presence_indicator_away" format="color" />
<color name="vctr_presence_indicator_away_light">@color/palette_element_orange</color>
<color name="vctr_presence_indicator_away_dark">@color/palette_element_orange</color>
<!-- Location sharing colors -->
<attr name="vctr_live_location" format="color" />
<color name="vctr_live_location_light">@color/palette_prune</color>
<color name="vctr_live_location_dark">@color/palette_prune</color>
<!-- Shield colors -->
<color name="shield_color_trust">#0DBD8B</color>
<color name="shield_color_trust_background">#0F0DBD8B</color>
<color name="shield_color_black">#17191C</color>
<color name="shield_color_gray">#91A1C0</color>
<color name="shield_color_warning">#FF4B55</color>
<color name="shield_color_warning_background">#0FFF4B55</color>
<color name="shield_color_unknown">@color/palette_gray_200</color>
<!-- Badge Colors -->
<attr name="vctr_badge_color_border" format="color" />
<color name="vctr_badge_color_border_light">@color/palette_white</color>
<color name="vctr_badge_color_border_dark">@color/palette_black_950</color>
<!-- WYSIWYG Colors -->
<attr name="vctr_rich_text_editor_menu_button_background" format="color" />
<color name="vctr_rich_text_editor_menu_button_background_light">#EEF8F4</color>
<color name="vctr_rich_text_editor_menu_button_background_dark">#1D292A</color>
</resources>

96
libraries/elementresources/src/main/res/values/dimens.xml

@ -1,96 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2022 New Vector Ltd
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="layout_touch_size">48dp</dimen>
<dimen name="layout_horizontal_margin">16dp</dimen>
<dimen name="layout_vertical_margin">16dp</dimen>
<dimen name="layout_vertical_margin_big">32dp</dimen>
<dimen name="profile_avatar_size">50dp</dimen>
<dimen name="typing_avatar_size">20dp</dimen>
<dimen name="item_event_message_state_size">16dp</dimen>
<dimen name="item_event_message_media_button_size">32dp</dimen>
<dimen name="quote_gap">8dp</dimen>
<item name="dialog_width_ratio" format="float" type="dimen">0.75</item>
<dimen name="pill_avatar_size">16dp</dimen>
<dimen name="pill_min_height">20dp</dimen>
<dimen name="pill_text_padding">4dp</dimen>
<dimen name="call_pip_height">128dp</dimen>
<dimen name="call_pip_width">88dp</dimen>
<dimen name="call_pip_radius">8dp</dimen>
<dimen name="item_form_min_height">76dp</dimen>
<!-- Max width for some buttons -->
<dimen name="button_max_width">280dp</dimen>
<!-- Navigation Drawer -->
<dimen name="navigation_drawer_max_width">320dp</dimen>
<!-- Preview Url -->
<dimen name="preview_url_view_corner_radius">8dp</dimen>
<dimen name="preview_url_view_image_max_height">160dp</dimen>
<dimen name="menu_item_icon_size">24dp</dimen>
<dimen name="menu_item_size">48dp</dimen>
<dimen name="menu_item_ripple_size">48dp</dimen>
<dimen name="menu_item_width_small">34dp</dimen>
<dimen name="chat_bubble_margin_start">28dp</dimen>
<dimen name="chat_bubble_margin_end">6dp</dimen>
<dimen name="chat_bubble_fixed_size">350sp</dimen>
<dimen name="chat_bubble_corner_radius">8dp</dimen>
<!-- Onboarding -->
<item name="ftue_auth_gutter_start_percent" format="float" type="dimen">0.05</item>
<item name="ftue_auth_gutter_end_percent" format="float" type="dimen">0.95</item>
<item name="ftue_auth_carousel_item_spacing" format="float" type="dimen">0.01</item>
<item name="ftue_auth_carousel_item_image_height" format="float" type="dimen">0.35</item>
<item name="ftue_auth_profile_picture_height" format="float" type="dimen">0.15</item>
<item name="ftue_auth_profile_picture_icon_height" format="float" type="dimen">0.05</item>
<!-- Location sharing -->
<dimen name="location_sharing_option_default_padding">10dp</dimen>
<dimen name="location_sharing_locate_button_margin_vertical">16dp</dimen>
<dimen name="location_sharing_locate_button_margin_horizontal">12dp</dimen>
<dimen name="location_sharing_compass_button_margin_horizontal">8dp</dimen>
<dimen name="location_sharing_live_duration_choice_margin_horizontal">12dp</dimen>
<dimen name="location_sharing_live_duration_choice_margin_vertical">22dp</dimen>
<!-- Voice Broadcast -->
<dimen name="voice_broadcast_recorder_button_size">48dp</dimen>
<dimen name="voice_broadcast_player_button_size">36dp</dimen>
<!-- Material 3 -->
<dimen name="collapsing_toolbar_layout_medium_size">112dp</dimen>
<dimen name="release_notes_vertical_margin_small">8dp</dimen>
<dimen name="release_notes_vertical_margin">16dp</dimen>
<dimen name="release_notes_vertical_margin_large">28dp</dimen>
</resources>

30
libraries/elementresources/src/main/res/values/dimens_font.xml

@ -1,30 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2022 New Vector Ltd
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources>
<dimen name="text_size_title">24sp</dimen>
<dimen name="text_size_headline">18sp</dimen>
<dimen name="text_size_subtitle">16sp</dimen>
<dimen name="text_size_body">14sp</dimen>
<dimen name="text_size_caption">12sp</dimen>
<dimen name="text_size_micro">10sp</dimen>
<dimen name="text_size_nano">8sp</dimen>
<dimen name="text_size_button">14sp</dimen>
</resources>

63
libraries/elementresources/src/main/res/values/palette.xml

@ -1,63 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2022 New Vector Ltd
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="UnusedResources">
<!--
Define all the colors used across the Element Android project
Source: https://www.figma.com/file/X4XTH9iS2KGJ2wFKDqkyed/Compound?node-id=1338%3A17947
Some colors are not used, but we want the palette to be complete so we ignore the lint error
UnusedResources for all the resources in this file
-->
<!-- For all themes -->
<color name="palette_azure">#368BD6</color>
<color name="palette_kiwi">#74D12C</color>
<color name="palette_grape">#AC3BA8</color>
<color name="palette_verde">#03B381</color>
<color name="palette_polly">#E64F7A</color>
<color name="palette_melon">#FF812D</color>
<color name="palette_element_green">#0DBD8B</color>
<color name="palette_element_orange">#D9B072</color>
<color name="palette_white">#FFFFFF</color>
<color name="palette_vermilion">#FF5B55</color>
<!-- (unused) -->
<color name="palette_ems">#7E69FF</color>
<color name="palette_aqua">#2DC2C5</color>
<color name="palette_prune">#5C56F5</color>
<color name="palette_links">#0086E6</color>
<!-- For light themes -->
<color name="palette_gray_25">#F4F6FA</color>
<color name="palette_gray_50">#E3E8F0</color>
<color name="palette_gray_100">#C1C6CD</color>
<color name="palette_gray_150">#8D97A5</color>
<color name="palette_gray_200">#737D8C</color>
<color name="palette_black_900">#17191C</color>
<!-- (unused) -->
<color name="palette_ice">#F4F9FD</color>
<!-- For dark themes -->
<color name="palette_gray_250">#A9B2BC</color>
<color name="palette_gray_300">#8E99A4</color>
<color name="palette_gray_400">#6F7882</color>
<color name="palette_gray_450">#394049</color>
<color name="palette_black_800">#15191E</color>
<color name="palette_black_950">#21262C</color>
</resources>

72
libraries/elementresources/src/main/res/values/palette_mobile.xml

@ -1,72 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2022 New Vector Ltd
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources>
<!-- Alias to the palette colors
Source: https://www.figma.com/file/X4XTH9iS2KGJ2wFKDqkyed/Compound?node-id=1521%3A23026 -->
<color name="element_accent_light">@android:color/black</color>
<color name="element_accent_dark">@android:color/white</color>
<color name="element_alert_light">@color/palette_vermilion</color>
<color name="element_alert_dark">@color/palette_vermilion</color>
<color name="element_link_light">@color/palette_links</color>
<color name="element_link_dark">@color/palette_links</color>
<!-- attr for content colors -->
<attr name="vctr_content_primary" format="color" />
<attr name="vctr_content_secondary" format="color" />
<attr name="vctr_content_tertiary" format="color" />
<attr name="vctr_content_quaternary" format="color" />
<attr name="vctr_content_quinary" format="color" />
<color name="element_content_primary_light">@color/palette_black_900</color>
<color name="element_content_secondary_light">@color/palette_gray_200</color>
<color name="element_content_tertiary_light">@color/palette_gray_150</color>
<color name="element_content_quaternary_light">@color/palette_gray_100</color>
<color name="element_content_quinary_light">@color/palette_gray_50</color>
<color name="element_content_primary_dark">@color/palette_white</color>
<color name="element_content_secondary_dark">@color/palette_gray_250</color>
<color name="element_content_tertiary_dark">@color/palette_gray_300</color>
<color name="element_content_quaternary_dark">@color/palette_gray_400</color>
<color name="element_content_quinary_dark">@color/palette_gray_450</color>
<attr name="vctr_system" format="color" />
<color name="element_system_light">@color/palette_gray_25</color>
<color name="element_system_dark">@color/palette_black_950</color>
<color name="element_background_light">@color/palette_white</color>
<color name="element_background_dark">@color/palette_black_800</color>
<color name="element_background_black">@android:color/black</color>
<color name="element_name_01">@color/palette_azure</color>
<color name="element_name_02">@color/palette_grape</color>
<color name="element_name_03">@color/palette_verde</color>
<color name="element_name_04">@color/palette_polly</color>
<color name="element_name_05">@color/palette_melon</color>
<color name="element_name_06">@color/palette_aqua</color>
<color name="element_name_07">@color/palette_prune</color>
<color name="element_name_08">@color/palette_kiwi</color>
<!-- Also create alias for rooms -->
<color name="element_room_01">@color/palette_verde</color>
<color name="element_room_02">@color/palette_azure</color>
<color name="element_room_03">@color/palette_grape</color>
</resources>

28
libraries/elementresources/src/main/res/values/styles_bottom_sheet.xml

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2022 New Vector Ltd
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources>
<style name="BottomSheetItemTime">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:lines">1</item>
<item name="android:textColor">?vctr_content_secondary</item>
<item name="android:textSize">12sp</item>
</style>
</resources>

33
libraries/elementresources/src/main/res/values/styles_edit_text.xml

@ -1,33 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2022 New Vector Ltd
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources>
<style name="Widget.Vector.EditText.RichTextComposer" parent="Widget.AppCompat.EditText">
<item name="android:background">@android:color/transparent</item>
<item name="android:inputType">textCapSentences|textMultiLine</item>
<item name="android:maxLines">10</item>
<item name="android:minHeight">40dp</item>
<item name="android:paddingTop">10dp</item>
<item name="android:paddingBottom">10dp</item>
<item name="paddingStart">12dp</item>
<item name="android:clipToPadding">false</item>
<item name="android:textSize">15sp</item>
<item name="android:textColor">@color/element_content_primary_light</item>
</style>
</resources>

136
libraries/elementresources/src/main/res/values/theme_light.xml

@ -1,136 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2022 New Vector Ltd
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources>
<style name="Theme.ElementAndroid" parent="android:Theme.Material.Light.NoActionBar">
<!-- Element attribute for palette -->
<!-- content colors -->
<item name="vctr_content_primary">@color/element_content_primary_light</item>
<item name="vctr_content_secondary">@color/element_content_secondary_light</item>
<item name="vctr_content_tertiary">@color/element_content_tertiary_light</item>
<item name="vctr_content_quaternary">@color/element_content_quaternary_light</item>
<item name="vctr_content_quinary">@color/element_content_quinary_light</item>
<!-- system colors -->
<item name="vctr_system">@color/element_system_light</item>
<!-- other colors -->
<item name="vctr_fab_label_bg">@color/vctr_fab_label_bg_light</item>
<item name="vctr_fab_label_stroke">@color/vctr_fab_label_stroke_light</item>
<item name="vctr_fab_label_color">@color/vctr_fab_label_color_light</item>
<item name="vctr_touch_guard_bg">@color/vctr_touch_guard_bg_light</item>
<item name="vctr_keys_backup_banner_accent_color">@color/vctr_keys_backup_banner_accent_color_light</item>
<item name="vctr_room_active_widgets_banner_bg">@color/vctr_room_active_widgets_banner_bg_light</item>
<item name="vctr_room_active_widgets_banner_text">@color/vctr_room_active_widgets_banner_text_light</item>
<item name="vctr_reaction_background_off">@color/vctr_reaction_background_off_light</item>
<item name="vctr_reaction_background_on">@color/vctr_reaction_background_on_light</item>
<item name="vctr_waiting_background_color">@color/vctr_waiting_background_color_light</item>
<item name="vctr_chat_effect_snow_background">@color/vctr_chat_effect_snow_background_light</item>
<item name="vctr_toolbar_background">@color/element_background_light</item>
<item name="vctr_badge_color_border">@color/vctr_badge_color_border_light</item>
<!-- Presence Indicator colors -->
<item name="vctr_presence_indicator_offline">@color/vctr_presence_indicator_offline_light</item>
<item name="vctr_presence_indicator_online">@color/vctr_presence_indicator_online_light</item>
<item name="vctr_presence_indicator_busy">@color/vctr_presence_indicator_busy_light</item>
<item name="vctr_presence_indicator_away">@color/vctr_presence_indicator_away_light</item>
<!-- Some aliases -->
<item name="vctr_header_background">?vctr_system</item>
<item name="vctr_list_separator">?vctr_content_quinary</item>
<item name="vctr_list_separator_system">?vctr_system</item>
<item name="vctr_list_separator_on_surface">?vctr_system</item>
<item name="vctr_unread_background">?vctr_content_tertiary</item>
<!-- Material color -->
<item name="colorPrimary">@color/element_accent_light</item>
<item name="colorPrimaryVariant">@color/element_accent_light</item>
<item name="colorOnPrimary">@android:color/white</item>
<item name="colorSecondary">@color/element_accent_light</item>
<item name="colorSecondaryVariant">@color/element_accent_light</item>
<item name="colorOnSecondary">@android:color/white</item>
<item name="colorError">@color/element_alert_light</item>
<item name="colorOnError">@color/palette_white</item>
<item name="colorSurface">@color/element_system_light</item>
<item name="colorOnSurface">?vctr_content_primary</item>
<item name="android:colorBackground">@color/element_background_light</item>
<item name="colorOnBackground">?vctr_content_primary</item>
<!-- Default theme -->
<item name="android:textColorLink">@color/element_link_light</item>
<!-- Menu text color -->
<item name="android:actionMenuTextColor">?colorSecondary</item>
<!-- Default color for text View -->
<item name="android:textColorTertiary">@color/element_content_primary_light</item>
<!-- ANDROID SUPPORT ATTRIBUTES -->
<!-- disable the overscroll because setOverscrollHeader/Footer don't always work -->
<item name="android:overScrollMode">never</item>
<!--
<item name="preferenceTheme">@style/PreferenceThemeOverlay.v14.Material</item>
-->
<!--
<item name="lockscreen_theme">@style/PinCodeScreenStyle</item>
<item name="lockscreen_key_button_theme">@style/PinCodeKeyButtonStyle</item>
<item name="lockscreen_title_theme">@style/PinCodeTitleStyle</item>
<item name="lockscreen_hint_theme">@style/PinCodeHintStyle</item>
<item name="lockscreen_code_view_theme">@style/PinCodeDotsViewStyle</item>
<item name="lockscreen_delete_button_theme">@style/PinCodeDeleteButtonStyle</item>
<item name="lockscreen_fingerprint_button_theme">@style/PinCodeFingerprintButtonStyle</item>
<item name="lockscreen_next_theme">@style/PinCodeNextButtonStyle</item>
-->
<!-- Use dark color, to have enough contrast with icons color. windowLightStatusBar is only available in API 23+ -->
<item name="android:statusBarColor">@color/android_status_bar_background_dark</item>
<!-- Use dark color, to have enough contrast with icons color. windowLightNavigationBar is only available in API 27+ -->
<item name="android:navigationBarColor">@color/android_navigation_bar_background_dark</item>
<!-- enable window content transitions -->
<item name="android:windowContentTransitions">true</item>
<!--
<item name="vctr_social_login_button_google_style">@style/Widget.Vector.Button.Outlined.SocialLogin.Google.Light</item>
<item name="vctr_social_login_button_github_style">@style/Widget.Vector.Button.Outlined.SocialLogin.Github.Light</item>
<item name="vctr_social_login_button_facebook_style">@style/Widget.Vector.Button.Outlined.SocialLogin.Facebook.Light</item>
<item name="vctr_social_login_button_twitter_style">@style/Widget.Vector.Button.Outlined.SocialLogin.Twitter.Light</item>
<item name="vctr_social_login_button_apple_style">@style/Widget.Vector.Button.Outlined.SocialLogin.Apple.Light</item>
<item name="vctr_social_login_button_gitlab_style">@style/Widget.Vector.Button.Outlined.SocialLogin.Gitlab.Light</item>
-->
<!-- Keywords -->
<!--
<item name="vctr_keyword_style">@style/Widget.Vector.Keyword</item>
-->
<item name="vctr_toast_background">@color/vctr_toast_background_light</item>
<!-- Location sharing -->
<item name="vctr_live_location">@color/vctr_live_location_light</item>
<!-- Material 3 -->
<item name="collapsingToolbarLayoutMediumSize">@dimen/collapsing_toolbar_layout_medium_size</item>
<!-- WYSIWYG Editor -->
<item name="vctr_rich_text_editor_menu_button_background">@color/vctr_rich_text_editor_menu_button_background_light</item>
</style>
</resources>

1
libraries/permissions/impl/build.gradle.kts

@ -47,7 +47,6 @@ dependencies {
implementation(projects.libraries.matrix.api) implementation(projects.libraries.matrix.api)
implementation(projects.libraries.matrixui) implementation(projects.libraries.matrixui)
implementation(projects.libraries.designsystem) implementation(projects.libraries.designsystem)
implementation(projects.libraries.elementresources)
implementation(projects.libraries.uiStrings) implementation(projects.libraries.uiStrings)
api(projects.libraries.permissions.api) api(projects.libraries.permissions.api)

1
libraries/textcomposer/build.gradle.kts

@ -25,7 +25,6 @@ android {
} }
dependencies { dependencies {
implementation(projects.libraries.elementresources)
implementation(projects.libraries.uiStrings) implementation(projects.libraries.uiStrings)
implementation(projects.libraries.androidutils) implementation(projects.libraries.androidutils)
implementation(projects.libraries.core) implementation(projects.libraries.core)

4
libraries/textcomposer/src/main/kotlin/io/element/android/libraries/textcomposer/TextComposer.kt

@ -212,12 +212,12 @@ private fun EditingModeView(
.padding(horizontal = 12.dp, vertical = 8.dp)) { .padding(horizontal = 12.dp, vertical = 8.dp)) {
Icon( Icon(
resourceId = VectorIcons.Edit, resourceId = VectorIcons.Edit,
contentDescription = stringResource(R.string.editing), contentDescription = stringResource(CommonStrings.common_editing),
tint = MaterialTheme.colorScheme.secondary, tint = MaterialTheme.colorScheme.secondary,
modifier = Modifier.size(16.dp), modifier = Modifier.size(16.dp),
) )
Text( Text(
stringResource(R.string.editing), stringResource(CommonStrings.common_editing),
style = ElementTextStyles.Regular.caption2, style = ElementTextStyles.Regular.caption2,
textAlign = TextAlign.Start, textAlign = TextAlign.Start,
color = MaterialTheme.colorScheme.secondary, color = MaterialTheme.colorScheme.secondary,

24
libraries/textcomposer/src/main/res/color/selector_rich_text_menu_icon.xml

@ -1,24 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2022 New Vector Ltd
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false" android:color="?attr/vctr_content_quinary" />
<item android:state_pressed="true" android:color="?attr/colorSecondary" />
<item android:state_hovered="true" android:color="?attr/colorSecondary" />
<item android:state_selected="true" android:color="?attr/colorSecondary" />
<item android:color="?attr/vctr_content_tertiary" />
</selector>

36
libraries/textcomposer/src/main/res/drawable/ic_reply.xml

@ -1,36 +0,0 @@
<!--
~ Copyright (c) 2022 New Vector Ltd
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<vector android:autoMirrored="true"
android:height="25dp"
android:viewportHeight="25"
android:viewportWidth="25"
android:width="25dp"
xmlns:android="http://schemas.android.com/apk/res/android">
<path
android:fillColor="#00000000"
android:pathData="M13.9217,19.5H16.0147C18.4917,19.5 20.4997,17.4106 20.4997,14.8333C20.4997,12.256 18.4917,10.1666 16.0147,10.1666H6.5449"
android:strokeColor="#000000"
android:strokeLineCap="round"
android:strokeWidth="2" />
<path
android:fillColor="#00000000"
android:pathData="M9.1988,5.5L4.5,10.214L9.1988,14.9281"
android:strokeColor="#000000"
android:strokeLineCap="round"
android:strokeLineJoin="round"
android:strokeWidth="2" />
</vector>

27
libraries/textcomposer/src/main/res/values/dimens.xml

@ -1,27 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2022 New Vector Ltd
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources>
<dimen name="composer_min_height">56dp</dimen>
<dimen name="composer_attachment_size">52dp</dimen>
<dimen name="composer_attachment_margin">1dp</dimen>
<dimen name="rich_text_composer_corner_radius_single_line">28dp</dimen>
<dimen name="rich_text_composer_corner_radius_expanded">14dp</dimen>
<dimen name="rich_text_composer_menu_item_size">44dp</dimen>
</resources>

24
libraries/textcomposer/src/main/res/values/strings.xml

@ -1,24 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2022 New Vector Ltd
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources>
<string name="editing">Editing</string>
<string name="replying_to">Replying to %s</string>
<string name="quoting">Quoting</string>
</resources>

BIN
tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.actionlist_null_DefaultGroup_SheetContentDarkPreview_0_null_2,NEXUS_5,1.0,en].png (Stored with Git LFS)

Binary file not shown.

BIN
tests/uitests/src/test/snapshots/images/io.element.android.tests.uitests_ScreenshotTest_preview_tests[io.element.android.features.messages.impl.actionlist_null_DefaultGroup_SheetContentLightPreview_0_null_2,NEXUS_5,1.0,en].png (Stored with Git LFS)

Binary file not shown.
Loading…
Cancel
Save