Repository: MuckRock/squarelet
Pull request #255: Revise welcome message
Author: login: duckduckgrayduck
Created: 2025-03-12T21:51:50Z | Merged: 2025-03-13T19:56:59Z

There are some merge conflicts from master (which revise_welcome_message is based on). This is the only file I've actually edited:
https://github.com/MuckRock/squarelet/blob/b8dca5c213f9b4a6fac52c58a12486ea7a19e651/squarelet/templates/account/email/email_confirmation_signup_message.html


Diff:
diff --git a/local.yml b/local.yml
index 08bf0e71b..e52dc81dd 100644
--- a/local.yml
+++ b/local.yml
@@ -60,8 +60,6 @@ services:
     build:
       context: .
       dockerfile: ./compose/local/vite.Dockerfile
-      platforms:
-        - linux/arm64
     image: squarelet_local_vite
     restart: always
     ports:
diff --git a/squarelet/templates/account/email/email_confirmation_signup_message.html b/squarelet/templates/account/email/email_confirmation_signup_message.html
index 497626c01..0c34f5e40 100644
--- a/squarelet/templates/account/email/email_confirmation_signup_message.html
+++ b/squarelet/templates/account/email/email_confirmation_signup_message.html
@@ -10,45 +10,66 @@
   {% url "account_set_password" as url_password %}
   {% autologin url_password user as url_password_ %}
   {% autologin activate_url user as activate_url_ %}
+
   {% blocktrans with username=user.username %}
+    <p>Welcome to your MuckRock account, {{ username }}!</p>
+  {% endblocktrans %}
+
+  {% if user.source == "squarelet" %}
+    {% blocktrans %}
+      <p>
+        Your MuckRock account is your passport to
+        <a href="https://accounts.muckrock.com/">all the services and tools</a>
+        offered by MuckRock and our trusted partners.
+      </p>
+    {% endblocktrans %}
+  {% else %}
+    {% blocktrans with source=user.get_source_display %}
+      <p>
+        Your MuckRock account is your passport to {{ source }}
+        and other services offered by MuckRock and our trusted partners.
+      </p>
+    {% endblocktrans %}
+  {% endif %}
+
+  {% blocktrans with activate_url=activate_url_ %}
     <p>
-    Thank you for creating an account on MuckRock.
-    </p>
-    <p>
-    Your username is
-    <a href="{{ url_user_ }}">
-      {{ username }}
-    </a>.
-    </p>
-    <p>
-    You will need to 
-    <a href="{{ activate_url_ }}">verify your email address</a> before you can start using our tools. 
-    You can also verify your email from your
-    <a href="{{ url_email_ }}">account email settings</a>.
+      Before continuing, please
+      <a href="{{ activate_url }}">verify your email</a>.
+      You can also verify your email from your
+      <a href="https://accounts.muckrock.com/">account page</a>.
     </p>
   {% endblocktrans %}
+
   {% if minireg %}
-    {% blocktrans %}
+    {% blocktrans with url_password=url_password_ %}
       <p>
-      You should also
-      <a href="{{ url_password_ }}">
-        set your password
-      </a>.
+        You should also
+        <a href="{{ url_password }}">set your password</a>.
       </p>
     {% endblocktrans %}
   {% endif %}
+
   {% blocktrans %}
+    <ul>
+      <li>
+        Bookmark our
+        <a href="https://help.muckrock.com/">User Guide</a>
+        to learn more about MuckRock and our services.
+      </li>
+      <li>
+        For technical support and customer service,
+        <a href="mailto:info@muckrock.com">email us</a>.
+      </li>
+    </ul>
+  {% endblocktrans %}
+
+  {% blocktrans with username=user.username %}
     <p>
-    <strong>
-      Have a technical support or customer service issue?
-      <a href="mailto:info@muckrock.com">Email us</a>.
-    </strong>
-    </p>
-    <p>
-    Welcome to the MuckRock community. We're excited to see what you
-    do with the tools we've built.
+      Once again, welcome to the MuckRock community,
+      {{ username }}. We're excited to see what you do with the tools we offer.
     </p>
-    <p>Sincerely,<br/>The MuckRock Team</p>
   {% endblocktrans %}
+
 {% endblock %}
 


Reviews:
user: login: allanlasser
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-13T12:34:01Z
user: login: duckduckgrayduck
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-13T13:39:56Z
user: login: allanlasser
state: APPROVED
author_association: MEMBER
submitted_at: 2025-03-13T17:39:14Z

Review comments:
diff_hunk: @@ -10,45 +10,66 @@
   {% url "account_set_password" as url_password %}
   {% autologin url_password user as url_password_ %}
   {% autologin activate_url user as activate_url_ %}
-  {% blocktrans with username=user.username %}
-    <p>
-    Thank you for creating an account on MuckRock.
-    </p>
-    <p>
-    Your username is
-    <a href="{{ url_user_ }}">
-      {{ username }}
-    </a>.
-    </p>
+
+  {% blocktrans with full_name=user.full_name %}
+    <p>Welcome to your MuckRock account, {{ full_name }}!</p>
+  {% endblocktrans %}
path: squarelet/templates/account/email/email_confirmation_signup_message.html
user: login: allanlasser
body: Should also fall back to `username` in the same way as at the bottom:
```suggestion
  {% blocktrans with full_name=user.full_name username=user.username %}
    <p>Welcome to your MuckRock account, {{ full_name|default:username }}!</p>
  {% endblocktrans %}
```
created_at: 2025-03-13T12:26:02Z
author_association: MEMBER
diff_hunk: @@ -10,45 +10,66 @@
   {% url "account_set_password" as url_password %}
   {% autologin url_password user as url_password_ %}
   {% autologin activate_url user as activate_url_ %}
-  {% blocktrans with username=user.username %}
-    <p>
-    Thank you for creating an account on MuckRock.
-    </p>
-    <p>
-    Your username is
-    <a href="{{ url_user_ }}">
-      {{ username }}
-    </a>.
-    </p>
+
+  {% blocktrans with full_name=user.full_name %}
+    <p>Welcome to your MuckRock account, {{ full_name }}!</p>
+  {% endblocktrans %}
+
+  {% if user.source == "squarelet" %}
+    {% blocktrans %}
+      <p>
+        Your MuckRock account is your passport to
+        <a href="https://accounts.muckrock.com/">all the services and tools</a>
+        offered by MuckRock and our trusted partners.
+      </p>
+    {% endblocktrans %}
+  {% else %}
+    {% blocktrans with source=user.get_source_display %}
+      <p>
+        Your MuckRock account is your passport to {{ source }}
path: squarelet/templates/account/email/email_confirmation_signup_message.html
user: login: allanlasser
body: Is `source` a slug-y string, like if the user signs up for DocumentCloud will the string be `documentcloud`?

If so, we have a new app and model available on our redesign branch: `Service`. The Service model has a `slug` field which should map to the value of `source`, in addition to other display oriented fields like a proper `name`.

When creating the context for this template, we could get the Service corresponding to the user source. To access, you will likely need to rebase this branch onto the `redesign` branch (but it's up to date against `master`, so it should be clean and easy! 🤞 ).
created_at: 2025-03-13T12:29:11Z
author_association: MEMBER
diff_hunk: @@ -10,45 +10,66 @@
   {% url "account_set_password" as url_password %}
   {% autologin url_password user as url_password_ %}
   {% autologin activate_url user as activate_url_ %}
-  {% blocktrans with username=user.username %}
-    <p>
-    Thank you for creating an account on MuckRock.
-    </p>
-    <p>
-    Your username is
-    <a href="{{ url_user_ }}">
-      {{ username }}
-    </a>.
-    </p>
+
+  {% blocktrans with full_name=user.full_name %}
+    <p>Welcome to your MuckRock account, {{ full_name }}!</p>
+  {% endblocktrans %}
+
+  {% if user.source == "squarelet" %}
+    {% blocktrans %}
+      <p>
+        Your MuckRock account is your passport to
+        <a href="https://accounts.muckrock.com/">all the services and tools</a>
+        offered by MuckRock and our trusted partners.
+      </p>
+    {% endblocktrans %}
+  {% else %}
+    {% blocktrans with source=user.get_source_display %}
+      <p>
+        Your MuckRock account is your passport to {{ source }}
path: squarelet/templates/account/email/email_confirmation_signup_message.html
user: login: duckduckgrayduck
body: It is a char field with choices. 
https://github.com/MuckRock/squarelet/blob/97484083aad1b224210ec7ecf4f64d9fa7468530/squarelet/users/models.py#L125
The line 
source=user.get_source_display
should pull the actual name and not the slug from the choice. See: https://stackoverflow.com/questions/4320679/django-display-choice-value


created_at: 2025-03-13T13:39:56Z
author_association: CONTRIBUTOR

PR comments:
user: login: allanlasser
created_at: 2025-03-13T12:23:04Z
body: I merged `master` into `redesign` and set this PR's base branch to the `redesign` branch. Now we've just got the 1 commit in the changelog and no merge conflicts!
author_association: MEMBER
user: login: duckduckgrayduck
created_at: 2025-03-13T18:22:11Z
body: Fails to pull full_name or username
![Fails](https://github.com/user-attachments/assets/3961f819-b806-4d9b-b569-9a6f1081a7b5)

author_association: CONTRIBUTOR
user: login: duckduckgrayduck
created_at: 2025-03-13T19:54:58Z
body: It doesn't like the | logic operator. Since we default to username anyways, I just made it the only option to resolve this and close this issue. 
author_association: CONTRIBUTOR