Skip to content

Data consent follow-ups: redirect on decline, fixed checkbox label color - #4026

Open
gumaerc wants to merge 3 commits into
mainfrom
cg/data-consent-followup
Open

gumaerc wants to merge 3 commits into
mainfrom
cg/data-consent-followup

Conversation

@gumaerc

@gumaerc gumaerc commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

What are the relevant tickets?

Follow-up to #4006 for https://github.com/mitodl/hq/issues/13575

Description (What does it do?)

Changes to the B2B data consent dialog before the b2b-data-consent flag is turned on in production.

  • Declining now sends the learner to dashboard home. The contract's cards stay disabled until consent is true, so hiding the dialog in the browser console still doesn't make them usable.
  • The consent checkbox label stays dark gray all the time. It no longer changes color on hover. The box keeps its hover state.

How can this be tested?

  1. Enable b2b-data-consent in PostHog, with an up-to-date mitxonline (the consent field landed in Return the user's data sharing consent on their B2B contracts mitxonline#4039).
  2. As a learner attached to a B2B contract with no recorded consent, open the contract dashboard.
  3. Hover over the checkbox. The box shows its hover state, and the label text keeps the same dark color.
  4. Click Decline. You land on /dashboard. Open the contract again, and the dialog is back.

@gumaerc
gumaerc requested a review from a team as a code owner September 30, 2026 20:27
Copilot AI balanced review requested due to automatic review settings September 30, 2026 20:27
@github-actions

github-actions Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

OpenAPI Changes

No changes detected

View full changelog

Unexpected changes? Ensure your branch is up-to-date with main (consider rebasing).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The focused changes match the stated behavior and include appropriate regression coverage.

Review effort: Balanced
Findings: None

What changed in this PR

Updates B2B consent behavior and styling before production rollout.

Changes:

  • Redirects declined learners to dashboard home while locking dialog actions.
  • Keeps the consent checkbox label dark on hover.
  • Updates redirect and disabled-state tests.
File Description
DataConsentDialog.tsx Fixes checkbox label color.
ContractContent.tsx Redirects after successful decline.
ContractContent.test.tsx Tests redirect and locked actions.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@gumaerc

gumaerc commented Sep 30, 2026

Copy link
Copy Markdown
Contributor Author

@steven-hatch Ferdi brought up an interesting point while I was testing this. He posited the question "why are we showing the popup once you've reached the contract page, rather than before?" He thought it made more sense if you're on dashboard home for example and you click one of the sidebar buttons or the org card button to show the popup right there before you even navigate to the page. What do you think?

gumaerc and others added 3 commits October 1, 2026 09:48
…ta consent

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…r decline

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@gumaerc
gumaerc force-pushed the cg/data-consent-followup branch from f4c9901 to bcd4f03 Compare October 1, 2026 13:48
@steven-hatch

Copy link
Copy Markdown

I think that’s a reasonable alternative, and I’m good with either approach.

  • Existing users: showing the consent modal on Dashboard Home when they click the org/contract entry point could be cleaner because it resolves consent before navigation.
  • SSO / enrollment code users: they may land directly on the contract page, so the consent modal would still need to work there.
  • UX-wise: I’d treat this as the same consent step in two entry contexts, not two different experiences.
  • Main thing to preserve: consent should still be tied to the specific contract, and declining should not block the rest of MIT Learn.

So I’d be comfortable with: show it before navigation when we can, and fall back to showing it on the contract page when that’s where the learner enters.

@gumaerc we should still default to dashboard home on decline for both instances. Thank you.

This branch has not been deployed

No deployments
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.

3 participants