• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

alphagov / notifications-admin / 3570 / 1
86%
master: 94%

Build:
Build:
LAST BUILD BRANCH: fix-days-provider-history
DEFAULT BRANCH: master
Ran 15 Jun 2016 08:38AM UTC
Files 54
Run time 2s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

15 Jun 2016 08:35AM UTC coverage: 86.241%. Remained the same
auth_token=[secure]

push

travis-ci

quis
Stop page jumping on first load with a long email

A long email message needs to be collapsed to only show the first few
lines. The problem is that we were doing this by adding a class with
Javascript, meaning that the email wasn’t being collapsed until the
script in the footer ran.

This caused a jump in the page because the browser was painting the
whole email message, then repainting it once it was collapsed.

This commit takes advantage of the `.js-enabled` class added to the
`<body>` by a script in the `<head>` of GOV.UK template.

This means that the email message is collapsed with CSS before the first
paint of the page, so no jump.

This introduces some complexity in how we determine which emails get the
expander toggle. Because they’re already collapsed we can’t get their
height and work out if they’re long enough to need collapsing.

So we need to take a copy of the message, put it off-screen, expand it,
get its height, then remove it from the DOM. Bit of a faff.

Because of this there’s still a quick flash of the toggle if you see an
email message that’s too short to need collapsing. I think this is the
lesser of two evils—very short email messages will be few and far
between in the real world.

1893 of 2195 relevant lines covered (86.24%)

0.86 hits per line

Source Files on job 3570.1 (auth_token=[secure])
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 3570
  • Travis Job 3570.1
  • 66a33e4e on github
  • Prev Job for auth_token=[secure] on no-jump-email (#3563.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc