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

Added Support for optionExclusive Extension in Popup #2438

Merged

Conversation

asad-zaman
Copy link
Contributor

IMPORTANT: All PRs must be linked to an issue (except for extremely trivial and straightforward changes).

Fixes #2436

Description
Add optionExclusive extension support for answerOption in Popup for more than 10 items.

Alternative(s) considered
Have you considered any alternatives? And if so, why have you chosen the approach in this PR?

Type
Choose one: (Bug fix | Feature)

Screenshots (if applicable)
answer-option-exclusive-in-popup

Checklist

  • I have read and acknowledged the Code of conduct.
  • I have read the Contributing page.
  • I have signed the Google Individual CLA, or I am covered by my company's Corporate CLA.
  • I have discussed my proposed solution with code owners in the linked issue(s) and we have agreed upon the general approach.
  • I have run ./gradlew spotlessApply and ./gradlew spotlessCheck to check my code follows the style guide of this project.
  • I have run ./gradlew check and ./gradlew connectedCheck to test my changes locally.
  • I have built and run the demo app(s) to verify my change fixes the issue and/or does not break the demo app(s).

Copy link
Collaborator

@MJ1998 MJ1998 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 changes @asad-zaman

I think the solution is correct. I am just wondering if the number of options too huge then submitSelectedChange function should be optimized by tracking the items that are currently selected.

In the meantime, can you also add a testcase to verify the changes ?

MJ1998
MJ1998 previously requested changes Feb 12, 2024
Copy link
Collaborator

@MJ1998 MJ1998 left a comment

Choose a reason for hiding this comment

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

Requested changes above!

@joiskash joiskash assigned joiskash and unassigned joiskash Feb 12, 2024
@asad-zaman
Copy link
Contributor Author

Hi @MJ1998,
I have added the test cases to verify the changes. Thanks

Copy link
Collaborator

@joiskash joiskash left a comment

Choose a reason for hiding this comment

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

Can you please UTs to handle the two conditions described below:

  1. What happens if there are more than one option exclusive answer options eg: "No Problem", "Not Valid"
  2. What happens if there are "Other" rows already added and you click on option exclusive answer? eg: Open choice question with other options added.

@asad-zaman
Copy link
Contributor Author

Can you please UTs to handle the two conditions described below:

  1. What happens if there are more than one option exclusive answer options eg: "No Problem", "Not Valid"
  2. What happens if there are "Other" rows already added and you click on option exclusive answer? eg: Open choice question with other options added.

Hi @joiskash,
I have added the mentioned test cases. Please check. Thanks

Copy link
Collaborator

@joiskash joiskash left a comment

Choose a reason for hiding this comment

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

LGTM! cc: @jingtang10

@jingtang10 jingtang10 enabled auto-merge (squash) February 22, 2024 18:22
auto-merge was automatically disabled February 22, 2024 22:37

Head branch was pushed to by a user without write access

@jingtang10 jingtang10 enabled auto-merge (squash) February 23, 2024 14:33
auto-merge was automatically disabled February 27, 2024 07:09

Head branch was pushed to by a user without write access

@asad-zaman
Copy link
Contributor Author

Hi @jingtang10,
Could you please check now?

@jingtang10 jingtang10 enabled auto-merge (squash) February 28, 2024 17:00
@asad-zaman
Copy link
Contributor Author

HI @jingtang10,
Do I need to do anything from my side?

@asad-zaman
Copy link
Contributor Author

Hi @jingtang10,
Could you please merge this PR? It passes all the requirements. Thanks

@jingtang10 jingtang10 merged commit 7862d25 into google:master Mar 7, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

Questionnaire AnswerOption optionExclusive Extension does not work in Popup
5 participants