Merge pull request #1143 from GSA/963-message-parts-content-updates

963 message parts content updates
This commit is contained in:
Carlo Costino
2024-01-26 09:40:17 -05:00
committed by GitHub
5 changed files with 64 additions and 138 deletions

View File

@@ -448,6 +448,12 @@ def message_count_noun(count, template_type):
else:
return "text messages"
if template_type == "parts":
if count == 1:
return "text message part"
else:
return "text message parts"
elif template_type == "email":
if count == 1:
return "email"

View File

@@ -15,62 +15,20 @@ Pricing
{{ content_metadata(
data={
"Last updated": "Feb 27, 2023"
"Last updated": "January 25, 2024"
}
) }}
<p>During pilot period, each service has an allowance of 250,000 free text messages. Once this allowance is met, the
application will stop delivering messages. There's no monthly charge, no setup fee and no procurement cost.</p>
<p>When a new service is added, it will start in <a class="usa-link" href="{{ url_for('main.trial_mode_new') }}">trial mode</a>. Moving a service out of trial mode is subject to approval by
the Notify.gov team.</p>
<p>You'll use more messages towards the allowance if you send text messages longer than 160 characters.
</p>
<p>During the pilot period, each service has an allowance of 250,000 message parts. Once this allowance is met, the
application will stop delivering messages. There's no monthly charge, no setup fee, and no procurement cost. You'll use
more parts towards the allowance if you:</p>
<p>
{% if not current_user.is_authenticated %}
<a class="usa-link" href="{{ url_for('main.register') }}">Create an account,</a> then
add your unique service(s).
</p>
{% else %}
Additional unique services may be added, although moving each service out of trial mode is subject to approval by the
Notify.gov team.
{% endif %}
</p>
<p>When you add a new service it will start in <a class="usa-link"
href="{{ url_for('main.trial_mode_new') }}">trial mode</a>.</p>
<p>Youll use more messages towards the allowance if you send text messages longer than 160 characters.</p>
<!-- <h2 class="font-body-lg" id="emails">Emails</h2>
<p>Its free to send emails through Notify.</p> -->
<h2 class="font-body-lg" id="text-messages">Text messages</h2>
<p>During pilot phase, each service has an annual allowance of 250,000 free text messages. Once this allowance is met,
the application will stop delivering messages.</p>
<!-- <p>When a service has used its annual allowance, it costs {{ sms_rate }} pence (plus VAT) for each text message you send.</p> -->
<p>Youll use more messages towards the allowance, if you send <a class="usa-link"
href="#long-text-messages">text messages longer than 160 characters</a>.</p>
<p>You may also use more messages if you:</p>
<ul class="list list-bullet">
<li>send text messages longer than 160 characters</a></li>
<li>use certain <a class="usa-link" href="#symbols">signs and symbols</a></li>
<li>use <a class="usa-link" href="#accents">accents and accented letters</a></li>
<li>send text messages to <a class="usa-link"
href="#international-numbers">international numbers</a></li>
</ul>
<!-- <p>See <a class="usa-link" href="{{ url_for('main.how_to_pay') }}">how to pay</a>.
<h3 class="font-body-lg" id="free-text-message-allowance">Free text message allowance</h3>
<p>The current allowance is:</p>
<ul class="list list-bullet">
<li>40,000 free text messages for national services</li>
<li>20,000 free text messages for regional services</li>
<li>10,000 free text messages for state-funded schools and GP practices</li>
</ul>
<p>Each unique service you add has a separate allowance.</p> -->
<h3 class="font-body-lg" id="long-text-messages">Long text messages</h3>
<p>If a text message is longer than 160 characters (including spaces), it counts as more than one message.</p>
@@ -82,12 +40,12 @@ Notify.gov team.
caption_visible=False
) %}
{% for message_length, charge in [
('Up to 160 characters', '1 text message'),
('Up to 306 characters', '2 text messages'),
('Up to 459 characters', '3 text messages'),
('Up to 612 characters', '4 text messages'),
('Up to 765 characters', '5 text messages'),
('Up to 918 characters', '6 text messages'),
('Up to 160 characters', '1 part'),
('Up to 306 characters', '2 parts'),
('Up to 459 characters', '3 parts'),
('Up to 612 characters', '4 parts'),
('Up to 765 characters', '5 parts'),
('Up to 918 characters', '6 parts'),
] %}
{% call row() %}
{{ text_field(message_length) }}
@@ -186,11 +144,11 @@ Notify.gov team.
caption_visible=False
) %}
{% for message_length, charge in [
('Up to 70 characters', '1 text message'),
('Up to 134 characters', '2 text messages'),
('Up to 201 characters', '3 text messages'),
('Up to 268 characters', '4 text messages'),
('Each additional 67 characters', '1 additional text message'),
('Up to 70 characters', '1 part'),
('Up to 134 characters', '2 parts'),
('Up to 201 characters', '3 parts'),
('Up to 268 characters', '4 parts'),
('Each additional 67 characters', '1 additional part'),
] %}
{% call row() %}
{{ text_field(message_length) }}
@@ -200,43 +158,9 @@ Notify.gov team.
{% endcall %}
</div>
<h3 class="font-body-lg" id="international-numbers">Sending text messages to international numbers</h3>
<p>It might cost more to send text messages to international numbers than U.S. ones, depending on the country.</p>
<!-- {% set smsIntRates %}
{{ live_search(target_selector='#international-pricing .table-row', show=True, form=search_form, label='Search by country name or code') }}
<h3 class="font-body-lg" id="international-numbers">Trial mode</h3>
<p>When a new service is added, it will start in <a href="/using-notify/trial-mode">trial mode</a>. Moving a service out of trial mode is subject to approval by
the Notify.gov team. Additional unique services may be added, although moving each service out of trial mode is subject
to approval by the Notify.gov team.</p>
<div id="international-pricing" class="bottom-gutter-3-2">
{% call mapping_table(
caption='International text message rates',
field_headings=['Country code', 'Country', 'Cost multiplier'],
field_headings_visible=True,
caption_visible=False
) %}
{% for cc, names, billable_units in international_sms_rates %}
{% call row() %}
{{ text_field('+' + cc) }}
{% call field() %}
{% for name in names %}
{{ name }}<br>
{% endfor %}
{% endcall %}
{{ text_field('{}&hairsp;&times;'.format(billable_units)|safe) }}
{% endcall %}
{% endfor %}
{% call row() %}
{{ text_field('+882') }}
{% call field() %}Worldwide{% endcall %}
{{ text_field('Not supported') }}
{% endcall %}
{% endcall %}
</div>
{% endset %}
{{ usaDetails({
"summaryText": "International text message rates",
"id": "sms-pricing-details",
"html": smsIntRates
}) }} -->
{% endblock %}
{% endblock %}

View File

@@ -7,37 +7,33 @@
{% block content_column_content %}
<h1 class="font-body-2xl margin-bottom-3">Trial mode</h1>
<p>When you add a new service it will start in trial mode. This lets you try out Notify.gov, with a few restrictions.</p>
<p>While your service is in trial mode you can only:</p>
<ul class="list list-bullet">
<li>send 50 text messages per day</li>
<li>send messages to yourself and other people in your team</li>
</ul>
{% if current_service and current_service.trial_mode %}
<p>
To remove these restrictions, you can <a class="usa-link" href="{{ url_for('.support') }}">request to go live</a>.</p>
{% else %}
<p>
To remove these restrictions:
</p>
<ol class="list list-number">
<li><a class="usa-link" href="{{ url_for('.sign_in') }}">Sign in to Notify</a>.</li>
<li>Go to the <b class="bold">Settings</b> page.</li>
<li>Select <b class="bold">Request to go live</b>.</li>
</ol>
{% endif %}
<p>
When we receive your request well get back to you within one working day.
</p>
<h2 class="font-body-lg" id="before-you-request-to-go-live">Before you request to go live</h2>
<p>You must:</p>
<h2 class="font-body-lg">Limits while in trial mode</h2>
<p>While your service is in trial mode you can only:</p>
<ul class="list list-bullet">
<li>add examples of the messages you want to send</li>
<li>update your settings so youre ready to send and receive messages</li>
<li>accept our terms of use</li>
<li>send 50 text message parts per day</li>
<li>send messages to yourself and other people in your team</li>
</ul>
<p>Each text message is made up of one or more parts.</p>
<ul class="list list-bullet">
<li>Generally, 160 characters is one part (and one text message).</li>
<li>A text message of 160-306 characters is two parts.</li>
</ul>
<p>For more information on how message parts are calculated, see
<a href="/using-notify/pricing">Pricing</a>.</p>
<h2 class="font-body-lg">Before going Live</h2>
<p>Before you request to make your service live so you can send messages to clients:</p>
<ul class="list list-bullet">
<li>Add examples of the messages you want to send into Notify.</li>
<li>Update your settings so youre ready to send and receive messages.</li>
<li>Review your Terms of Use in the Memorandum of Understanding.</li>
</ul>
<h3 class="font-body-lg">Going Live</h3>
<p>To remove the restrictions of Trial Mode and begin sending messages to clients complete the <a href="https://airtable.com/appe4n7jYOALPLcyU/shrIPWnLTw9U1fclL">Live Campaign Form</a>.</p>
<p>We'll get back to you within one working day. </p>
{% endblock %}

View File

@@ -19,25 +19,25 @@
</div>
<div id='pill-selected-item'>
<div class='grid-row'>
<div class='grid-col-12'>
<h2 class="heading-small margin-bottom-1">Daily messages across all services</h2>
<p class="margin-0">You have sent {{ global_message_limit - daily_global_messages_remaining }} of your {{ global_message_limit }} daily messages allowance.</p>
<p class="margin-0"></p>You have {{ daily_global_messages_remaining }} messages remaining.</p>
<h2 class='heading-small margin-bottom-1'>Text messages</h2>
<h2 class='heading-small margin-bottom-1'>Text message parts</h2>
<div class="keyline-block">
You have sent
{{ big_number(sms_sent, 'messages of your', smaller=True) }}
{{ big_number(sms_free_allowance, 'free messages allowance.', smaller=True) }}
{{ big_number(sms_sent, 'text message parts of your', smaller=True) }}
{{ big_number(sms_free_allowance, 'free message parts allowance.', smaller=True) }}
<br />
You have
{% if sms_free_allowance > 0 %}
{{ big_number(sms_allowance_remaining, 'messages remaining.', smaller=True) }}
{{ big_number(sms_allowance_remaining, 'message parts remaining.', smaller=True) }}
{% endif %}
{# {% for row in sms_breakdown %}
{% if row.charged_units > 0 %}
{{ big_number(
row.charged_units,
row.charged_units,
'at {:.2f} pence per message'.format(row.rate * 100),
smaller=True
) }}
@@ -90,7 +90,7 @@
{{ item.month }}
{% endcall %}
{% for counts, template_type in [
(item.sms_counts.0, 'sms'),
(item.sms_counts.0, 'parts'),
] %}
{% call field(align='left') %}
{{ big_number(
@@ -126,7 +126,7 @@
{% endif %}
</ul>
{% endcall %}
{% endcall %}
</div>
{% endif %}
@@ -140,7 +140,7 @@
</div>
<div class="grid-col-8">
<p class="align-with-heading-copy">
What counts as 1 text message?<br />
What counts as 1 text message part?<br />
See <a class="usa-link" href="{{ url_for('.pricing') }}">pricing</a>.
</p>
</div>

View File

@@ -992,8 +992,8 @@ def test_usage_page(
sms_column = normalize_spaces(annual_usage[0].text)
assert (
"You have sent 251,800 messages of your 250,000 free messages allowance. You have 0 messages remaining."
in sms_column
"You have sent 251,800 text message parts of your 250,000 free message parts allowance."
" You have 0 message parts remaining." in sms_column
)
assert "$29.85 spent" not in sms_column
assert "1,500 at 1.65 pence" not in sms_column
@@ -1029,8 +1029,8 @@ def test_usage_page_no_sms_spend(
annual_usage = page.find_all("div", {"class": "keyline-block"})
sms_column = normalize_spaces(annual_usage[0].text)
assert (
"You have sent 1,000 messages of your 250,000 free messages allowance. You have 249,000 messages remaining."
in sms_column
"You have sent 1,000 text message parts of your 250,000 free message parts allowance."
" You have 249,000 message parts remaining." in sms_column
)
assert "$0.00 spent" not in sms_column
assert "pence per message" not in sms_column
@@ -1106,7 +1106,7 @@ def test_usage_page_with_0_free_allowance(
sms_column = normalize_spaces(annual_usage[0].text)
assert (
"You have sent 251,800 messages of your 0 free messages allowance. You have"
"You have sent 251,800 text message parts of your 0 free message parts allowance. You have"
in sms_column
)
assert "free allowance remaining" not in sms_column