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

FTUE: Make entering a custom Homeserver address faster by focusing the input #6927

Merged
merged 1 commit into from
Aug 26, 2022
Merged

Conversation

noantiq
Copy link
Contributor

@noantiq noantiq commented Aug 24, 2022

Type of change

Content

When the server selection fragment is shown and after the previously entered or default server address is set, the input for the server gets selected and requests focus. At the same time the keyboard is shown so you can immediately type away when the fragment is shown. That should remove the need for two additional clicks, one to focus the input field and one to clear it.

Motivation and context

#6926

Screenshots / GIFs

Before After Light
Screenshot_20220824-145117 Screenshot_20220824-145338 Screenshot_20220824-145421

Tests

  • Start Element
  • Press "I ALREADY HAVE AN ACCOUNT"
  • Press "EDIT" next to the default homeserver adress
  • Go back or apply apply a change

  • Start Element
  • Press "CREATE ACCOUNT"
  • Press "Skip this question"
  • Press "EDIT" next to the default homeserver adress
  • Go back or apply apply a change

Tested devices

  • Physical
  • Emulator
  • OS version(s): Android 13

Checklist

Signed-off-by: Timuçin Boldt [email protected]

Copy link
Member

@bmarty bmarty left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!
One small remark to avoid code duplication.

views.chooseServerInput.editText().selectAll()
views.chooseServerInput.editText().requestFocus()
val inputMethodManager = views.chooseServerInput.editText().context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
inputMethodManager.showSoftInput(views.chooseServerInput.editText(), InputMethodManager.SHOW_IMPLICIT)
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh perfect thank you for that hint! Wasn't aware of it being available already but I will update the PR as soon as I can get back at my AS (tomorrow probably).

@ouchadam
Copy link
Contributor

great catch! 💯 making use of the extension will also fix the code quality check

@noantiq
Copy link
Contributor Author

noantiq commented Aug 25, 2022

So I updated the PR (force-push to have a cleaner history) and all the checks ran. There only seems to be an issue with sonarqube, but if I read the log correctly that should not be caused by my two lines of code.

@ouchadam ouchadam added the Z-Community-PR Issue is solved by a community member's PR label Aug 26, 2022
@ouchadam ouchadam merged commit da2eddd into element-hq:develop Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Z-Community-PR Issue is solved by a community member's PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FTUE: Make entering a custom Homeserver address faster
3 participants