-
Notifications
You must be signed in to change notification settings - Fork 286
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
Remove text field from the "Other" option in all User Input Questions #6181
Comments
ACs look good, thanks! 👍🏻 |
Hi @nfmohit please could you add a priority to this ticket. Thanks! |
You mention updating the A similar question for the changes to |
Thank you for the kind review and for adding the priority on my behalf, @tofumatt!
I was thinking of something like this just at the start of the function: But you're right, since the
My mistake here. The file should've been I have updated the IB with the above findings. Let me know what you think, thanks! |
Ohhh, I see what you're proposing now. Basically adding the "Other" option to the supplied options passed to the component. Given there's only three options, I think it'd be better to add the "Other" option to each object here:
It's less "DRY", but it also means we won't have to re-architect the questions if we ever want a question without an "Other" value, and it's also less complexity/code to write. Let's do it that way rather than trying to automate it 🙂 |
Makes sense, I've updated the IB. Thank you @tofumatt! |
Thanks @nfmohit, I think that's a lot more straightforward 🙂 IB ✅ |
…ext-field [User Input] Remove text field from `Other` options
Feature Description
All the user input question has an 'Other' options which allows users to input their own answers in a free form text field. This UI/UX should be removed from both User Input (including inline Edit) screen and the Settings (Edit) screens and replaced with a simple "Other" option without the text field.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation Brief
assets/js/components/user-input/util/constants.js
:getUserInputAnswers()
function, add a new property havingother
as the key andOther
(translatable) as the value at the end of each nested object (answer item).assets/js/components/user-input/UserInputSelectOptions.js
:return
statement, remove thediv.googlesitekit-user-input__select-option
containing theOther
<ListComponent />
.other
hasOtherError
disabled
inputRef
and its usages.onOtherChange
onOtherBlur
assets/js/components/user-input/UserInputPreviewGroup.js
:sprintfTemplate
variable.assets/sass/components/user-input/googlesitekit-user-input-controls.scss
:.googlesitekit-user-input__select-option .mdc-text-field
..googlesitekit-user-input__select-option-text-field
.Test Coverage
QA Brief
userInput
feature flag is enabled in the tester plugin.Other
option at the end has no text field.Other
option without the text field works as expected all along.Changelog entry
The text was updated successfully, but these errors were encountered: