Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ABW-3268] Rename link connector #1196

Merged
merged 10 commits into from
Sep 16, 2024

Conversation

giannis-rdx
Copy link
Contributor

@giannis-rdx giannis-rdx commented Sep 13, 2024

Description

This PR adds functionality to rename link connectors.
Also minor update in Gateways screen based on zeplin screens.

How to test

  1. Navigate to Linked Connectors screen
  2. Edit a link connector by clicking on the pen icon

➡️ Ensure that link connection has not been affected (e.g. terminated or restarted)

Video

Screen_Recording_20240913_123402_Radix.Wallet.Dev.mp4

PR submission checklist

  • I have tested renaming linked connectors

Copy link
Contributor

@sergiupuhalschi-rdx sergiupuhalschi-rdx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works fine! I left a few minor UI related comments.

)
IconButton(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The spacing between the 2 icon buttons is larger than what's in Zeplin. I think this is because of Modifier.minimumInteractiveComponentSize from inside IconButton implementation. We can easily override the size to match Zeplin.

Copy link
Contributor Author

@giannis-rdx giannis-rdx Sep 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup but there is a reason that the minimumInteractiveComponentSize exists, and that's because of accessibility.
Wouldn't be a bad idea to break this min size?

Copy link
Contributor

@sergiupuhalschi-rdx sergiupuhalschi-rdx Sep 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, in such case this has to be communicated to Aftab, I think it's good to take Zeplin as the single source of truth in terms of design, pixel-perfect if possible.
At the same time, I think minimizing the touch area from 48.dp to 40.dp would bring us to the desired outcome without sacrificing much in terms of the touch area (8.dp is a quite small and negligible difference in my opinion)

textAlign = TextAlign.Center
)
Spacer(modifier = Modifier.height(RadixTheme.dimensions.paddingLarge))
RadixTextField(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to make the name input start with uppercase:
keyboardOptions = KeyboardOptions.Default.copy(capitalization = KeyboardCapitalization.Words)

val inputFocusRequester = remember { FocusRequester() }

LaunchedEffect(Unit) {
inputFocusRequester.requestFocus()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! A nice touch is to make the selector show at the end of the current name in the text field, so the user can either remove or edit the current name without the extra tap to set the selector at the right position.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was really looking for exactly this! Any idea how to do it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only way I know is to set selection to the text field value. As I see we're using OutlinedTextField, there is another composable for it that takes TextFieldValue type for the value param instead of String, where you can pass the selection index. Maybe we'd want our RadixTextField have a similar overloaded composable which would take a TextFieldValue param instead of String to be able to handle such cases.

Copy link
Contributor Author

@giannis-rdx giannis-rdx Sep 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see... thanks for the explanation.
However I see this as a separate task since I played around with the BasicTextField which can take a TextFieldValue as param, but needs more customization/styling in order to look the same as RadixTextField.

Therefore let's better take this in another ticket.

Copy link

sonarcloud bot commented Sep 16, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 40%)

See analysis details on SonarCloud

@@ -169,6 +170,10 @@ class AccountSettingsViewModel @Inject constructor(
sendEvent(Event.AccountHidden)
}
}

fun onSnackbarMessageShown() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we rename it to something related to isAccountNameUpdated ?

@giannis-rdx giannis-rdx merged commit c08c0a0 into main Sep 16, 2024
8 of 9 checks passed
@giannis-rdx giannis-rdx deleted the feature/ABW-3268-rename-link-connector branch September 16, 2024 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants