Skip to content

Release 0.56.5#3010

Merged
odlbot merged 5 commits intoreleasefrom
release-candidate
Mar 4, 2026
Merged

Release 0.56.5#3010
odlbot merged 5 commits intoreleasefrom
release-candidate

Conversation

@odlbot
Copy link
Contributor

@odlbot odlbot commented Mar 4, 2026

Carey P Gumaer

Chris Chudzicki

ChristopherChudzicki and others added 5 commits March 3, 2026 20:47
* bump mitxonline client

* fix tests and ts errors

* use new cart apis

* bump client

* bump client version

* update summary price display

* show financial aid pricing in course summary

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* update enrollment buttons for paid enrollment and financial aid

Show "Enroll Now—$X" for paid-only offerings. When financial aid is
applied to a course, display the discounted price with the original
price stricken. Disable the button when no price is available.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* update enrollment dialogs and buttons for enrollment mode support

- ProgramEnrollmentDialog: remove course picker, enroll in program directly;
  add certificate upsell (with Add to Cart) for "both" enrollment modes
- CourseEnrollmentDialog: add hideUpsell prop for free-only courses
- ProgramEnrollmentButton: branch on enrollmentType — free enrolls directly,
  paid goes straight to cart, both opens dialog
- CourseEnrollmentButton: branch on enrollmentType — free opens dialog with
  upsell hidden, paid goes straight to cart, both opens full dialog
- Add useCreateProgramEnrollment hook to mitxonline enrollment hooks
- Update tests for all new behaviors; remove 100x repeat from ProgramEnrollmentButton.test.tsx

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* hide enrollment upsell based on run/program enrollment modes

CourseEnrollmentDialog now derives upsell visibility from the selected
run's enrollment_modes rather than a hideUpsell prop, so the upsell
reacts dynamically as the user changes their run selection. Removes the
hideUpsell prop entirely.

ProgramEnrollmentDialog now checks program.enrollment_modes and only
renders the certificate upsell when the program offers both free and
paid options.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* make flakey test detection easier

* unify price formatting: drop .00 for whole-dollar amounts

Add formatPrice() utility that uses minimumFractionDigits:0 so whole
dollar amounts render as "$900" rather than "$900.00". Use it in program
components (ProgramEnrollmentButton, ProgramPriceRow, ProgramCertificateBox)
which previously used raw template literals. Update all affected tests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* test: add click-action coverage for free/both enrollment modes

Add test.each covering free-only and both-modes cases that clicking
'Enroll for Free' as an authenticated user opens CourseEnrollmentDialog.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: paid enrollment loading state, error handling, and price formatting

- Show loading spinner (endIcon) while basket API calls are in flight,
  keeping button text visible and disabling the button
- Catch errors from clearBasket/addToBasket mutateAsync and surface them
  via an Alert below the button; same for free program enrollment
- Fix inconsistent price formatting in ProgramCertificateUpsell: use
  formatPrice() instead of template literal to drop unnecessary .00
- Collapse redundant free/both branches in CourseEnrollmentButton click handler
- Add tests for loading and error states in both enrollment buttons

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* unify clear+add basket logic

* make onReset optional

* fix copy

* add a test covering successful enrollment redirection

* handle errors in dialogs

* no redundant resets

* simplify: use mutate+onSuccess chaining in useReplaceBasketItem; remove redundant reset calls and try/catch at call sites

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* reset during combined mutation, remove a comment

* remove unncessary comparison

* fix a rebasing issue

* disable enrollment button when enrollment_modes is empty

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* show cents except on button

* open enrollment dialog for multi-run or upsell; direct enroll otherwise

- Open dialog when enrollmentType is "both" (upsell) or multiple enrollable runs exist
- For paid-only + single run, go directly to checkout (unchanged)
- For free-only + single run, enroll directly and redirect to dashboard home

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* be defensive in dialog: hide/disable upsell+free button for bad enrollment data

- confirmText now requires enrollmentType to be "free" or "both" (not just not-paid),
  so it's hidden for "none" (bad data) as well as "paid"
- isFreeOnly now true for any type that isn't "paid" or "both", so the upsell
  is disabled for "none" in addition to "free"

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* update mitxonline-api-axios to semver release

* remove isFreeOnly from upsell props

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* support video_url on product pages and render it in place of the sidebar image if needed

* support regular embed links that go in an iframe

* add an mitxonline path friendly placeholder image for now to fix the broken image issue

* remove redundant re-export

* give a descriptive title to the sidebar video

* add some basic tests for convertToEmbedUrl
@odlbot odlbot merged commit 1969a2c into release Mar 4, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants