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

Disable autocorrect in server settings input fields #7372

Conversation

bernhard-fp
Copy link

@bernhard-fp bernhard-fp commented Nov 20, 2023

Set textfield inputtypes to textNoSuggestions

First pull-request.
I hope I have understood the ticket correctly.

Fixes #7361

@cketti
Copy link
Member

cketti commented Nov 20, 2023

Welcome @bernhard-fp 👋

Thanks for wanting to contribute.

We're currently rewriting the account setup using Jetpack Compose. The new code can be found here:

The layout you've changed will be removed soon. So, sadly, this is not what we're looking for.

Issue #7361 contains a comment with links to the relevant documentation for Compose. Since we're wrapping Material composables to create our own design system, support for being able to specify KeyboardOptions has to be added in the module :core:ui:compose:designsystem first, e.g. TextFieldOutlined. Then the screens for incoming and outgoing server settings can be changed to make use of that new feature.

@bernhard-fp
Copy link
Author

@cketti Thank you. So I think I can start adding a new value keyboardOptions to IncomingFormItems->TextInput and set the autoCorrect value to false in the both screens you mentioned.
Per default it would be KeyboardOptions()

@cketti
Copy link
Member

cketti commented Nov 20, 2023

You should be able to copy the approach from one of the Material Composables we're wrapping, e.g.
https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/material/material/src/commonMain/kotlin/androidx/compose/material/OutlinedTextField.kt;l=149;drc=0ea8ee615a4f669d7ecfbcb657704a937fb5129d

Using KeyboardOptions.Default will avoid having to create a new instance when you don't want to override the default behavior.

@bernhard-fp
Copy link
Author

Hi @cketti, I reverted this first commit and added the KeyboardOptions to the belonging classes.
Unfortunately I can not test because on my Pixel7 and on my emulator I do not see any auto corrections.
But now autoCorrect=false is explicitly set.
Thanks for reviewing :-)

@bernhard-fp
Copy link
Author

Ok, added the change to both (incoming and outgoing)

@bernhard-fp
Copy link
Author

@cketti Could you please test if it matches the desired functionality?

Copy link
Member

@cketti cketti left a comment

Choose a reason for hiding this comment

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

Almost there 👍

Note: After changing a pull request, it's usually a good idea to do a self review to see if you missed something (like applying a change to all occurrences of a particular pattern).

@bernhard-fp bernhard-fp requested a review from cketti November 23, 2023 17:26
@bernhard-fp
Copy link
Author

@cketti Yes, I must have lost a bit of concentration there :-)
Did the changes you mentioned.

Copy link
Member

@cketti cketti left a comment

Choose a reason for hiding this comment

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

Thanks 👍

In the future please don't update a pull request branch by merging main (or any other branch) into it. That makes it unnecessarily hard to clean up the history before merging.
(This is also mentioned in the pull request template.)

Set `autoCorrect = false` in incoming and outgoing server settings text fields.
@cketti cketti force-pushed the 7361_disable_autocorrect_in_server_settings branch from 15f62ac to be7310a Compare November 24, 2023 15:15
@cketti cketti merged commit 5815506 into thunderbird:main Nov 24, 2023
2 checks passed
@bernhard-fp bernhard-fp deleted the 7361_disable_autocorrect_in_server_settings branch November 27, 2023 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disable autocorrect in server settings input fields
2 participants