Skip to content
This repository has been archived by the owner on Mar 15, 2018. It is now read-only.

fix devhub ratings success msg for public apps (bug 950948) #1568

Merged
merged 1 commit into from Dec 20, 2013

Conversation

ngokevin
Copy link
Contributor

Rewrite the logic for showing the success message for content ratings.

Ratings can be created via IARC pinging our API.
Thus we can't display a success message via the standard POST/req/res.
To workaround, we stored app's rating's `modified` from edit page.
When hitting back to the ratings summary page, calc what msg to show.

There are two messages to show:

  • message A (app completion): "Congrats, your app is complete and is now being reviewed."
  • message B (content ratings saved): "Content ratings successfully saved."

Here are the cases on which messages to show:

  1. if app's status upgrades to PENDING when going from edit -> summary page, show message A.
  2. else if content ratings were updated when going from edit -> summary page, show message B.

@ngokevin
Copy link
Contributor Author

@mstriemer r?

if addon.is_rated():
request.session['ratings_last_modified'] = (
# Save some information for _ratings_success_msg.
request.session['ratings_edit'] = {
Copy link
Contributor

Choose a reason for hiding this comment

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

I've never been through this IARC ratings flow but this looks like you could only process one application at a time. If it is something that takes some time I could see people going through a few apps at the same time in multiple tabs. This may or may not be an issue, I am not sure.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It'd be a small edge case with a not too devastating effect (the developer gets no success message).

I'll attempt to key it by app ID, shouldn't be too bad.

@mstriemer
Copy link
Contributor

r+wc

ngokevin added a commit that referenced this pull request Dec 20, 2013
fix devhub ratings success msg for public apps (bug 950948)
@ngokevin ngokevin merged commit 79d9af2 into mozilla:master Dec 20, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants