Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ npm-debug.log
coverage
module.config.js

dist/
src/i18n/transifex_input.json
temp/babel-plugin-react-intl

Expand Down
32 changes: 32 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
transifex_utils = ./node_modules/.bin/transifex-utils.js
i18n = ./src/i18n
transifex_input = $(i18n)/transifex_input.json

# This directory must match .babelrc .
transifex_temp = ./temp/babel-plugin-formatjs

precommit:
npm run lint
npm audit
Expand All @@ -13,3 +20,28 @@ build:
cp ./package.json ./dist/package.json
cp ./LICENSE ./dist/LICENSE
cp ./README.md ./dist/README.md

requirements:
npm ci

i18n.extract:
# Pulling display strings from .jsx files into .json files...
rm -rf $(transifex_temp)
npm run-script i18n_extract

i18n.concat:
# Gathering JSON messages into one file...
$(transifex_utils) $(transifex_temp) $(transifex_input)

extract_translations: | requirements i18n.extract i18n.concat

# Despite the name, we actually need this target to detect changes in the incoming translated message files as well.
detect_changed_source_translations:
# Checking for changed translations...
git diff --exit-code $(i18n)


# This target is used by Travis.
validate-no-uncommitted-package-lock-changes:
# Checking for package-lock.json changes...
git diff --exit-code package-lock.json
661 changes: 661 additions & 0 deletions dist/LICENSE

Large diffs are not rendered by default.

57 changes: 57 additions & 0 deletions dist/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# frontend-slot-footer

This package provides a wrapped version of the lms and studio footer using [Frontend Plugin Framework](https://github.com/openedx/frontend-plugin-framework).

- ### LMS Footer Slot ID: `footer_slot`
- ### Studio Footer Slot ID: `studio_footer_slot`

## Description

The slots are used to replace/modify/hide the footer.

## Example

The following `env.config.jsx` will replace the default footer.

LMS:

![Screenshot of Default LMS Footer](./docs/images/default_footer.png)

Studio:

![Screenshot of Default Studio Footer](./docs/images/default_studio_footer.png)
with a simple custom footer

![Screenshot of Custom Footer](./docs/images/custom_footer.png)

```js
import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-framework';

const config = {
pluginSlots: {
// For authoring MFE, replace footer_slot with studio_footer_slot
footer_slot: {
plugins: [
{
// Hide the default footer
op: PLUGIN_OPERATIONS.Hide,
widgetId: 'default_contents',
},
{
// Insert a custom footer
op: PLUGIN_OPERATIONS.Insert,
widget: {
id: 'custom_footer',
type: DIRECT_PLUGIN,
RenderWidget: () => (
<h1 style={{textAlign: 'center'}}>🦶</h1>
),
},
},
]
}
},
}

export default config;
```
10 changes: 10 additions & 0 deletions dist/extended-profile/ExtendedProfileContext.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/extended-profile/ExtendedProfileContext.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

98 changes: 98 additions & 0 deletions dist/extended-profile/ExtendedProfileProvider.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/extended-profile/ExtendedProfileProvider.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading