From 6ec1d543aea3e85a3c302817305e0c629a2e837d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yamal=20C=C3=A9sar=20Al-Mahamid=20V=C3=A9lez?= Date: Tue, 10 Sep 2024 10:20:47 +0200 Subject: [PATCH] ANDROID-15138 Search Input in compose (#380) * ANDROID-15138 Search Input in compose * ANDROID-15138 Clear search input button * ANDROID-15138 Reorder composable params * ANDROID-15138 screenhot tests * ANDROID-15138 add disabled state catalog sample and test * ANDROID-15138 fix compilation * ANDROID-15138 (test) try with hardcoded colors because test doesn't have xml theme * Updated screenshots baseline * ANDROID-15138 Fix click on clear input test * ANDROID-15138 Add helper text * Updated screenshots baseline --------- Co-authored-by: yamal-alm --- .../catalog/ui/compose/components/Inputs.kt | 25 ++++++ library/screenshots/disabled_SearchInput.png | Bin 0 -> 10804 bytes library/screenshots/empty_SearchInput.png | Bin 0 -> 12020 bytes library/screenshots/non_empty_SearchInput.png | Bin 0 -> 14351 bytes .../mistica/compose/input/SearchInput.kt | 69 +++++++++++++++ .../mistica/compose/input/TextInputImpl.kt | 6 ++ .../compose/input/TextInputTestTags.kt | 1 + .../main/res/drawable/ic_close_regular.xml | 9 ++ .../main/res/drawable/ic_search_regular.xml | 9 ++ .../strings_content_descriptions.xml | 1 + .../strings_content_descriptions.xml | 1 + .../strings_content_descriptions.xml | 1 + .../strings_content_descriptions.xml | 1 + .../values/strings_content_descriptions.xml | 1 + .../mistica/compose/input/SearchInputTest.kt | 80 ++++++++++++++++++ 15 files changed, 204 insertions(+) create mode 100644 library/screenshots/disabled_SearchInput.png create mode 100644 library/screenshots/empty_SearchInput.png create mode 100644 library/screenshots/non_empty_SearchInput.png create mode 100644 library/src/main/java/com/telefonica/mistica/compose/input/SearchInput.kt create mode 100644 library/src/main/res/drawable/ic_close_regular.xml create mode 100644 library/src/main/res/drawable/ic_search_regular.xml create mode 100644 library/src/test/java/com/telefonica/mistica/compose/input/SearchInputTest.kt diff --git a/catalog/src/main/java/com/telefonica/mistica/catalog/ui/compose/components/Inputs.kt b/catalog/src/main/java/com/telefonica/mistica/catalog/ui/compose/components/Inputs.kt index ab268b274..beb0e2806 100644 --- a/catalog/src/main/java/com/telefonica/mistica/catalog/ui/compose/components/Inputs.kt +++ b/catalog/src/main/java/com/telefonica/mistica/catalog/ui/compose/components/Inputs.kt @@ -31,6 +31,7 @@ import com.telefonica.mistica.compose.input.LimitCharacters import com.telefonica.mistica.compose.input.NumberInput import com.telefonica.mistica.compose.input.PasswordInput import com.telefonica.mistica.compose.input.PhoneInput +import com.telefonica.mistica.compose.input.SearchInput import com.telefonica.mistica.compose.input.TextAreaInput import com.telefonica.mistica.compose.input.TextInput import com.telefonica.mistica.compose.input.TextLink @@ -81,6 +82,9 @@ fun Inputs() { DropDownSample() Title("Disable Dropdown") DropDownSample(enabled = false) + Title("Search Input") + SearchInputSample(enabled = true) + SearchInputSample(enabled = false) Title("Inverse inputs") Column( modifier = Modifier @@ -444,4 +448,25 @@ private fun DropDownSample(enabled: Boolean = true) { }, enabled = enabled ) +} + +@Composable +private fun SearchInputSample(enabled: Boolean) { + var text by remember { + mutableStateOf("") + } + + SearchInput( + modifier = Modifier + .fillMaxWidth() + .padding(top = 8.dp, start = 16.dp, end = 16.dp) + , + value = text, + onValueChange = { + text = it + }, + label = "Search Something", + helperText = "Some helper text", + enabled = enabled, + ) } \ No newline at end of file diff --git a/library/screenshots/disabled_SearchInput.png b/library/screenshots/disabled_SearchInput.png new file mode 100644 index 0000000000000000000000000000000000000000..d4bbc4f90bbd01fa50453f0dbb7b9fd9af1fc1f2 GIT binary patch literal 10804 zcmdUVc|27A_dm&!3<=pIm1KY0CHs~ZQBwA$tYfSh%h*cxh>}9~7E9J)24k$1B8?@+ z7{*9tn=!J?*oNOlpXHD5U%&r8_m6qpx%a-#>%7i6ud_X0Nfzd&Aa)^k1_lO@*(IYJ z3=D@gfcpV97U1_h@1YUkcgxI3-zwCRJYf?wZj!SY5V_Q}&?H3rcwa;ElZ)y71X$;E zP=u__@eu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M1=$LBboh;(ncUCqHu02_sy=a&!u3$^$Z@!ttmJXfX(&D z;uk7HC^{dio_n+x73W&ofxb`N4Wl;kFq-Dmk@c03@7Ab+*K%F~Zga|e@-7^2)*<@8 zsJUu>jTH>e&Bi%s0#hOoP%xx{UIzOQ*VyXG;VR*odLHFN+ArLU`C$N3&;Hj__y;0%_DEW7+~9V{?$4ycx>+3L7F zL0Jh;cP0GneBO6h#MT`6Pn)H*jSAhe`!uE&wx&so={h1bAIBWF=0s@OKttuwzLw6* zt8*W#q^GBE62daxANamZAaTidd)Mcu4!gm+DWvg4JD;tppdmLGHYMsONt`7MvmqZg zK<>G_SB;qW%0G42_&Ge&!jzWuuW#H^JDzlyqMRInIt`(mmLj z@?SF)jJvU`N1;Ub(oW81K7)vzy5q94^4;?nu9|DFRSjHiKZW$A#c3s%65_KUv$Tkx zq(c%Z9<&DR7dR%2Rb=r*4SRsfmXRGwvakJf$?l@+>KJZ%k(5^dM!Iix-@jV`;*TC9 z5K=%{3)!zCgyeH;u%41c|JXPc9-iwh;GYwFY!5f|`J2R}qX&;?^in553V{CsjqIH) z`kc6;rDHy8s{B_hfcY3~O-*ePoN3#Hkj`o9t4qp^37v=KvIT^iXC_SHY&ka40ogh; zqW+0lNuG#DcrH7s;o-}>>gv;1Zq5(?xnqYsuJdzPXE;+pQCGpT~-K0=1=(Rck_EQnHifKRT(%x{D0t}sr~=} literal 0 HcmV?d00001 diff --git a/library/screenshots/empty_SearchInput.png b/library/screenshots/empty_SearchInput.png new file mode 100644 index 0000000000000000000000000000000000000000..8b359b0e0efdfb3022ea794778de35cca0e60852 GIT binary patch literal 12020 zcmdsdXH-*5^e+}HprF#FU8RUrL1|K=B3*j#(xmqiAru7xr3zA%UPM4j2m~-x14<|Y zf|LM(fPnObn$Qy70q^zR^?zU9$M@d(kabpO&di>@XV>3;rLC!ak?JZH1qH=LRh5Uj z6cneWfcO4$XMo?E^e2ZYD1;kSAKur0YPmWwnnrKXOz^^CTXOdgPT&`t<%&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N%F z3LzPJRH6)Kk@ddQ->b>>dr3cHmZ({%=yj#JU zSr3$4YO*cqYeNoe4*Rc-lH*)pE?nmShJE&NFQ_Iq!vg7?WglB?`KZLAA!Ye^|& zp^`r^7%M8v#fax*2C$W@G==83VlAw!CJ*xjJV=~Dib9hrooHUk3#m38=QHo2uw zK25Sx-qNYRHF^(kwIU^^;o!x-`1szkY@9}|drVp6)a_INmwW+8NA<+5i?QP>Ip>89 z6;Lx4ZJMT}xgs||Q64m*ukQM2q{<5QYdNiLk#>20{s#-BZ2wnnV`HVlXB95~;9_;r z-y7tI9vua2SJlogM#6LQC1P>58A^$Cy5^qhI>R7-IPB|&Q(RGTB*tn`F&8C7JGi?o zucRV*SWSouAr^Igmz`$vk(n(bzxn+IwBBN0@%=|h}=%hQX$D=<#6 z|0jYw#+BU~X~OMY-x3`-ewQ!(4gbOVf0kt@Y?VqP%jtLLPw)KIl(Zg{DLi@pzW~(b BSx*1} literal 0 HcmV?d00001 diff --git a/library/src/main/java/com/telefonica/mistica/compose/input/SearchInput.kt b/library/src/main/java/com/telefonica/mistica/compose/input/SearchInput.kt new file mode 100644 index 000000000..e2cd4211c --- /dev/null +++ b/library/src/main/java/com/telefonica/mistica/compose/input/SearchInput.kt @@ -0,0 +1,69 @@ +package com.telefonica.mistica.compose.input + +import androidx.compose.material.Icon +import androidx.compose.material.IconButton +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.platform.testTag +import androidx.compose.ui.res.painterResource +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.input.KeyboardType +import androidx.compose.ui.text.input.VisualTransformation +import com.telefonica.mistica.R +import com.telefonica.mistica.compose.theme.MisticaTheme + +@Composable +fun SearchInput( + value: String, + onValueChange: (String) -> Unit, + label: String?, + modifier: Modifier = Modifier, + helperText: String? = null, + isError: Boolean = false, + errorText: String? = null, + isInverse: Boolean = false, + enabled: Boolean = true, + readOnly: Boolean = false, + onClick: (() -> Unit)? = null, + visualTransformation: VisualTransformation = VisualTransformation.None, + keyboardOptions: KeyboardOptions = KeyboardOptions.Default, +) { + TextInputImpl( + modifier = modifier, + value = value, + onValueChange = onValueChange, + label = label, + helperText = helperText, + isError = isError, + errorText = errorText, + isInverse = isInverse, + enabled = enabled, + readOnly = readOnly, + onClick = onClick, + visualTransformation = visualTransformation, + keyboardOptions = keyboardOptions.toFoundationKeyboardOptions( + keyboardType = KeyboardType.Text + ), + leadingIcon = { + Icon( + painter = painterResource(id = R.drawable.ic_search_regular), + tint = MisticaTheme.colors.neutralHigh, + contentDescription = null + ) + }, + trailingIcon = { + IconButton( + modifier = Modifier.testTag(TextInputTestTags.CLEAR_SEARCH_BUTTON), + onClick = { + onValueChange("") + } + ) { + Icon( + painter = painterResource(id = R.drawable.ic_close_regular), + tint = MisticaTheme.colors.neutralHigh, + contentDescription = stringResource(id = R.string.clear_search_content_description), + ) + } + } + ) +} \ No newline at end of file diff --git a/library/src/main/java/com/telefonica/mistica/compose/input/TextInputImpl.kt b/library/src/main/java/com/telefonica/mistica/compose/input/TextInputImpl.kt index d43c95ba3..866d6c756 100644 --- a/library/src/main/java/com/telefonica/mistica/compose/input/TextInputImpl.kt +++ b/library/src/main/java/com/telefonica/mistica/compose/input/TextInputImpl.kt @@ -42,6 +42,7 @@ internal fun TextInputImpl( visualTransformation: VisualTransformation, keyboardOptions: FoundationKeyboardOptions, underlineEnd: @Composable (() -> Unit)? = null, + leadingIcon: @Composable (() -> Unit)? = null, ) { Column( modifier = modifier @@ -52,6 +53,7 @@ internal fun TextInputImpl( onValueChange = onValueChange, label = label, isError = isError, + leadingIcon = leadingIcon, trailingIcon = trailingIcon, enabled = enabled, readOnly = readOnly, @@ -84,6 +86,7 @@ private fun TextBox( onValueChange: (String) -> Unit, label: String?, isError: Boolean, + leadingIcon: @Composable (() -> Unit)?, trailingIcon: @Composable (() -> Unit)?, enabled: Boolean, readOnly: Boolean, @@ -129,6 +132,7 @@ private fun TextBox( interactionSource = interactionSource, keyboardOptions = keyboardOptions, isError = isError, + leadingIcon = leadingIcon, trailingIcon = trailingIcon, shape = RoundedCornerShape(MisticaTheme.radius.inputBorderRadius), colors = TextFieldDefaults.textFieldColors( @@ -188,6 +192,7 @@ fun PreviewTextInput() { helperText = "helperText", isError = false, errorText = "", + leadingIcon = { }, trailingIcon = { }, isInverse = false, enabled = true, @@ -208,6 +213,7 @@ fun PreviewEmptyTextInput() { helperText = "helperText", isError = false, errorText = "", + leadingIcon = { }, trailingIcon = { }, isInverse = false, enabled = true, diff --git a/library/src/main/java/com/telefonica/mistica/compose/input/TextInputTestTags.kt b/library/src/main/java/com/telefonica/mistica/compose/input/TextInputTestTags.kt index 5525c222a..854fee1c2 100644 --- a/library/src/main/java/com/telefonica/mistica/compose/input/TextInputTestTags.kt +++ b/library/src/main/java/com/telefonica/mistica/compose/input/TextInputTestTags.kt @@ -3,4 +3,5 @@ package com.telefonica.mistica.compose.input object TextInputTestTags { const val TEXT_INPUT = "text_input" const val PASSWORD_VISIBILITY_TOGGLE = "password_visibility_toggle" + const val CLEAR_SEARCH_BUTTON = "clear_search_button" } diff --git a/library/src/main/res/drawable/ic_close_regular.xml b/library/src/main/res/drawable/ic_close_regular.xml new file mode 100644 index 000000000..a9d86e0d1 --- /dev/null +++ b/library/src/main/res/drawable/ic_close_regular.xml @@ -0,0 +1,9 @@ + + + diff --git a/library/src/main/res/drawable/ic_search_regular.xml b/library/src/main/res/drawable/ic_search_regular.xml new file mode 100644 index 000000000..bff4fbb36 --- /dev/null +++ b/library/src/main/res/drawable/ic_search_regular.xml @@ -0,0 +1,9 @@ + + + diff --git a/library/src/main/res/values-de/strings_content_descriptions.xml b/library/src/main/res/values-de/strings_content_descriptions.xml index 5db2d3776..643cbc0e1 100644 --- a/library/src/main/res/values-de/strings_content_descriptions.xml +++ b/library/src/main/res/values-de/strings_content_descriptions.xml @@ -3,4 +3,5 @@ Fenster schließen Neue Inhalte Wechseln + Suche löschen diff --git a/library/src/main/res/values-en/strings_content_descriptions.xml b/library/src/main/res/values-en/strings_content_descriptions.xml index 3fa65e760..06a91a267 100644 --- a/library/src/main/res/values-en/strings_content_descriptions.xml +++ b/library/src/main/res/values-en/strings_content_descriptions.xml @@ -3,4 +3,5 @@ Close window New content toggle + Clear search diff --git a/library/src/main/res/values-es/strings_content_descriptions.xml b/library/src/main/res/values-es/strings_content_descriptions.xml index 025666d52..dde4db426 100644 --- a/library/src/main/res/values-es/strings_content_descriptions.xml +++ b/library/src/main/res/values-es/strings_content_descriptions.xml @@ -3,4 +3,5 @@ Cerrar ventana Contenido nuevo alternar + Borrar búsqueda diff --git a/library/src/main/res/values-pt/strings_content_descriptions.xml b/library/src/main/res/values-pt/strings_content_descriptions.xml index 82a63b9f5..e41f5d889 100644 --- a/library/src/main/res/values-pt/strings_content_descriptions.xml +++ b/library/src/main/res/values-pt/strings_content_descriptions.xml @@ -3,4 +3,5 @@ Fechar janela Novos conteúdos alternar + Apagar pesquisa diff --git a/library/src/main/res/values/strings_content_descriptions.xml b/library/src/main/res/values/strings_content_descriptions.xml index 025666d52..dde4db426 100644 --- a/library/src/main/res/values/strings_content_descriptions.xml +++ b/library/src/main/res/values/strings_content_descriptions.xml @@ -3,4 +3,5 @@ Cerrar ventana Contenido nuevo alternar + Borrar búsqueda diff --git a/library/src/test/java/com/telefonica/mistica/compose/input/SearchInputTest.kt b/library/src/test/java/com/telefonica/mistica/compose/input/SearchInputTest.kt new file mode 100644 index 000000000..1d65ae96d --- /dev/null +++ b/library/src/test/java/com/telefonica/mistica/compose/input/SearchInputTest.kt @@ -0,0 +1,80 @@ +package com.telefonica.mistica.compose.input + +import androidx.compose.ui.test.junit4.createComposeRule +import androidx.compose.ui.test.onNodeWithTag +import androidx.compose.ui.test.onRoot +import androidx.compose.ui.test.performClick +import com.telefonica.mistica.compose.theme.MisticaTheme +import com.telefonica.mistica.compose.theme.brand.MovistarBrand +import com.telefonica.mistica.testutils.ScreenshotsTest +import org.junit.Rule +import org.junit.Test +import org.junit.runner.RunWith +import org.mockito.kotlin.mock +import org.mockito.kotlin.verify +import org.robolectric.RobolectricTestRunner + +@RunWith(RobolectricTestRunner::class) +class SearchInputTest : ScreenshotsTest() { + + private val onValueChangeMock: (String) -> Unit = mock() + + @get:Rule + val composeTestRule = createComposeRule() + + @Test + fun `empty SearchInput`() { + givenSomeSearchInput(value = "") + + thenScreenshotIsOk() + } + + @Test + fun `non empty SearchInput`() { + givenSomeSearchInput(value = "Something") + + thenScreenshotIsOk() + } + + @Test + fun `disabled SearchInput`() { + givenSomeSearchInput(value = "", enabled = false) + + thenScreenshotIsOk() + } + + @Test + fun `SearchInput is cleared when clicking on clear search button`() { + givenSomeSearchInput(value = "Something") + + whenClickingOnClearSearch() + + thenValueIsNowEmptyString() + } + + private fun givenSomeSearchInput(value: String, enabled: Boolean = true) { + composeTestRule.setContent { + MisticaTheme(brand = MovistarBrand) { + SearchInput( + value = value, + onValueChange = onValueChangeMock, + label = "Search something", + helperText = "Helper text", + enabled = enabled + ) + } + } + } + + private fun whenClickingOnClearSearch() { + composeTestRule.onNodeWithTag(TextInputTestTags.CLEAR_SEARCH_BUTTON).performClick() + } + + private fun thenScreenshotIsOk() { + compareScreenshot(composeTestRule.onRoot()) + } + + private fun thenValueIsNowEmptyString() { + verify(onValueChangeMock).invoke("") + } +}