-
Notifications
You must be signed in to change notification settings - Fork 108
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. |
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 |
There was a problem hiding this 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.
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. |
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 underCourseCardBanners
(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: