Skip to content

v2 drawer certification updates #1823

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Nov 15, 2024
Merged

v2 drawer certification updates #1823

merged 7 commits into from
Nov 15, 2024

Conversation

gumaerc
Copy link
Contributor

@gumaerc gumaerc commented Nov 13, 2024

What are the relevant tickets?

Closes https://github.com/mitodl/hq/issues/5976

Description (What does it do?)

This PR changes the way prices and certification are displayed in the new learning resource drawer. Free courses that offer a certificate still display said certification price next to the "Free" text in the price info item. Paid courses with certification now display a separate info item with the certification type, based on the certification_type property of the resource.

Screenshots (if appropriate):

image
image
image
image

How can this be tested?

  • If you have Posthog set up locally, enable the lr_drawer_v2 flag
  • If you don't have Posthog set up locally, you can force drawerV2 to be true in LearningResourceDrawer.tsx
  • Spin up this branch of mit-learn
  • Ensure you have sufficient data backpopulated into your local instance to cover the following test cases:
    • Free course without certification
    • Free course with certification and no prices
    • Free course with certification and prices
    • Paid course with certification
  • Go to the search page at http://localhost:8062/search
  • In the "Certificate" search facet, check one of the boxes at a time and then examine the drawer for the courses presented in the search results:
    • "No Certificate" should display no certificate information whatsoever
    • "Professional Certificate" contains mostly paid courses with a certification, so you should see the price and certificate type each on their own line
    • "Certificate of Completion" contains mostly free courses that offer a paid certificate, so you should see the old behavior with "Price: Free" alongside the certificate price pill
    • "MicroMasters Credential" has a little bit of both behaviors described above; free courses with an optional paid certificate and paid courses with certificates

@gumaerc gumaerc added the Needs Review An open Pull Request that is ready for review label Nov 13, 2024
@gumaerc gumaerc force-pushed the cg/lr-drawer-v2-certificates branch from 55a57e0 to 4d26990 Compare November 14, 2024 18:00
Copy link
Contributor

@abeglova abeglova left a comment

Choose a reason for hiding this comment

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

This works great! I did notice that on mobile the "Earn a certificate" shaded box has less padding than the designs and less padding on the right side than the left. Could you make a small css update to fix that?

@gumaerc
Copy link
Contributor Author

gumaerc commented Nov 14, 2024

@abeglova Thanks for your review. This is ready for another look.

Copy link
Contributor

@abeglova abeglova left a comment

Choose a reason for hiding this comment

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

looks great!

@gumaerc gumaerc merged commit b95a184 into main Nov 15, 2024
11 checks passed
@odlbot odlbot mentioned this pull request Nov 18, 2024
15 tasks
jonkafton added a commit that referenced this pull request Nov 20, 2024
* Release 0.24.3

* Release date for 0.24.3

* Server rendered search page results

* v2 drawer certification updates (#1823)

* update certification display in v2 drawer to match latest designs

* don't show price info item if runs have differing data

* MicroMasters not Micromasters

* if there is no price for the certificate but it's indicated that one is included, display that

* if resource is free, includes a certification but has no prices, still display the pill in the info item

* generate migration for MicroMasters spelling change

* fix certificate pill padding on mobile

* Unit channel page and search prefetch

* Featured list and testimonials only for unit channels

* v2 learning resource drawer formats and location (#1826)

* add format info item

* display location if format is in_person

* add tests

* also show location for hybrid courses

* LocalDate and NoSSR components to render localized dates only on client

* Revert "LocalDate and NoSSR components to render localized dates only on client"

This reverts commit b4ccd6d.

* LocalDate and NoSSR components to render localized dates only on client (#1831)

* LocalDate and NoSSR components to render localized dates only on client

* Remove unnecessary React.Fragment

* separate starts and as taught in, show anytime availability (#1828)

* refactor starts / as taught in functionality to show on separate lines, show "anytime" in starts if availability is anytime

* fix rebase mishap

* Map address search params

* Search params test

* Update dependency pytest-cov to v6 (#1818)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* Update dependency safety to v3 (#1819)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* URL search param validation anf transforms to align with course-search-utils

* Update dependency django-anymail to v12 (#1815)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* vector search endpoint (#1827)

* adding initial vector search view

* adding working vector results endpoint

* regenerate openapi spec

* fixing format of returned results

* adding test

* patching qdrant client

* moving to v0 api

* switch to custom serializer for vector search

* fix v0 url

* using minimal serializer

* returning minimal response for vector results

* regenerate spec

* adding some other useful bits to response

* fixing response for empty query and adjusting test

* regenerate spec

* uninheriting from searchrequest serializer

* updating oai spec

* updating oai spec

* Update dependency @mui/lab to v6.0.0-beta.15 (#1830)

* Update dependency @mui/lab to v6.0.0-beta.15

* update lockfile

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: shankar ambady <[email protected]>

* Update to use validators from course-search-utils

---------

Co-authored-by: Doof <[email protected]>
Co-authored-by: Carey P Gumaer <[email protected]>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Shankar Ambady <[email protected]>
Co-authored-by: shankar ambady <[email protected]>
mbertrand pushed a commit that referenced this pull request Nov 22, 2024
* update certification display in v2 drawer to match latest designs

* don't show price info item if runs have differing data

* MicroMasters not Micromasters

* if there is no price for the certificate but it's indicated that one is included, display that

* if resource is free, includes a certification but has no prices, still display the pill in the info item

* generate migration for MicroMasters spelling change

* fix certificate pill padding on mobile
@rhysyngsun rhysyngsun deleted the cg/lr-drawer-v2-certificates branch February 7, 2025 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review An open Pull Request that is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants