Add fields for configuring the How You'll Learn cards on product pages#3487
Conversation
OpenAPI ChangesShow/hide ## Changes for v0.yaml:Unexpected changes? Ensure your branch is up-to-date with |
b7aeed9 to
749a4e6
Compare
|
Can I get a screenshot of the CMS UI for this? |
There was a problem hiding this comment.
Approving, but, consider the following change:
Suggestion: I was expecting the API to return an array like {key, title, description}[]. I think this would be better because:
- Wagtail title/description and item order would automatically be in-sync with frontend.
- if we get rid of the "How You'll Learn" images, it is entirely driven by the API data, frontend doesn't need to know anything else.
- removing the images is something that has been discussed as a possibility
- even with
{key,title,description}[]response, if we keep the images, frontend needs to have a key->image map.
http://mitxonline.odl.local:8013/api/v2/pages/?type=cms.programpage&readable_id=program-v1%3AUAI%2BB2C&fields=* is the API i am talking about... (Annoying: need to encodeURICoponent the readable ids)
|
@jkachel Actually, Also... Should we add a data migration that:
|
Mentioned this in the PR - not sure what we want for the defaults so didn't tackle this, so it doesn't hold up the changes for the front end. But I have the front end changes done so if those are the defaults we want I can add a step to the migration to set them. |
I kept this simple because the upstream issue indicated that these weren't to be editable - and wrt the frontend changes I have in process, these are just flags; the content is defined wholly in the React code. (I just have that mocked API response y'all had in the HowYoullLearnSection component matched up to the fields. You get cards for whichever ones are True.) However, my initial thought on this was to set this up as a linked page, like we do for signatories in contracts. The cards would be another set of pages within Wagtail and we'd link them into the product page. Then we send whatever the details are for that card as part of the API response. Potential tricky bit with this is that the card content can be dependent on the course type (UAI, MITx, etc.) and so we'd have to design for that. But this seemed like it'd be out of spec for the issue as it was written so I went with the simpler route. Thoughts @pdpinch ? |
I think that's more complicated than we need now, as you say, not planning to edit them much. What I had in mind was something like
so that the title/description stay synced between mitxlone and mit-learn |
270020c to
8d0b1df
Compare
8d0b1df updates the API to coalesce the choice fields in this manner. Will update mitodl/mit-learn#3198 appropriately - should make that a simpler implementation, really. |
What are the relevant tickets?
Part of mitodl/hq#10856
Screenshot
Description (What does it do?)
Adds some checkbox fields for the cards that we'd like to display on the product pages in Learn. These include:
Learn from faculty experts who emphasize practical application over theory.
Practice core competencies through case studies, simulations, and hands-on tools.
Connect with an international community of professionals working on real-world projects.
Access all course content online with complete flexibility to study at your own pace.
Get personalized help on assignments from AskTIM, powered by advanced AI.
Earn certificates at key milestones—module, course, and program—building a portfolio of expertise.
The text for these may change depending on what kind of course this is (UAI, MITx, etc.) but that will be controlled by the component.
How can this be tested?
The fields should show up in the course pages and program pages within the CMS. The fields should work as expected. The API output should include these new fields as well.
Additional Context
There will be a complimentary PR that will update the Learn frontend to make the cards in the How You'll Learn section dependent on these checkboxes.
There will need to be a further PR to set these to reasonable values for the courses that are there, but I don't think we have that codified at time of writing.