-
Notifications
You must be signed in to change notification settings - Fork 35
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
Conversation
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.
a6b10e5
to
6c841af
Compare
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
notifications-admin/app/assets/stylesheets/components/table.scss
Lines 61 to 71 in 6c5255f
th { | |
&:first-child { | |
width: 35%; // 33.33% + fudge | |
} | |
&:last-child { | |
width: 17.5% // 16.67% + fudge | |
} | |
} |
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
After