Restyle pre-login pages: brand purple + WCAG AA contrast fixes - #38079
Restyle pre-login pages: brand purple + WCAG AA contrast fixes#38079kcowger wants to merge 3 commits into
Conversation
f28aa52 to
ab407c1
Compare
00d48c8 to
bf71471
Compare
bf71471 to
8262757
Compare
|
@nospame retrying for review. no need to spend too much time on this |
|
|
||
| .prelogin { | ||
| .form-bubble { | ||
| .btn-primary { |
There was a problem hiding this comment.
Could these buttons use Bootstrap's sass mixins rather than setting CSS styles? https://getbootstrap.com/docs/5.3/components/buttons/#sass-mixins
There was a problem hiding this comment.
done, switched to button-variant / button-outline-variant.
| } | ||
| } | ||
|
|
||
| .prelogin { |
There was a problem hiding this comment.
I don't know that I fully buy the new prelogin class is necessary (it might be). Is it possible to see whether the affected registration styles (i.e. without the .prelogin selector) would be used elsewhere? If they're not, we can change those styles directly rather than adding new styles here.
There was a problem hiding this comment.
kept only for the shared navbar, set by the login template for logged-out viewers only, so logged-in views of inheriting pages keep the normal nav. everything else is changed at the definition.
There was a problem hiding this comment.
I think we have a version of this file already, corehq/apps/registration/static/registration/images/commcare_by_dimagi.png, but this one might be different in ways I'm missing.
There was a problem hiding this comment.
good catch, reusing the existing white logo and dropped the new file.
|
|
||
| $prelogin-step-circle: 28px; | ||
|
|
||
| .prelogin ul.form-step-progress { |
There was a problem hiding this comment.
These new styles probably mean we can remove the old ones immediately above.
There was a problem hiding this comment.
done, replaced at the definition.
| } No newline at end of file | ||
| } | ||
| .prelogin { | ||
| .navbar-hq-main-menu { |
There was a problem hiding this comment.
I'm torn on whether this belongs here or in registration-main because that's the only place it ever gets used, don't think I have a strong preference though.
There was a problem hiding this comment.
kept it in _navbar.scss so navbar styles stay in one file.
|
|
||
| a:focus-visible, | ||
| button:focus-visible { | ||
| outline-color: white; |
There was a problem hiding this comment.
This is sometimes using white and sometimes #fff for styles, would be nice to see just one or the other.
There was a problem hiding this comment.
standardized on $white.
| .dropdown-toggle.btn-outline-primary, | ||
| .btn-primary { |
There was a problem hiding this comment.
I find it a bit odd that we're styling a regular and an outline button identically. Would be nice to keep a distinction or consider changing the classes applied to the buttons themselves.
There was a problem hiding this comment.
the language picker renders as plain text under the refresh and Sign In as the outlined button, with Schedule a Demo as the filled one. the nav markup is unchanged because logged-out pages outside the refresh share it.
| text-transform: uppercase; | ||
| } | ||
|
|
||
| .btn-purple { |
There was a problem hiding this comment.
Doesn't this make the button blue rather than purple? Might be nice to rename if so, also to see if it's used anywhere else (if not, it could be changed in the definition rather than overridden here).
There was a problem hiding this comment.
btn-purple is still used in the logged-in app, so its definition stays. the pre-login buttons use a new btn-prelogin variant instead.
| border-radius: 8px; | ||
| } | ||
|
|
||
| .cloud-choice { |
There was a problem hiding this comment.
This is definitely not used anywhere else and can be changed in its definition, rather than overridden in the .prelogin class.
There was a problem hiding this comment.
done, changed at the definition.
| --#{$prefix}btn-hover-border-color: #{$prelogin-action-blue}; | ||
| --#{$prefix}btn-active-bg: #{$prelogin-action-blue-tint}; | ||
| --#{$prefix}btn-active-border-color: #{$prelogin-action-blue}; | ||
| border-radius: 10px; |
There was a problem hiding this comment.
Bet we could do this or very similar with a bootstrap class, maybe rounded-2? Or just let it have the regular button border radius.
There was a problem hiding this comment.
dropped the custom radius, they use the regular button radius now.
White on the action blue #5D70D2 is 4.45:1, below the 4.5:1 minimum for normal text; the buttons and links on the login and registration cards move to #4D5EC2 (5.68:1). Placeholder text and the registration step label move to AA-compliant grays, and keyboard focus gets a visible outline. The registration stylesheet only loads on pre-login pages, so no scoping class is needed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Brand-purple nav with the full CommCare by Dimagi logo (reusing the existing white logo asset), circular sign-up stepper badges, card-style cloud-location buttons, and a soft warning box, all recolored through Bootstrap's button-variant mixins. The sign-up and demo bubbles turn the action blue and are renamed form-bubble-cta to match; their white call-to-action buttons use a new btn-prelogin variant, applied also to the dormant bootstrap5 accept-invite template so it is ready when its view migrates. Styles are changed at their definitions since the registration stylesheet and the stepper have no other pre-login consumers; the OAuth consent page shares the registration stylesheet and intentionally picks up the AA button colors while keeping the standard navbar. The shared navbar keeps its markup and gets a prelogin body-class scope, set by the login template only for logged-out viewers and inherited by the templates that extend it, so logged-in views of those pages and logged-out pages outside the refresh keep today's navbar. Under the scope the language picker renders as plain text, Sign In as the only outlined button, and Schedule a Demo as a white button. btn-purple is untouched for its authenticated-app users. Depends on the palette variables introduced in the preceding WCAG AA commit; revert them together. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The logo currently links to the homepage view, which redirects logged-out users back to the login page they are already on. On Dimagi-run environments, point it at the marketing site instead, matching where the other pre-login links go. Logged-in users and self-hosted deployments keep the homepage link. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
8262757 to
0555176
Compare
|
restructured so styles are changed at their definitions now. the only override left is the navbar, which the logged-in app shares, scoped under a prelogin body class. |
Product Description
Restyles the sign-in and sign-up pages to align stylistically with the commcare.dimagi.com webpage. The idea is, when someone flows through commcare.dimagi.com to commcarehq.org, it should feel cohesive from page to page.
Also introduces a couple small WCAG AA accessibility improvements.
Before (Sign In)

After (Sign In)

Before (Sign Up)

After (Sign Up)

Technical Summary
Three independent commits: WCAG AA fixes, the rebrand, and the logo link. All rules are scoped under a
preloginbody class set only by pre-login templates and live in the stylesheets that own the elements they restyle. The authenticated app never sets the class.Feature Flag
None.
Safety Assurance
Safety story
Verified locally on both pages. Rules are inert wherever the body class is absent.
Automated test coverage
None added; presentational CSS.
QA Plan
One known boundary: a project with custom branding shows its own logo image on its domain login page; that logo now sits on the dark blue bar and dark logos may have low contrast there.
Visual check of sign-in and sign-up on www/eu/india, desktop and mobile.
Rollback instructions
Labels & Review
🤖 Generated with Claude Code