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 User Menu Slot
### Slot ID: `mobile_user_menu_slot`
### Slot ID: `org.openedx.frontend.layout.header_mobile_user_menu.v1`
### Slot ID Aliases
* `mobile_user_menu_slot`
## Description
@@ -48,7 +51,7 @@ const modifyUserMenu = ( widget ) => {
const config = {
pluginSlots: {
mobile_user_menu_slot: {
'org.openedx.frontend.layout.header_mobile_user_menu.v1': {
keepDefault: true,
plugins: [
{
@@ -75,7 +78,7 @@ import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-frame
const config = {
pluginSlots: {
mobile_user_menu_slot: {
'org.openedx.frontend.layout.header_mobile_user_menu.v1': {
keepDefault: false,
plugins: [
{
@@ -107,7 +110,7 @@ import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-frame
const config = {
pluginSlots: {
mobile_user_menu_slot: {
'org.openedx.frontend.layout.header_mobile_user_menu.v1': {
keepDefault: true,
plugins: [
{
@@ -139,4 +142,3 @@ const config = {
export default config;
```

View File

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