Merge pull request #7689 from vector-im/feature/bma/pills_color
Fix bad pills color background.
This commit is contained in:
commit
a6904d2604
|
@ -0,0 +1 @@
|
|||
Fix bad pills color background. For light and dark theme the color is now 61708B (iso EleWeb)
|
|
@ -44,4 +44,4 @@
|
|||
<color name="palette_black_800">#15191E</color>
|
||||
<color name="palette_black_950">#21262C</color>
|
||||
|
||||
</resources>
|
||||
</resources>
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
<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>
|
||||
<item name="vctr_unread_background">?vctr_notice_secondary</item>
|
||||
|
||||
<!-- Material color -->
|
||||
<item name="colorPrimary">@color/element_accent_dark</item>
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
<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>
|
||||
<item name="vctr_unread_background">?vctr_notice_secondary</item>
|
||||
|
||||
<!-- Material color -->
|
||||
<item name="colorPrimary">@color/element_accent_light</item>
|
||||
|
|
|
@ -16,14 +16,9 @@
|
|||
|
||||
package im.vector.app.screenshot
|
||||
|
||||
import android.os.Build
|
||||
import android.widget.ImageView
|
||||
import android.widget.TextView
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import app.cash.paparazzi.DeviceConfig.Companion.PIXEL_3
|
||||
import app.cash.paparazzi.Paparazzi
|
||||
import app.cash.paparazzi.androidHome
|
||||
import app.cash.paparazzi.detectEnvironment
|
||||
import im.vector.app.R
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
|
@ -31,16 +26,7 @@ import org.junit.Test
|
|||
class PaparazziExampleScreenshotTest {
|
||||
|
||||
@get:Rule
|
||||
val paparazzi = Paparazzi(
|
||||
// Apply trick from https://github.com/cashapp/paparazzi/issues/489#issuecomment-1195674603
|
||||
environment = detectEnvironment().copy(
|
||||
platformDir = "${androidHome()}/platforms/android-32",
|
||||
compileSdkVersion = Build.VERSION_CODES.S_V2 /* 32 */
|
||||
),
|
||||
deviceConfig = PIXEL_3,
|
||||
theme = "Theme.Vector.Light",
|
||||
maxPercentDifference = 0.0,
|
||||
)
|
||||
val paparazzi = createPaparazziRule()
|
||||
|
||||
@Test
|
||||
fun `example paparazzi test`() {
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package im.vector.app.screenshot
|
||||
|
||||
import android.os.Build
|
||||
import app.cash.paparazzi.DeviceConfig.Companion.PIXEL_3
|
||||
import app.cash.paparazzi.Paparazzi
|
||||
import app.cash.paparazzi.androidHome
|
||||
import app.cash.paparazzi.detectEnvironment
|
||||
|
||||
fun createPaparazziRule() = Paparazzi(
|
||||
// Apply trick from https://github.com/cashapp/paparazzi/issues/489#issuecomment-1195674603
|
||||
environment = detectEnvironment().copy(
|
||||
platformDir = "${androidHome()}/platforms/android-32",
|
||||
compileSdkVersion = Build.VERSION_CODES.S_V2 /* 32 */
|
||||
),
|
||||
deviceConfig = PIXEL_3,
|
||||
theme = "Theme.Vector.Light",
|
||||
maxPercentDifference = 0.0,
|
||||
)
|
|
@ -0,0 +1,66 @@
|
|||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package im.vector.app.screenshot
|
||||
|
||||
import android.view.View
|
||||
import android.widget.TextView
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.core.view.isVisible
|
||||
import im.vector.app.R
|
||||
import im.vector.app.features.home.room.list.UnreadCounterBadgeView
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
|
||||
class RoomItemScreenshotTest {
|
||||
|
||||
@get:Rule
|
||||
val paparazzi = createPaparazziRule()
|
||||
|
||||
@Test
|
||||
fun `item room test`() {
|
||||
val view = paparazzi.inflate<ConstraintLayout>(R.layout.item_room)
|
||||
|
||||
view.findViewById<View>(R.id.roomUnreadIndicator).isVisible = true
|
||||
view.findViewById<TextView>(R.id.roomNameView).text = "Room name"
|
||||
view.findViewById<TextView>(R.id.roomLastEventTimeView).text = "12:34"
|
||||
view.findViewById<TextView>(R.id.subtitleView).text = "Latest message"
|
||||
view.findViewById<View>(R.id.roomDraftBadge).isVisible = true
|
||||
view.findViewById<UnreadCounterBadgeView>(R.id.roomUnreadCounterBadgeView).let {
|
||||
it.isVisible = true
|
||||
it.render(UnreadCounterBadgeView.State.Count(8, false))
|
||||
}
|
||||
|
||||
paparazzi.snapshot(view)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `item room two line and highlight test`() {
|
||||
val view = paparazzi.inflate<ConstraintLayout>(R.layout.item_room)
|
||||
|
||||
view.findViewById<View>(R.id.roomUnreadIndicator).isVisible = true
|
||||
view.findViewById<TextView>(R.id.roomNameView).text = "Room name"
|
||||
view.findViewById<TextView>(R.id.roomLastEventTimeView).text = "23:59"
|
||||
view.findViewById<TextView>(R.id.subtitleView).text = "Latest message\nOn two lines"
|
||||
view.findViewById<View>(R.id.roomDraftBadge).isVisible = true
|
||||
view.findViewById<UnreadCounterBadgeView>(R.id.roomUnreadCounterBadgeView).let {
|
||||
it.isVisible = true
|
||||
it.render(UnreadCounterBadgeView.State.Count(88, true))
|
||||
}
|
||||
|
||||
paparazzi.snapshot(view)
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d33e82c6647bab9dcb3745d8c5a5448d60049279c365b9f64816eb9c958360d2
|
||||
size 15015
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:91a106e2a3f7310ac05425a2413ccec0aaa07720609d77a2ecd9a9d0d602b296
|
||||
size 17232
|
Loading…
Reference in New Issue