Skip to content

Commit da63c9e

Browse files
authored
[PM-17995] Adjust custom fields section (#4835)
1 parent e16ad44 commit da63c9e

File tree

4 files changed

+14
-12
lines changed

4 files changed

+14
-12
lines changed

app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditAdditionalOptions.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ fun LazyListScope.vaultAddEditAdditionalOptions(
136136
modifier = Modifier.fillMaxWidth(),
137137
)
138138
}
139+
Spacer(modifier = Modifier.height(height = 8.dp))
139140
}
140141

141142
item(key = "addCustomFieldButton") {
@@ -145,7 +146,7 @@ fun LazyListScope.vaultAddEditAdditionalOptions(
145146
.fillMaxWidth()
146147
.standardHorizontalMargin(),
147148
) {
148-
Spacer(modifier = Modifier.height(height = 16.dp))
149+
Spacer(modifier = Modifier.height(height = 8.dp))
149150
VaultAddEditCustomFieldsButton(
150151
onFinishNamingClick = commonTypeHandlers.onAddNewCustomFieldClick,
151152
options = persistentListOfNotNull(

app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditCustomFieldsButton.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ fun VaultAddEditCustomFieldsButton(
6767
}
6868
val focusManager = LocalFocusManager.current
6969
BitwardenOutlinedButton(
70-
label = stringResource(id = R.string.new_custom_field),
70+
label = stringResource(id = R.string.add_field),
7171
onClick = {
7272
// Clear any current focused item such as an unrelated text field.
7373
focusManager.clearFocus()

app/src/main/res/values/strings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1226,5 +1226,6 @@ Do you want to switch to this account?</string>
12261226
<string name="show_more">Show more</string>
12271227
<string name="no_folder">No folder</string>
12281228
<string name="show_less">Show less</string>
1229+
<string name="add_field">Add field</string>
12291230
<string name="x_ellipses">%s...</string>
12301231
</resources>

app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditScreenTest.kt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2285,7 +2285,7 @@ class VaultAddEditScreenTest : BaseComposeTest() {
22852285
}
22862286

22872287
@Test
2288-
fun `clicking New Custom Field button should allow creation of Linked type`() {
2288+
fun `clicking Add field button should allow creation of Linked type`() {
22892289
mutableStateFlow.value = DEFAULT_STATE_LOGIN
22902290

22912291
// Expand the additional options UI before interacting with it
@@ -2294,7 +2294,7 @@ class VaultAddEditScreenTest : BaseComposeTest() {
22942294
.performClick()
22952295

22962296
composeTestRule
2297-
.onNodeWithTextAfterScroll(text = "New custom field")
2297+
.onNodeWithTextAfterScroll(text = "Add field")
22982298
.performClick()
22992299

23002300
composeTestRule
@@ -2869,7 +2869,7 @@ class VaultAddEditScreenTest : BaseComposeTest() {
28692869
}
28702870

28712871
@Test
2872-
fun `clicking New Custom Field button should allow creation of Text type`() {
2872+
fun `clicking Add field button should allow creation of Text type`() {
28732873
mutableStateFlow.value = DEFAULT_STATE_SECURE_NOTES
28742874

28752875
// Expand the additional options UI before interacting with it
@@ -2878,7 +2878,7 @@ class VaultAddEditScreenTest : BaseComposeTest() {
28782878
.performClick()
28792879

28802880
composeTestRule
2881-
.onNodeWithTextAfterScroll(text = "New custom field")
2881+
.onNodeWithTextAfterScroll(text = "Add field")
28822882
.performClick()
28832883

28842884
composeTestRule
@@ -2910,7 +2910,7 @@ class VaultAddEditScreenTest : BaseComposeTest() {
29102910
}
29112911

29122912
@Test
2913-
fun `clicking New Custom Field button should not display linked type`() {
2913+
fun `clicking Add field button should not display linked type`() {
29142914
mutableStateFlow.value = DEFAULT_STATE_SECURE_NOTES
29152915

29162916
// Expand the additional options UI before interacting with it
@@ -2919,7 +2919,7 @@ class VaultAddEditScreenTest : BaseComposeTest() {
29192919
.performClick()
29202920

29212921
composeTestRule
2922-
.onNodeWithTextAfterScroll(text = "New custom field")
2922+
.onNodeWithTextAfterScroll(text = "Add field")
29232923
.performClick()
29242924

29252925
composeTestRule
@@ -2933,7 +2933,7 @@ class VaultAddEditScreenTest : BaseComposeTest() {
29332933
}
29342934

29352935
@Test
2936-
fun `clicking New Custom Field button should allow creation of Boolean type`() {
2936+
fun `clicking Add field button should allow creation of Boolean type`() {
29372937
mutableStateFlow.value = DEFAULT_STATE_SECURE_NOTES
29382938

29392939
// Expand the additional options UI before interacting with it
@@ -2942,7 +2942,7 @@ class VaultAddEditScreenTest : BaseComposeTest() {
29422942
.performClick()
29432943

29442944
composeTestRule
2945-
.onNodeWithTextAfterScroll(text = "New custom field")
2945+
.onNodeWithTextAfterScroll(text = "Add field")
29462946
.performClick()
29472947

29482948
composeTestRule
@@ -2974,7 +2974,7 @@ class VaultAddEditScreenTest : BaseComposeTest() {
29742974
}
29752975

29762976
@Test
2977-
fun `clicking New Custom Field button should allow creation of Hidden type`() {
2977+
fun `clicking Add field button should allow creation of Hidden type`() {
29782978
mutableStateFlow.value = DEFAULT_STATE_SECURE_NOTES
29792979

29802980
// Expand the additional options UI before interacting with it
@@ -2983,7 +2983,7 @@ class VaultAddEditScreenTest : BaseComposeTest() {
29832983
.performClick()
29842984

29852985
composeTestRule
2986-
.onNodeWithTextAfterScroll(text = "New custom field")
2986+
.onNodeWithTextAfterScroll(text = "Add field")
29872987
.performClick()
29882988

29892989
composeTestRule

0 commit comments

Comments
 (0)