Skip to content
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

feat: course banner slot #559

Merged
merged 3 commits into from
Feb 12, 2025
Merged

Conversation

MaxFrank13
Copy link
Member

This PR wraps the CourseBanner component in a PluginSlot. This will enable operators to add their own custom Banners under the course card in addition to the ones that are already there rendered under CourseCardBanners (source).

The PluginSlot is positioned under the RelatedPrograms banner which is visually different then the rest of the banners which can be seen in the provided screenshot.

The CourseBanner is highlighted in red and is rendered under certain conditions. In this case it is being rendered because audit access has expired for the course:

Screenshot 2025-01-31 at 1 19 38 PM

@MaxFrank13 MaxFrank13 requested a review from a team as a code owner January 31, 2025 18:44
Copy link

codecov bot commented Jan 31, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.36%. Comparing base (1104c58) to head (324601c).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #559   +/-   ##
=======================================
  Coverage   97.35%   97.36%           
=======================================
  Files         154      155    +1     
  Lines        1362     1365    +3     
  Branches      229      229           
=======================================
+ Hits         1326     1329    +3     
  Misses         34       34           
  Partials        2        2           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MaxFrank13
Copy link
Member Author

Hey @arbrandes this is the PluginSlot we talked about a few weeks ago. I think there is a use case for the community as well as the added bonus of removing some of the upgrade logic

Copy link
Contributor

@jsnwesson jsnwesson left a comment

Choose a reason for hiding this comment

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

My one question is whether there's a reason why we'd want a plugin slot that is specific for this one section of the CourseCardBanners as opposed to wrapping all of the banners in a plugin slot (and leaving RelatedProgramsBanner, EntitlementBanner, and CertificateBanner as the default content. It would make it easier to arrange/remove any of the banners, and the configuration would just require that we import the default components if we want to insert custom banner components in between them.

@MaxFrank13
Copy link
Member Author

My one question is whether there's a reason why we'd want a plugin slot that is specific for this one section of the CourseCardBanners as opposed to wrapping all of the banners in a plugin slot (and leaving RelatedProgramsBanner, EntitlementBanner, and CertificateBanner as the default content. It would make it easier to arrange/remove any of the banners, and the configuration would just require that we import the default components if we want to insert custom banner components in between them.

Jason and I spoke about this and found that wrapping all of the banners in one slot wouldn't allow for easy customization of the layout of each banner seeing as FPF does not have a built in way for customizing default content. Having to re-import each component and then rearrange would be the only option but that may not be as feasible for most operators.

@MaxFrank13 MaxFrank13 merged commit 9228d01 into master Feb 12, 2025
6 checks passed
@MaxFrank13 MaxFrank13 deleted the mfrank/add-course-banner-pluginslot branch February 12, 2025 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants