-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added - Add Slider plugin Fixed - Ugrade to djangocms-link 5
- Loading branch information
Showing
33 changed files
with
2,310 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
website/versioned_docs/version-2.33.0/accessibility-testing.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- | ||
id: accessibility-testing | ||
title: Automated accessibility checks | ||
sidebar_label: Accessibility testing | ||
--- | ||
|
||
Richie includes automated accessibility checks built through a `Cypress` end-to-end testing infrastructure. | ||
|
||
Automated accessibility checks can only surface around 30% of possible problems on any given page. This does not mean they are not useful, but they cannot replace human audits and developer proficiency. | ||
|
||
We use `axe` to run these checks. You can find more about axe on the [`axe-core` GitHub repository](https://github.com/dequelabs/axe-core). | ||
|
||
## Testing environment setup | ||
|
||
Both `Cypress` and `axe` are used through their respective NPM packages. This means everything goes through `yarn` commands. You need to have `node` and `yarn` installed locally to run the tests. | ||
|
||
```bash | ||
cd tests_e2e | ||
yarn install | ||
``` | ||
|
||
This should install everything you need. | ||
|
||
## Running the tests | ||
|
||
There are two ways to use the `Cypress` tests: through a terminal-based runner and through the `Cypress` UI. Both are started through `yarn` but they have different use cases. | ||
|
||
```bash | ||
yarn cypress run | ||
``` | ||
|
||
You can start by running the tests directly from the terminal. This is the quickest way to make sure all views pass checks (or find out which ones do not). This is also the starting point for work on running `Cypress` in the CI. | ||
|
||
```bash | ||
yarn cypress open | ||
``` | ||
|
||
This command simply opens the `Cypress` UI. From there, you can run all or some of the test suites with live reloading. This is a great way to understand why some tests are failing, especially when it comes to a11y violations. | ||
|
||
When there are a11y violations, an assertion fails and prints out a list in the `Cypress` UI. You can then click on a violation to print more information in the browser console. | ||
|
||
## Documentation reference | ||
|
||
- [List of all possible violations covered by `axe`](https://dequeuniversity.com/rules/axe/3.4) | ||
- [`Cypress` documentation](https://docs.cypress.io) | ||
- [`axe` and `Cypress` integration](https://github.com/avanslaars/cypress-axe) |
56 changes: 56 additions & 0 deletions
56
website/versioned_docs/version-2.33.0/api/course-run-synchronization-api.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
--- | ||
id: course-run-synchronization-api | ||
title: Course run synchronization API | ||
sidebar_label: course run sync | ||
--- | ||
|
||
API endpoint allowing remote systems to synchronize their course runs with a Richie instance. | ||
|
||
## Synchronization endpoint [/api/1.0/course-runs-sync] | ||
|
||
This documentation describes version "1.0" of this API endpoint. | ||
|
||
### Synchronize a course run [POST] | ||
|
||
It takes a JSON object containing the course run details: | ||
|
||
- resource_link: `https://lms.example.com/courses/course-v1:001+001+001/info` (string, required) - | ||
url of the course syllabus on the LMS from which a unique course identifier can be extracted | ||
- start: `2018-02-01T06:00:00Z` (string, optional) - ISO 8601 date, when this session of the | ||
course starts | ||
- end: `2018-02-28T06:00:00Z` (string, optional) - ISO 8601 date, when this session of the course | ||
ends | ||
- enrollment_start: `2018-01-01T06:00:00Z` (string, optional) - ISO 8601 date, when enrollment | ||
for this session of the course starts | ||
- enrollment_end: `2018-01-31T06:00:00Z` (string, optional) - ISO 8601 date, when enrollment for | ||
this session of the course ends | ||
- languages: ['fr', 'en'] (array[string], required) - ISO 639-1 code (2 letters) for the course's | ||
languages | ||
|
||
|
||
+ Request (application/json) | ||
+ Headers | ||
+ Authorization: `SIG-HMAC-SHA256 xxxxxxx` (string, required) - Authorization header | ||
containing the digest of the utf-8 encoded json representation of the submitted data | ||
for the given secret key and SHA256 digest algorithm (see [synchronizing-course-runs] | ||
for an example). | ||
+ Body | ||
```json | ||
{ | ||
"resource_link": "https://lms.example.com/courses/course-v1:001+001+001/info", | ||
"start": "2021-02-01T00:00:00Z", | ||
"end": "2021-02-31T23:59:59Z", | ||
"enrollment_start": "2021-01-01T00:00:00Z", | ||
"enrollment_end": "2021-01-31T23:59:59Z", | ||
"languages": ["en", "fr"] | ||
} | ||
``` | ||
|
||
+ Response 200 (application/json) | ||
|
||
+ Body | ||
```json | ||
{ | ||
"success": True | ||
} | ||
``` |
Binary file added
BIN
+1.06 MB
website/versioned_docs/version-2.33.0/assets/images/crowdin-join-richie.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+177 KB
website/versioned_docs/version-2.33.0/assets/images/demo-screenshot.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
81 changes: 81 additions & 0 deletions
81
website/versioned_docs/version-2.33.0/building-the-frontend.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
--- | ||
id: building-the-frontend | ||
title: Building Richie's frontend in your own project | ||
sidebar_label: Building the frontend | ||
--- | ||
|
||
Richie offers plenty of opportunities to customize the way it works and make it suit the needs of your own project. Most of these go through Django settings. | ||
|
||
Part of Richie is a React frontend however. If you want to change how it works in ways that cannot be changed from the Django settings, you will need to build your own frontend. | ||
|
||
## Installing `richie-education` | ||
|
||
If you have not already, you should create a directory for the frontend in your project. We recommend you mirror Richie's file structure so it's easier to keep track of the changes you make. | ||
|
||
```bash | ||
mkdir -p src/frontend | ||
``` | ||
|
||
Then, you need to bootstrap your own frontend project in this new directory. | ||
|
||
```bash | ||
cd src/frontend | ||
yarn init | ||
``` | ||
|
||
With each version of Richie, we build and publish an `NPM` package to enable Richie users to build their own Javascript and CSS. You're now ready to install it. | ||
|
||
```bash | ||
yarn add richie-education | ||
``` | ||
|
||
In your `package.json` file, you should see it in the list of dependencies. Also, there's a `node_modules` directory where the package and its dependencies are actually installed. | ||
|
||
```json | ||
"dependencies": { | ||
"richie-education": "1.12.0" | ||
}, | ||
``` | ||
|
||
## Building the Javascript bundle | ||
|
||
You are now ready to run your own frontend build. We'll just be using webpack directly. | ||
|
||
```bash | ||
yarn webpack --config node_modules/richie-education/webpack.config.js --output-path ./build --richie-dependent-build | ||
``` | ||
|
||
Here is everything that is happening: | ||
|
||
- `yarn webpack` — run the webpack CLI; | ||
- `--config node_modules/richie-education/webpack.config.js` — point webpack to `richie-education`'s webpack config file; | ||
- `--output-path ./build` — make sure we get our output where we need it to be; | ||
- `--richie-dependent-build` — enable some affordances with import paths. We pre-configured Richie's webpack to be able to run it from a dependent project. | ||
|
||
You can now run your build to change frontend settings or override frontend components with your own. | ||
|
||
## Building the CSS | ||
|
||
If you want to change styles in Richie, or add new styles for components & templates you develop yourself, you can run the SASS/CSS build yourself. | ||
|
||
Start by creating your own `main` file. The `_` underscore at the beginning is there to prevent sass from auto-compiling the file. | ||
|
||
```bash | ||
mkdir -p src/frontend/scss | ||
touch src/frontend/scss/_mains.scss | ||
``` | ||
|
||
Start by importing Richie's main scss file. If you prefer, you can also directly import any files you want to include — in effect re-doing Richie's `_main.scss` on your own. | ||
|
||
```sass | ||
@import "richie-education/scss/main"; | ||
``` | ||
|
||
You are now ready to run the CSS build: | ||
|
||
``` | ||
cd src/frontend | ||
yarn build-sass | ||
``` | ||
|
||
This gives you one output CSS file that you can put in the static files directory of your project and use to override Richie's style or add your own parts. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- | ||
id: contributing-guide | ||
title: Contributing guide | ||
sidebar_label: Contributing guide | ||
--- | ||
|
||
This project is intended to be community-driven, so please, do not hesitate to get in touch if you have any question related to our implementation or design decisions. | ||
|
||
We try to raise our code quality standards and expect contributors to follow the recommandations | ||
from our [handbook](https://openfun.gitbooks.io/handbook/content). | ||
|
||
## Checking your code | ||
|
||
We use strict flake8, pylint, isort and black linters to check the validity of our backend code: | ||
|
||
$ make lint-back | ||
|
||
We use strict eslint and prettier to check the validity of our frontend code: | ||
|
||
$ make lint-front | ||
|
||
## Running tests | ||
|
||
On the backend, we use pytest to run our test suite: | ||
|
||
$ make test-back | ||
|
||
On the frontend, we use karma to run our test suite: | ||
|
||
$ make test-front | ||
|
||
## Running migrations | ||
|
||
The first time you start the project with `make bootstrap`, the `db` container automatically | ||
creates a fresh database named `richie` and performs database migrations. Each time a new | ||
**database migration** is added to the code, you can synchronize the database schema by running: | ||
|
||
$ make migrate | ||
|
||
## Handling new dependencies | ||
|
||
Each time you add new front-end or back-end dependencies, you will need to rebuild the | ||
application. We recommend to use: | ||
|
||
$ make bootstrap | ||
|
||
## Going further | ||
|
||
To see all available commands, run: | ||
|
||
$ make | ||
|
||
We also provide shortcuts for docker compose commands as sugar scripts in the | ||
`bin/` directory: | ||
|
||
``` | ||
bin | ||
├── exec | ||
├── pylint | ||
├── pytest | ||
└── run | ||
``` | ||
|
||
More details and tips & tricks can be found in our [development with Docker | ||
documentation](docker-development.md) |
Oops, something went wrong.