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

Always show letters on the dashboard and usage page #3165

Merged
merged 4 commits into from
Nov 4, 2019

Conversation

quis
Copy link
Member

@quis quis commented Oct 29, 2019

We hid letters originally because it wasn’t a mature feature. We rolled it out by letting teams choose to use it (#1803) and then automatically giving it to new teams (alphagov/notifications-api#1600).

This commit doesn’t change who has access to letters, but it does make it more discoverable by revealing it in the UI. This is the same thing we do for emails/texts, where even if you switch them off they still show up on the dashboard and usage page.

Before

image

With letters switched on With letters switched off
image image

After

image

image

quis added 3 commits October 29, 2019 16:17
Even if your service doesn’t send letters now, it might have done
previously.

The original reason for hiding letters was because it wasn’t a mature
feature. But now that it is, we should make it discoverable even for
existing teams. So that means not conditionally hiding it.

This is the same thing we do for emails/texts, where even if you switch
them off they still show up on the dashboard and usage page.
The mixture of three column/two column layouts on this page has always
looked a bit disjointed. And since the left column will only even
contain the names of months, which are short, it doesn’t need a full
half of the page width.
We hid letters originally because it wasn’t a mature feature. We rolled
it out by letting teams choose to use it (#1803)
and then automatically giving it to new teams (notifications-api/#1600).

This commit doesn’t change who has access to letters, but it does make
it more discoverable by revealing it in the UI. This is the same thing we do for emails/texts, where even if you switch them off they still show up on the dashboard and usage
page.
@quis quis force-pushed the letters-always-on-usage branch from a6b10e5 to 6c841af Compare October 29, 2019 16:21
It’s the only usage template now.
@@ -87,10 +104,16 @@ <h2 class='heading-small'>Text messages</h2>
<li class="tabular-numbers">{{ "{:,}".format(month.free) }} free {{ message_count_label(month.free, 'sms', '') }}</li>
{% endif %}
{% if month.paid %}
<li class="tabular-numbers">{{ "{:,}".format(month.paid) }} {{ message_count_label(month.free, 'sms', '') }}at
<li class="tabular-numbers">{{ "{:,}".format(month.paid) }} {{ message_count_label(month.paid, 'sms', '') }}at
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this change inadvertently fixing a bug? Struggling to see another reason why we are moving from month.free to month.paid here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, this is a bug. It means if you had used 1 paid text message and 250,000 free text messages you would see, the wrong pluralisation:

1 text messages at 1.58p

.usage-table {

.table-field-heading-first {
width: 35%; // 33.33% + fudge
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you explain for me why we add the extra amount of fudge on these please?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don’t actually understand why it needs the fudge to visually appear as 33%. Something to do with how the width of tables is calculated differently to normal elements. Copied from here so maybe we can look seeing if there’s a better way of defining these measures?

th {
&:first-child {
width: 35%; // 33.33% + fudge
}
&:last-child {
width: 17.5% // 16.67% + fudge
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants