Compare commits

...

4 Commits

Author SHA1 Message Date
Brian Smith
95efe7fedd feat: standardize slot ids (#589) 2025-04-23 15:45:16 -04:00
renovate[bot]
8df7d928dd chore(deps): update dependency @openedx/paragon to v23.4.5 (#588)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-21 05:55:17 +00:00
renovate[bot]
5e77a47708 chore(deps): update dependency @edx/frontend-platform to v8.3.4 (#587)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-21 05:54:58 +00:00
Régis Behmo
8ef3a27a62 chore: remove husky 🪓🐶
We remove husky, which is triggering pre-push git hooks, including
running "npm lint". This is causing failures when building Docker
images, because "npm clean-install --omit=dev" automatically triggers "npm
prepare", which attemps to run "husky". But husky is not listed in the
build dependencies, only in devDependencies. As a consequence, package
installation is failing with the following error:

        14.13 > @edx/frontend-app-ora-grading@0.0.1 prepare
        14.13 > husky install
        14.13
        14.15 sh: 1: husky: not found

Similar to: https://github.com/openedx/frontend-app-learning/pull/1622
2025-04-14 11:03:03 -03:00
31 changed files with 151 additions and 113 deletions

37
package-lock.json generated
View File

@@ -14,7 +14,7 @@
"@fortawesome/free-regular-svg-icons": "6.6.0",
"@fortawesome/free-solid-svg-icons": "6.6.0",
"@fortawesome/react-fontawesome": "^0.2.0",
"@openedx/frontend-plugin-framework": "^1.6.0",
"@openedx/frontend-plugin-framework": "^1.7.0",
"axios-mock-adapter": "1.22.0",
"babel-polyfill": "6.26.0",
"classnames": "^2.5.1",
@@ -32,7 +32,6 @@
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "5.17.0",
"@testing-library/react": "^16.2.0",
"husky": "8.0.3",
"jest": "29.7.0",
"jest-chain": "1.1.6",
"prop-types": "15.8.1",
@@ -2256,9 +2255,9 @@
}
},
"node_modules/@edx/frontend-platform": {
"version": "8.3.3",
"resolved": "https://registry.npmjs.org/@edx/frontend-platform/-/frontend-platform-8.3.3.tgz",
"integrity": "sha512-xj8uKY4k9DgScYWsBFx8B1cngZ6HTPHvmd7W+NpBB4Kqw9yCT1OUii4p8/8khF68vb7hcTQuu13A9hM0lkE5bw==",
"version": "8.3.4",
"resolved": "https://registry.npmjs.org/@edx/frontend-platform/-/frontend-platform-8.3.4.tgz",
"integrity": "sha512-V3XtTo3KP8QSmId+Vvi4+qzpOVkxvTMNA6jH/i3Bfz+/jHjHBRnmp/Cc2pjTxiTgGNoKX4D1twiZkOBO+kWw1Q==",
"license": "AGPL-3.0",
"dependencies": {
"@cospired/i18n-iso-languages": "4.2.0",
@@ -3747,9 +3746,9 @@
}
},
"node_modules/@openedx/frontend-plugin-framework": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/@openedx/frontend-plugin-framework/-/frontend-plugin-framework-1.6.0.tgz",
"integrity": "sha512-zgP+/hs/cvcPmFOgVm2xt/qgX1nheNsfipzCO7I3bON4hHyOhmOyzwFZJ7pz7GzCJwKlMVguh3HcJgf4p/BPKQ==",
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/@openedx/frontend-plugin-framework/-/frontend-plugin-framework-1.7.0.tgz",
"integrity": "sha512-8tGkuHvtzhbqb9dU4sXUtR0K44+Hjh1uGR6DvhZAt9wSKQC1v4RBk34ef8DFzQhoNQa/Jtn6BJuta4Un6MmHmw==",
"license": "AGPL-3.0",
"dependencies": {
"@edx/brand": "npm:@openedx/brand-openedx@^1.2.2",
@@ -3813,9 +3812,9 @@
}
},
"node_modules/@openedx/paragon": {
"version": "23.4.3",
"resolved": "https://registry.npmjs.org/@openedx/paragon/-/paragon-23.4.3.tgz",
"integrity": "sha512-twzFgkVZBZKDUhepqvdH1er+0uQSBGs/r1TDIGmN/zNjmc87g7RMbeDWF+j96eOaiTet9Wcv4JHoB3zE6VycFQ==",
"version": "23.4.5",
"resolved": "https://registry.npmjs.org/@openedx/paragon/-/paragon-23.4.5.tgz",
"integrity": "sha512-baBTZDO6hdCjI+Jj3oSQaz5GkFTR2TEs94pPMOls7bc/Fsv4zQIN8xDPo4NzAVo/2+3eSuEzUz3xzBeb+94rtw==",
"license": "Apache-2.0",
"workspaces": [
"example",
@@ -11395,22 +11394,6 @@
"node": ">=10.17.0"
}
},
"node_modules/husky": {
"version": "8.0.3",
"resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz",
"integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==",
"dev": true,
"license": "MIT",
"bin": {
"husky": "lib/bin.js"
},
"engines": {
"node": ">=14"
},
"funding": {
"url": "https://github.com/sponsors/typicode"
}
},
"node_modules/hyperdyperid": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/hyperdyperid/-/hyperdyperid-1.2.0.tgz",

View File

@@ -10,6 +10,7 @@
"build": "make build",
"i18n_extract": "fedx-scripts formatjs extract",
"lint": "fedx-scripts eslint --ext .js --ext .jsx .",
"lint:fix": "fedx-scripts eslint --fix --ext .js --ext .jsx .",
"snapshot": "fedx-scripts jest --updateSnapshot",
"start": "fedx-scripts webpack-dev-server --progress",
"test": "fedx-scripts jest --coverage"
@@ -17,11 +18,6 @@
"files": [
"/dist"
],
"husky": {
"hooks": {
"pre-commit": "npm run lint"
}
},
"repository": {
"type": "git",
"url": "git+https://github.com/openedx/frontend-component-header.git"
@@ -42,7 +38,6 @@
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "5.17.0",
"@testing-library/react": "^16.2.0",
"husky": "8.0.3",
"jest": "29.7.0",
"jest-chain": "1.1.6",
"prop-types": "15.8.1",
@@ -60,7 +55,7 @@
"@fortawesome/free-regular-svg-icons": "6.6.0",
"@fortawesome/free-solid-svg-icons": "6.6.0",
"@fortawesome/react-fontawesome": "^0.2.0",
"@openedx/frontend-plugin-framework": "^1.6.0",
"@openedx/frontend-plugin-framework": "^1.7.0",
"axios-mock-adapter": "1.22.0",
"babel-polyfill": "6.26.0",
"classnames": "^2.5.1",

View File

@@ -1,6 +1,9 @@
# Course Info Slot
### Slot ID: `course_info_slot`
### Slot ID: `org.openedx.frontend.layout.header_learning_course_info.v1`
### Slot ID Aliases
* `course_info_slot`
## Description
@@ -24,7 +27,7 @@ const replaceCourseTitle = ( widget ) => {
const config = {
pluginSlots: {
course_info_slot: {
'org.openedx.frontend.layout.header_learning_course_info.v1': {
keepDefault: true,
plugins: [
{
@@ -51,7 +54,7 @@ import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-frame
const config = {
pluginSlots: {
course_info_slot: {
'org.openedx.frontend.layout.header_learning_course_info.v1': {
keepDefault: false,
plugins: [
{
@@ -83,7 +86,7 @@ import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-frame
const config = {
pluginSlots: {
course_info_slot: {
'org.openedx.frontend.layout.header_learning_course_info.v1': {
keepDefault: true,
plugins: [
{

View File

@@ -9,7 +9,8 @@ const CourseInfoSlot = ({
...attributes
}) => (
<PluginSlot
id="course_info_slot"
id="org.openedx.frontend.layout.header_learning_course_info.v1"
idAliases={['course_info_slot']}
slotOptions={{
mergeProps: true,
}}

View File

@@ -1,6 +1,9 @@
# Desktop Header Slot
### Slot ID: `desktop_header_slot`
### Slot ID: `org.openedx.frontend.layout.header_desktop.v1`
### Slot ID Aliases
* `desktop_header_slot`
## Description
@@ -19,7 +22,7 @@ import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-frame
const config = {
pluginSlots: {
desktop_header_slot: {
'org.openedx.frontend.layout.header_desktop.v1': {
keepDefault: false,
plugins: [
{

View File

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

View File

@@ -1,6 +1,9 @@
# Desktop Logged Out Items Slot
### Slot ID: `desktop_logged_out_items_slot`
### Slot ID: `org.openedx.frontend.layout.header_desktop_logged_out_items.v1`
### Slot ID Aliases
* `desktop_logged_out_items_slot`
## Description
@@ -40,7 +43,7 @@ const modifyLoggedOutItems = ( widget ) => {
const config = {
pluginSlots: {
desktop_logged_out_items_slot: {
'org.openedx.frontend.layout.header_desktop_logged_out_items.v1': {
keepDefault: true,
plugins: [
{
@@ -67,7 +70,7 @@ import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-frame
const config = {
pluginSlots: {
desktop_logged_out_items_slot: {
'org.openedx.frontend.layout.header_desktop_logged_out_items.v1': {
keepDefault: false,
plugins: [
{
@@ -99,7 +102,7 @@ import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-frame
const config = {
pluginSlots: {
desktop_logged_out_items_slot: {
'org.openedx.frontend.layout.header_desktop_logged_out_items.v1': {
keepDefault: true,
plugins: [
{

View File

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

View File

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

View File

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

View File

@@ -1,6 +1,9 @@
# Desktop Secondary Menu Slot
### Slot ID: `desktop_secondary_menu_slot`
### Slot ID: `org.openedx.frontend.layout.header_desktop_secondary_menu.v1`
### Slot ID Aliases
* `desktop_secondary_menu_slot`
## Description
@@ -35,7 +38,7 @@ const modifySecondaryMenu = ( widget ) => {
const config = {
pluginSlots: {
desktop_secondary_menu_slot: {
'org.openedx.frontend.layout.header_desktop_secondary_menu.v1': {
keepDefault: true,
plugins: [
{
@@ -62,7 +65,7 @@ import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-frame
const config = {
pluginSlots: {
desktop_secondary_menu_slot: {
'org.openedx.frontend.layout.header_desktop_secondary_menu.v1': {
keepDefault: false,
plugins: [
{
@@ -94,7 +97,7 @@ import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-frame
const config = {
pluginSlots: {
desktop_secondary_menu_slot: {
'org.openedx.frontend.layout.header_desktop_secondary_menu.v1': {
keepDefault: true,
plugins: [
{

View File

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

View File

@@ -1,6 +1,9 @@
# Desktop User Menu Slot
### Slot ID: `desktop_user_menu_slot`
### Slot ID: `org.openedx.frontend.layout.header_desktop_user_menu.v1`
### Slot ID Aliases
* `desktop_user_menu_slot`
## Description
@@ -48,7 +51,7 @@ const modifyUserMenu = ( widget ) => {
const config = {
pluginSlots: {
desktop_user_menu_slot: {
'org.openedx.frontend.layout.header_desktop_user_menu.v1': {
keepDefault: true,
plugins: [
{
@@ -75,7 +78,7 @@ import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-frame
const config = {
pluginSlots: {
desktop_user_menu_slot: {
'org.openedx.frontend.layout.header_desktop_user_menu.v1': {
keepDefault: false,
plugins: [
{
@@ -107,7 +110,7 @@ import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-frame
const config = {
pluginSlots: {
desktop_user_menu_slot: {
'org.openedx.frontend.layout.header_desktop_user_menu.v1': {
keepDefault: true,
plugins: [
{

View File

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

View File

@@ -1,6 +1,9 @@
# Learning Help Slot
### Slot ID: `learning_help_slot`
### Slot ID: `org.openedx.frontend.layout.header_learning_help.v1`
### Slot ID Aliases
* `learning_help_slot`
## Description
@@ -19,7 +22,7 @@ import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-frame
const config = {
pluginSlots: {
learning_help_slot: {
'org.openedx.frontend.layout.header_learning_help.v1': {
keepDefault: false,
plugins: [
{

View File

@@ -3,7 +3,7 @@ import { PluginSlot } from '@openedx/frontend-plugin-framework';
import LearningHeaderHelpLink from '../../learning-header/LearningHeaderHelpLink';
const LearningHelpSlot = () => (
<PluginSlot id="learning_help_slot">
<PluginSlot id="org.openedx.frontend.layout.header_learning_help.v1" idAliases={['learning_help_slot']}>
<LearningHeaderHelpLink />
</PluginSlot>
);

View File

@@ -1,6 +1,9 @@
# Learning Logged Out Items Slot
### Slot ID: `learning_logged_out_items_slot`
### Slot ID: `org.openedx.frontend.layout.header_learning_logged_out_items.v1`
### Slot ID Aliases
* `learning_logged_out_items_slot`
## Description
@@ -38,7 +41,7 @@ const modifyLoggedOutItems = ( widget ) => {
const config = {
pluginSlots: {
learning_logged_out_items_slot: {
'org.openedx.frontend.layout.header_learning_logged_out_items.v1': {
keepDefault: true,
plugins: [
{
@@ -65,7 +68,7 @@ import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-frame
const config = {
pluginSlots: {
learning_logged_out_items_slot: {
'org.openedx.frontend.layout.header_learning_logged_out_items.v1': {
keepDefault: false,
plugins: [
{
@@ -97,7 +100,7 @@ import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-frame
const config = {
pluginSlots: {
learning_logged_out_items_slot: {
'org.openedx.frontend.layout.header_learning_logged_out_items.v1': {
keepDefault: true,
plugins: [
{

View File

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

View File

@@ -1,6 +1,9 @@
# Learning User Menu Slot
### Slot ID: `learning_user_menu_slot`
### Slot ID: `org.openedx.frontend.layout.header_learning_user_menu.v1`
### Slot ID Aliases
* `learning_user_menu_slot`
## Description
@@ -37,7 +40,7 @@ const modifyUserMenu = ( widget ) => {
const config = {
pluginSlots: {
learning_user_menu_slot: {
'org.openedx.frontend.layout.header_learning_user_menu.v1': {
keepDefault: true,
plugins: [
{
@@ -64,7 +67,7 @@ import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-frame
const config = {
pluginSlots: {
learning_user_menu_slot: {
'org.openedx.frontend.layout.header_learning_user_menu.v1': {
keepDefault: false,
plugins: [
{
@@ -96,7 +99,7 @@ import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-frame
const config = {
pluginSlots: {
learning_user_menu_slot: {
'org.openedx.frontend.layout.header_learning_user_menu.v1': {
keepDefault: true,
plugins: [
{

View File

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

View File

@@ -1,6 +1,9 @@
# Logo Slot
### Slot ID: `logo_slot`
### Slot ID: `org.openedx.frontend.layout.header_logo.v1`
### Slot ID Aliases
* `logo_slot`
## Description
@@ -22,7 +25,7 @@ const modifyLogoHref = ( widget ) => {
const config = {
pluginSlots: {
logo_slot: {
'org.openedx.frontend.layout.header_logo.v1': {
keepDefault: true,
plugins: [
{
@@ -47,7 +50,7 @@ import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-frame
const config = {
pluginSlots: {
logo_slot: {
'org.openedx.frontend.layout.header_logo.v1': {
keepDefault: false,
plugins: [
{

View File

@@ -6,7 +6,8 @@ const LogoSlot = ({
href, src, alt, ...attributes
}) => (
<PluginSlot
id="logo_slot"
id="org.openedx.frontend.layout.header_logo.v1"
idAliases={['logo_slot']}
slotOptions={{
mergeProps: true,
}}

View File

@@ -1,6 +1,9 @@
# Mobile Header Slot
### Slot ID: `mobile_header_slot`
### Slot ID: `org.openedx.frontend.layout.header_mobile.v1`
### Slot ID Aliases
* `mobile_header_slot`
## Description
@@ -19,7 +22,7 @@ import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-frame
const config = {
pluginSlots: {
mobile_header_slot: {
'org.openedx.frontend.layout.header_mobile.v1': {
keepDefault: false,
plugins: [
{

View File

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

View File

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

View File

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

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,
}}

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,
}}

View File

@@ -1,15 +1,23 @@
# `frontend-component-header` Plugin Slots
* [`logo_slot`](./LogoSlot/)
* [`desktop_main_menu_slot`](./DesktopMainMenuSlot/)
* [`desktop_secondary_menu_slot`](./DesktopSecondaryMenuSlot/)
* [`mobile_main_menu_slot`](./MobileMainMenuSlot/)
* [`course_info_slot`](./CourseInfoSlot/)
* [`learning_help_slot`](./LearningHelpSlot/)
* [`desktop_logged_out_items_slot`](./DesktopLoggedOutItemsSlot/)
* [`mobile_logged_out_items_slot`](./MobileLoggedOutItemsSlot/)
* [`mobile_user_menu_slot`](./MobileUserMenuSlot/)
* [`desktop_user_menu_slot`](./DesktopUserMenuSlot/)
* [`learning_user_menu_slot`](./LearningUserMenuSlot/)
* [`learning_logged_out_items_slot`](./LearningLoggedOutItemsSlot/)
* [`desktop_header_slot`](./DesktopHeaderSlot/)
### Shared
* [`org.openedx.frontend.layout.header_logo.v1`](./LogoSlot/)
### Desktop Header
* [`org.openedx.frontend.layout.header_desktop.v1`](./DesktopHeaderSlot/)
* [`org.openedx.frontend.layout.header_desktop_logged_out_items.v1`](./DesktopLoggedOutItemsSlot/)
* [`org.openedx.frontend.layout.header_desktop_main_menu.v1`](./DesktopMainMenuSlot/)
* [`org.openedx.frontend.layout.header_desktop_secondary_menu.v1`](./DesktopSecondaryMenuSlot/)
* [`org.openedx.frontend.layout.header_desktop_user_menu.v1`](./DesktopUserMenuSlot/)
### Learning Header
* [`org.openedx.frontend.layout.header_learning_course_info.v1`](./CourseInfoSlot/)
* [`org.openedx.frontend.layout.header_learning_help.v1`](./LearningHelpSlot/)
* [`org.openedx.frontend.layout.header_learning_logged_out_items.v1`](./LearningLoggedOutItemsSlot/)
* [`org.openedx.frontend.layout.header_learning_user_menu.v1`](./LearningUserMenuSlot/)
### Mobile Header
* [`org.openedx.frontend.layout.header_mobile.v1`](./MobileHeaderSlot/)
* [`org.openedx.frontend.layout.header_mobile_logged_out_items.v1`](./MobileLoggedOutItemsSlot/)
* [`org.openedx.frontend.layout.header_mobile_main_menu.v1`](./MobileMainMenuSlot/)
* [`org.openedx.frontend.layout.header_mobile_user_menu.v1`](./MobileUserMenuSlot/)