[CORL-219] Change username (#2452)

* add types for username updates

* add update username methods

* add types and resolvers for username history

* connect frontend to username history and change history mutation

* style update username box

* show username changes in user history drawer

* new users have 1 username entry

* add translations for username change

* allow new users to change username once

* add tests for change username ui

* send email to users after username change

* add types to tests

* treat status.username.history as mandatory

* remove hardcoded 14 day username update frequency

* use framework translation directives

* add account history action component

* clean up strings

* fix imports in change username container

* fix templates

* rename update username methods

* fix nunjucks formatting

* add warning if user missing email

* add fixme

* fix spacing
This commit is contained in:
Tessa Thornton
2019-08-12 10:45:49 -04:00
committed by GitHub
parent e3f24811fc
commit c245e9ba74
38 changed files with 1219 additions and 72 deletions
@@ -71,6 +71,14 @@ export type DownloadCommentsTemplate = UserNotificationContext<
}
>;
export type UpdateUsernameTemplate = UserNotificationContext<
"update-username",
{
username: string;
organizationContactEmail: string;
}
>;
type Templates =
| BanTemplate
| ConfirmEmailTemplate
@@ -78,6 +86,7 @@ type Templates =
| InviteEmailTemplate
| PasswordChangeTemplate
| SuspendTemplate
| DownloadCommentsTemplate;
| DownloadCommentsTemplate
| UpdateUsernameTemplate;
export { Templates as Template };
@@ -0,0 +1,7 @@
{% extends "layouts/user-notification.html" %}
{% block content %} Hello {{ context.username }},<br /><br />
Thank you for updating your {{ context.organizationName }} commenter account
information. The changes you made are effective immediately. If you did not make
this change please reach out to <a data-l10n-name="organizationContactEmail" href="mailto:{{ context.organizationContactEmail }}">{{ context.organizationContactEmail }}</a>.
{% endblock %}