-
Notifications
You must be signed in to change notification settings - Fork 123
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: add frontend-plugin-framework LogoSlot
#528
feat: add frontend-plugin-framework LogoSlot
#528
Conversation
bee173a
to
318aa90
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #528 +/- ##
==========================================
- Coverage 70.60% 70.47% -0.14%
==========================================
Files 24 25 +1
Lines 364 359 -5
Branches 96 94 -2
==========================================
- Hits 257 253 -4
+ Misses 105 104 -1
Partials 2 2 ☔ View full report in Codecov by Sentry. |
318aa90
to
b74e1c5
Compare
b74e1c5
to
54bf0b1
Compare
pluginSlots: { | ||
logo_slot: { | ||
keepDefault: false, | ||
plugins: [ |
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.
Just as an aside while we're all talking about the syntax for plugins, I have to say... that's a whole lot of code to replace a logo. 😬
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.
Yeah, I think people generally agree that FPF config feels a bit too verbose (hence the thread https://discuss.openedx.org/t/proposal-simplified-frontend-plugin-api-config/13312)
That being said, just changing the logo image itself is still very much possible via existing config methods - wrapping the Logo component in a PluginSlot doesn't change that
54bf0b1
to
94af556
Compare
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.
Can't find anything to object to! Looks great!
94af556
to
a73ca55
Compare
@sarina do you have any ideas for what a good screenshot to showcase this plugin slot might be? The ability to choose which image to use for the logo has been around for a long time, so just showing a different logo doesn't feel like the best showcase. I'm hoping to have an image that demonstrates that people can put whatever they want in there now. One idea I had was an svg logo that lets users set the color. Another idea would be a plugin that changes the logo image based on the date for holidays or seasons. If either of those sound good to you I'll gladly put something together and get some screenshots made. I'm also super open to other ideas! |
Testing
I have created a testing PR to learner dash here to get a sandbox deployed. If you visit https://app.pr-449-550b00.sandboxes.opencraft.hosting/learner-dashboard/ you should see the logo links to
https://openedx.org/
.Changelog
Logo
component, renamedLinkedLogo
toLogo
Logo
component would be rendered.LinkedLogo
component fromLearningHeader.jsx
className="logo"
directly to theLogo
componentLogo
andLinkedLogo
component included this.LogoSlot
component that wraps theLogo
in afrontend-plugin-framework
PluginSlot
README
with exampleenv.config.jsx
configs for replacing and modifying the logoLogo
withLogoSlot