feat: standardize slot ids (#608)

This commit is contained in:
Brian Smith
2025-04-24 07:47:52 -04:00
committed by GitHub
parent 2337843d54
commit cb1de82f0a
12 changed files with 48 additions and 19 deletions

View File

@@ -1,6 +1,9 @@
# Widget Sidebar Slot
### Slot ID: `widget_sidebar_slot`
### Slot ID: `org.openedx.frontend.learner_dashboard.widget_sidebar.v1`
### Slot ID Aliases
* `widget_sidebar_slot`
## Description
@@ -21,7 +24,7 @@ import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-frame
const config = {
pluginSlots: {
widget_sidebar_slot: {
'org.openedx.frontend.learner_dashboard.widget_sidebar.v1': {
// Hide the default LookingForChallenge component
keepDefault: false,
plugins: [

View File

@@ -2,7 +2,12 @@
exports[`WidgetSidebar snapshots 1`] = `
<PluginSlot
id="widget_sidebar_slot"
id="org.openedx.frontend.learner_dashboard.widget_sidebar.v1"
idAliases={
[
"widget_sidebar_slot",
]
}
>
<LookingForChallengeWidget />
</PluginSlot>

View File

@@ -5,7 +5,10 @@ import LookingForChallengeWidget from 'widgets/LookingForChallengeWidget';
// eslint-disable-next-line arrow-body-style
export const WidgetSidebarSlot = () => (
<PluginSlot id="widget_sidebar_slot">
<PluginSlot
id="org.openedx.frontend.learner_dashboard.widget_sidebar.v1"
idAliases={['widget_sidebar_slot']}
>
<LookingForChallengeWidget />
</PluginSlot>
);