ground-android icon indicating copy to clipboard operation
ground-android copied to clipboard

[Select one - other] Deselecting "other" option doesn't hide/disable "Other" text

Open gino-m opened this issue 1 year ago • 11 comments

When "other" option is disabled, either by clicking another radio box (select one) or by deselected the "other" checkbox (select many), the other text remains visible in the UI,

@rawbzz @vittorino What is the expected behavior here? @justinkimtang FYI

Screen_recording_20240322_160349.webm

gino-m avatar Mar 20 '24 13:03 gino-m

@gino-m do you have a screenshot of what you're referring to?

rawbzz avatar Mar 21 '24 14:03 rawbzz

@gino-m do you have a screenshot of what you're referring to?

Sure! Just added to the description above.

gino-m avatar Mar 22 '24 15:03 gino-m

@gino-m thank you! I feel like it makes sense to only have the other option text field to show up when someone selects other. That way if they choose option a or b the other text field just disappears cc: @vittorino for his thoughts

rawbzz avatar Mar 22 '24 17:03 rawbzz

Hello @gino-m,

Can I work on this issue?

Thanks, Surya

NudurupatiSurya avatar May 31 '24 20:05 NudurupatiSurya

Yes, please! Can you also verify this is still occurring?

gino-m avatar Jun 02 '24 11:06 gino-m

Hi @gino-m,

Thank you! I just verified that the issue is still occurring. Please find the attached screen recording for reference.

https://github.com/google/ground-android/assets/53263580/c0165c8b-5c35-4c06-b7f9-cafe2b84c4a4

To confirm, the expected functionality is that the text box should only be shown when the "Other" option is selected. If the user selects options A or B, the text box should hide. Is that correct, or should the text box be in a disabled state when the user selects options A or B?

Looking forward to your input to ensure I'm moving in the right direction.

Best, Surya

NudurupatiSurya avatar Jun 03 '24 21:06 NudurupatiSurya

Thank you for confirming.

To confirm, the expected functionality is that the text box should only be shown when the "Other" option is selected. If the user selects options A or B, the text box should hide.

Good question. I think the "Other" behavior should actually be as follows:

  • Entering text into the "Other" textbox causes the "Other" option to be automatically selected.
  • When selecting a different option, the text is left as-is, but isn't saved in the response.

Please let me know if you have any other questions!

gino-m avatar Jun 04 '24 12:06 gino-m

Thank you for clarifying! I will have a PR up by Wednesday.

NudurupatiSurya avatar Jun 10 '24 06:06 NudurupatiSurya

Hello Gino,

Sorry for the delayed response. I checked the current implementation, and the behavior seems correct—entering text into the "Other" textbox selects the "Other" option, and the response is not sent if the "Other" option is not selected.

I observed that the keyboard stays up if we select the "Other" option and then select a different option. Should we make the keyboard hide in this case?

Looking forward to your direction 😊

Best, Surya

NudurupatiSurya avatar Jun 14 '24 02:06 NudurupatiSurya

Focus from the "other" text should also be removed once any other option is selected.

shobhitagarwal1612 avatar Jun 14 '24 05:06 shobhitagarwal1612

Hello @gino-m & @shobhitagarwal1612,

Thank you for your guidance! I have just raised PR #2528 for this issue. Please review it and provide your feedback.

Thanks, Surya

NudurupatiSurya avatar Jun 28 '24 19:06 NudurupatiSurya

@NudurupatiSurya I've updated this issue's title and description in case you'd like to try this again! Sorry if it wasn't clear before.

gino-m avatar Dec 03 '24 22:12 gino-m

@NudurupatiSurya I've updated this issue's title and description in case you'd like to try this again! Sorry if it wasn't clear before.

Hi @gino-m, Sorry for the delayed response. Thank you for updating the issue's title & description. I will update the PR by the end of this week.

NudurupatiSurya avatar Dec 09 '24 00:12 NudurupatiSurya

Hi [@gino-m](https://github.com/gino-m), Sorry for the delayed response. Thank you for updating the issue's title & description. I will update the PR by the end of this week.

Great, please reply here if you have any questions. Feel free to send an early draft PR to get early feedback.

gino-m avatar Dec 09 '24 15:12 gino-m