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(amp-user-notification): generate ampUserId by default #1381

Merged
merged 1 commit into from
Feb 11, 2016

Conversation

erwinmombay
Copy link
Member

No description provided.

The id will be the same for this user going forward, but no other requests
in AMP send the same id.
You can use the id on your side to lookup/store whether the user has
dismissed the notification before.
Please not that the value of `ampUserId` may be the string `null` if no
Copy link
Contributor

Choose a reason for hiding this comment

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

"note"

Copy link
Member Author

Choose a reason for hiding this comment

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

😸 done.

@rudygalfi
Copy link
Contributor

cc @Meggin for docs review

@erwinmombay
Copy link
Member Author

@cramforce per discussion, changing this to no argument

The id will be the same for this user going forward, but no other requests
in AMP send the same id.
You can use the id on your side to lookup/store whether the user has
dismissed the notification before.
Please note that the value of `ampUserId` may be the string "null" if no
fallback cookie value was found.
- `showNotification` (boolean) - Boolean value wether the notification should be shown.
Copy link
Contributor

Choose a reason for hiding this comment

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

Spelling: 'wether' should be 'whether'. Also, I'd slightly re-word this: Boolean value indicating whether or not the notification should be shown.

Copy link
Member Author

Choose a reason for hiding this comment

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

done.

@Meggin
Copy link
Contributor

Meggin commented Jan 14, 2016

lgtm once the two small comments have been actioned.

@erwinmombay erwinmombay changed the title docs(amp-user-notification): clarify that ampUserId may be the string null fix(amp-user-notification): generate ampUserId by default Feb 10, 2016
@erwinmombay erwinmombay force-pushed the get-even-if-null branch 2 times, most recently from c0eec61 to 81daf9a Compare February 10, 2016 22:49
return cid.get('amp-user-notification',
Promise.resolve(), this.dialogPromise_);
return cid.get(
{scope: 'amp-user-notification', createCookieIfNotPresent: true},
Copy link
Member Author

Choose a reason for hiding this comment

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

@cramforce PTAL. (this is for amp-user-notification cid request)

Copy link
Member Author

Choose a reason for hiding this comment

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

/cc @dvoytenko for additional review

@cramforce
Copy link
Member

LGTM

@dvoytenko
Copy link
Contributor

Looks good to me. Pending others' comments.

erwinmombay added a commit that referenced this pull request Feb 11, 2016
fix(amp-user-notification): generate `ampUserId` by default
@erwinmombay erwinmombay merged commit 1a2186b into ampproject:master Feb 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants