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

Fix #4879: Add NPS survey models #4914

Merged
merged 23 commits into from
Apr 21, 2023
Merged

Fix #4879: Add NPS survey models #4914

merged 23 commits into from
Apr 21, 2023

Conversation

adhiamboperes
Copy link
Collaborator

@adhiamboperes adhiamboperes commented Mar 22, 2023

Explanation

Fix #4879.
This is Part 1 of 7 PRs that the add the new survey feature.

This PR adds the proto model and BUILD definitions required for the feature.

Essential Checklist

  • The PR title and explanation each start with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • Any changes to scripts/assets files have their rationale included in the PR explanation.
  • The PR follows the style guide.
  • The PR does not contain any unnecessary code changes from Android Studio (reference).
  • The PR is made from a branch that's not called "develop" and is up-to-date with "develop".
  • The PR is assigned to the appropriate reviewers (reference).

Copy link
Member

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

Thanks @adhiamboperes! Took a first pass--PTAL.

model/src/main/proto/survey.proto Outdated Show resolved Hide resolved
model/src/main/proto/survey.proto Show resolved Hide resolved
model/src/main/proto/survey.proto Outdated Show resolved Hide resolved
model/src/main/proto/survey.proto Outdated Show resolved Hide resolved
model/src/main/proto/survey.proto Outdated Show resolved Hide resolved
model/src/main/proto/survey.proto Outdated Show resolved Hide resolved
model/src/main/proto/survey.proto Outdated Show resolved Hide resolved
model/src/main/proto/survey.proto Outdated Show resolved Hide resolved
model/src/main/proto/survey.proto Outdated Show resolved Hide resolved
model/src/main/proto/survey.proto Outdated Show resolved Hide resolved
…CABLE_WONT_USE_OPPIA_ANYMORE

'NA' is a bit ambiguous, and the context is "won't use Oppia anymore". If they aren't using the app, they presumably wouldn't be filling out this survey.
For proto enums, we don't need to prefix-qualify each one since they'll be part of a generated Java enum -- except the first one since the unspecified constant should always repeat the enum name per proto convention.
Refactored to explain the ID format and the uniqueness guaranteed.
To convey that it is a multiple choice answer option.
Copy link
Collaborator Author

@adhiamboperes adhiamboperes left a comment

Choose a reason for hiding this comment

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

Hey @BenHenning, aside from these two review comments, I have addressed all of your previous comments and I'd like you to take another look. Thanks.

model/src/main/proto/survey.proto Show resolved Hide resolved
model/src/main/proto/survey.proto Outdated Show resolved Hide resolved
Copy link
Member

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

Thanks @adhiamboperes! Took an incremental pass. PTAL.

Once all of these are addressed, I'll take one more full pass just to make sure I didn't miss anything.

model/src/main/proto/survey.proto Outdated Show resolved Hide resolved
model/src/main/proto/survey.proto Outdated Show resolved Hide resolved
model/src/main/proto/survey.proto Outdated Show resolved Hide resolved
model/src/main/proto/survey.proto Outdated Show resolved Hide resolved
model/src/main/proto/survey.proto Outdated Show resolved Hide resolved
model/src/main/proto/survey.proto Outdated Show resolved Hide resolved
Leaving a proto list empty raises the potential ambiguity of an empty proto value, which can make it harder to reason about the model.

By using oneof, we can better control the structure of the message and make it clearer what fields are relevant to each question type.
We can use this field to filter open-ended responses in analytics
STARTED_NOT_COMPLETED is already used in topic.
Copy link
Member

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

Thanks @adhiamboperes! Took another pass--PTAL.

model/src/main/proto/oppia_logger.proto Show resolved Hide resolved
model/src/main/proto/survey.proto Outdated Show resolved Hide resolved
model/src/main/proto/survey.proto Outdated Show resolved Hide resolved
model/src/main/proto/survey.proto Outdated Show resolved Hide resolved
model/src/main/proto/survey.proto Outdated Show resolved Hide resolved
model/src/main/proto/survey.proto Outdated Show resolved Hide resolved
model/src/main/proto/survey.proto Outdated Show resolved Hide resolved
model/src/main/proto/survey.proto Outdated Show resolved Hide resolved
model/src/main/proto/survey.proto Outdated Show resolved Hide resolved
model/src/main/proto/survey.proto Outdated Show resolved Hide resolved
Also fixed some spacing issues and updated comments.
Copy link
Member

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

Thanks @adhiamboperes! The proto is looking really good, just had one comment about two fields left--PTAL.

model/src/main/proto/survey.proto Outdated Show resolved Hide resolved
model/src/main/proto/survey.proto Outdated Show resolved Hide resolved
Since we localize text in the frontend, these are represented by enums; SurveyQuestionName and oneof answer respectively.
Reorder field numbers after removing some fields.
Copy link
Member

@BenHenning BenHenning left a comment

Choose a reason for hiding this comment

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

Thanks @adhiamboperes. This LGTM!

I'll leave it to you to merge since it'll affect your downstream chain PR.

@oppiabot oppiabot bot added the PR: LGTM label Apr 21, 2023
@oppiabot
Copy link

oppiabot bot commented Apr 21, 2023

Hi @adhiamboperes, this PR is ready to be merged. Please address any remaining comments prior to merging, and feel free to merge this PR once the CI checks pass and you're happy with it. Thanks!

@seanlip seanlip merged commit a218247 into develop Apr 21, 2023
@seanlip seanlip deleted the nps-survey-models branch April 21, 2023 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create Model Protos for Surveys
3 participants