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

Khan / perseus / 5416555274 / 1 – cypress
69%
main: 69%

Build:
DEFAULT BRANCH: main
Ran 29 Jun 2023 08:55PM UTC
Files 360
Run time 13s
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

29 Jun 2023 08:42PM UTC coverage: 26.391% (+0.003%) from 26.388%
cypress – 5416555274.1

push

github

web-flow
Fix positioning of Graphie labels when MathJax is used to render TeX (#594)

## Summary:
There was a race between the code in Perseus that positions Graphie
labels and the code in webapp that updates MathJax CSS. If Perseus
measured the label's dimensions before MathJax updated its CSS, then the
measured dimensions of the label would be wrong and the label would get
positioned incorrectly.

To fix this, we measure and position the label when the TeX component
calls its onRender callback. The MathJax component doesn't call this
callback until the CSS is up to date.

Issue: https://khanacademy.atlassian.net/browse/LC-934

Test plan:

Follow the instructions in webapp to install a dev build of Perseus.

Visit
/math/arithmetic-home/multiply-divide/division-intro/e/dividing-with-visuals?devflagk=mathjax3
and run through the exercise several times. You should not see the
duplicated label problem described in the issue linked above.  (Note
that the labels are still duplicated; that's a problem in the content
that we can't fix.  But now they are positioned exactly on top of each
other, so the duplication is not visible.)

Author: benchristel

Reviewers: nixterrimus

Required Reviewers:

Approved By: nixterrimus

Checks: ✅ finish_coverage, ✅ Publish npm snapshot (ubuntu-latest, 16.x), ✅ Lint, Typecheck, and Test (ubuntu-latest, 16.x), ✅ Extract i18n strings (ubuntu-latest, 16.x), ✅ Cypress Coverage (ubuntu-latest, 16.x), ✅ Jest Coverage (ubuntu-latest, 16.x), ✅ Check builds for changes in size (ubuntu-latest, 16.x), ✅ Check for .changeset file (ubuntu-latest, 16.x), ✅ gerald

Pull Request URL: https://github.com/Khan/perseus/pull/594

1925 of 9589 branches covered (20.08%)

Branch coverage included in aggregate %.

5510 of 18583 relevant lines covered (29.65%)

937.54 hits per line

Source Files on job cypress - 5416555274.1
  • Tree
  • List 0
  • Changed 7
  • Source Changed 0
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 5416555274
  • 12b65f5e on github
  • Prev Job for on main (#5412947485.1)
  • Next Job for on main (#5417303103.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