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

Text question type should allow new lines, wrap text, and respect the rows attribute #6271

Merged
merged 3 commits into from
Jul 19, 2024

Conversation

grzesiek2010
Copy link
Member

@grzesiek2010 grzesiek2010 commented Jul 18, 2024

Closes #6270

The problem was that when we started setting input types programmatically (to support the masked appearance) we did that in the wrong way. Instead of adding
InputType.TYPE_TEXT_VARIATION_PASSWORD if needed to the default input types we removed the default ones always using only InputType.TYPE_CLASS_TEXT or InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_VARIATION_PASSWORD instead. Because of that, we lost InputType.TYPE_TEXT_FLAG_CAP_SENTENCES and InputType.TYPE_TEXT_FLAG_MULTI_LINE that normally are applied by default.

Why is this the best possible solution? Were any other approaches considered?

Instead of clearing the default input type and adding InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_VARIATION_PASSWORD we need to mix the existing input type with InputType.TYPE_CLASS_TEXT or InputType.TYPE_TEXT_VARIATION_PASSWORD.

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

Please verify that the masked appearance is working well with string widgets and that text fields can expand and have multiple lines (as it was before v2024.2).

Do we need any specific form for testing your changes? If so, please attach one.

I used this one:
maskedANDRows.xlsx

Does this change require updates to documentation? If so, please file an issue here and include the link below.

No.

Before submitting this PR, please make sure you have:

  • added or modified tests for any new or changed behavior
  • run ./gradlew connectedAndroidTest (or ./gradlew testLab) and confirmed all checks still pass
  • added a comment above any new strings describing it for translators
  • added any new strings with date formatting to DateFormatsTest
  • verified that any code or assets from external sources are properly credited in comments and/or in the about file.
  • verified that any new UI elements use theme colors. UI Components Style guidelines

@grzesiek2010 grzesiek2010 marked this pull request as ready for review July 18, 2024 08:30
@grzesiek2010 grzesiek2010 requested a review from seadowg July 18, 2024 08:30
@grzesiek2010 grzesiek2010 changed the base branch from master to v2024.2.x July 18, 2024 08:40
@grzesiek2010 grzesiek2010 changed the base branch from v2024.2.x to master July 18, 2024 08:40
@grzesiek2010 grzesiek2010 changed the base branch from master to v2024.2.x July 18, 2024 08:43
@lognaturel lognaturel added the high priority Should be looked at before other PRs/issues label Jul 18, 2024
@WKobus
Copy link

WKobus commented Jul 19, 2024

Tested with Success:

Verified on devices with Android 10, 14

Verified Cases:

@grzesiek2010 grzesiek2010 merged commit a5dc0e2 into getodk:v2024.2.x Jul 19, 2024
6 checks passed
seadowg pushed a commit to seadowg/collect that referenced this pull request Jul 24, 2024
Text question type should allow new lines, wrap text, and respect the rows attribute
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
behavior verified high priority Should be looked at before other PRs/issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Text question type should allow new lines, wrap text, and respect the rows attribute
4 participants