feat: standardize slot ids (#589)

This commit is contained in:
Brian Smith
2025-04-23 15:45:16 -04:00
committed by GitHub
parent 8df7d928dd
commit 95efe7fedd
31 changed files with 145 additions and 84 deletions

View File

@@ -1,6 +1,9 @@
# Mobile Main Menu Slot
### Slot ID: `mobile_main_menu_slot`
### Slot ID: `org.openedx.frontend.layout.header_mobile_main_menu.v1`
### Slot ID Aliases
* `mobile_main_menu_slot`
## Description
@@ -40,7 +43,7 @@ const modifyMainMenu = ( widget ) => {
const config = {
pluginSlots: {
mobile_main_menu_slot: {
'org.openedx.frontend.layout.header_mobile_main_menu.v1': {
keepDefault: true,
plugins: [
{
@@ -67,7 +70,7 @@ import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-frame
const config = {
pluginSlots: {
mobile_main_menu_slot: {
'org.openedx.frontend.layout.header_mobile_main_menu.v1': {
keepDefault: false,
plugins: [
{
@@ -99,7 +102,7 @@ import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-frame
const config = {
pluginSlots: {
mobile_main_menu_slot: {
'org.openedx.frontend.layout.header_mobile_main_menu.v1': {
keepDefault: true,
plugins: [
{
@@ -131,4 +134,3 @@ const config = {
export default config;
```

View File

@@ -6,7 +6,8 @@ const MobileMainMenuSlot = ({
menu,
}) => (
<PluginSlot
id="mobile_main_menu_slot"
id="org.openedx.frontend.layout.header_mobile_main_menu.v1"
idAliases={['mobile_main_menu_slot']}
slotOptions={{
mergeProps: true,
}}