Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
2e9f064
Privacy policy updates (#1208)
jonkafton Jul 1, 2024
b977048
Update actions/checkout digest to 692973e (#961)
renovate[bot] Jul 1, 2024
90956fe
Merge branch 'release' into main
odlbot Jul 2, 2024
1f82492
Removed nginx serving of frontend locally (#1179)
rhysyngsun Jul 2, 2024
cc11d96
Fix and reenable onboarding page tests (#1216)
rhysyngsun Jul 2, 2024
efc959b
Fix storybook github pages publishing (#1200)
ChristopherChudzicki Jul 2, 2024
573d340
resource category tabs (#1211)
abeglova Jul 2, 2024
4231211
make primary buttons shadowy, remove edge=none (#1213)
ChristopherChudzicki Jul 2, 2024
34a0b04
Updates icons to use Remixicons where they don't already (#1157)
jkachel Jul 2, 2024
d43fa26
Webpack build config loads .env files for running outside of Docker (…
jonkafton Jul 3, 2024
08d1994
Data fixtures app for loading static fixtures (#1218)
shanbady Jul 8, 2024
96fccd2
resource type (#1222)
abeglova Jul 8, 2024
3a953c2
Update resource drawer text and URL for podcast episodes (#1191)
jonkafton Jul 8, 2024
0cff29a
better spacing around pagination component (#1219)
ChristopherChudzicki Jul 8, 2024
0d44d24
Navigation UI fixes (#1228)
shanbady Jul 8, 2024
736a068
Only publish enrollable mitxonline courses (#1229)
mbertrand Jul 8, 2024
c2442a7
Update dependency eslint-plugin-jest to v28 (#1038)
renovate[bot] Jul 8, 2024
bf9e851
Homepage and nav drawer copy edits (#1233)
ChristopherChudzicki Jul 9, 2024
0d15f55
extra weight for instructors (#1231)
abeglova Jul 9, 2024
6797f1e
open resources in new tab (#1220)
ChristopherChudzicki Jul 9, 2024
c93cc44
Use ovewrite=True when calling pluggy function from upsert_offered_by…
mbertrand Jul 9, 2024
b3ae824
fix learning path count, increase item page size (#1230)
ChristopherChudzicki Jul 9, 2024
bf41718
Remove "Top picks" carousel if no results (#1195)
jonkafton Jul 9, 2024
92e4111
resource drawer UI fixes (#1237)
shanbady Jul 9, 2024
78e61f8
Align departments listing colors to designs (#1238)
rhysyngsun Jul 9, 2024
2e08250
Unit and detail page copy updates (#1235)
shanbady Jul 10, 2024
1f285ff
remove manage widgets (#1239)
ChristopherChudzicki Jul 10, 2024
20e99eb
Fix logout view (#1236)
rhysyngsun Jul 10, 2024
ab5020e
Release 0.13.18
odlbot Jul 10, 2024
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
42 changes: 0 additions & 42 deletions .env.example

This file was deleted.

37 changes: 10 additions & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- 9200:9200

steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4

- name: update apt
run: sudo apt-get update -y
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
CELERY_BROKER_URL: redis://localhost:6379/4
CELERY_RESULT_BACKEND: redis://localhost:6379/4
TIKA_CLIENT_ONLY: "True"
MITOPEN_BASE_URL: http://localhost:8063/
MITOPEN_APP_BASE_URL: http://localhost:8062/
MAILGUN_KEY: fake_mailgun_key
MAILGUN_SENDER_DOMAIN: other.fake.site
OPENSEARCH_INDEX: testindex
Expand All @@ -101,7 +101,7 @@ jobs:
javascript-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
with:
node-version: "^20"
Expand All @@ -123,7 +123,7 @@ jobs:
- name: Webpack build
run: yarn run build
env:
MITOPEN_AXIOS_BASE_PATH: https://api.mitopen-test.odl.mit.edu
MITOPEN_API_BASE_URL: https://api.mitopen-test.odl.mit.edu

- name: Lints
run: yarn run lint-check
Expand Down Expand Up @@ -156,7 +156,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4

- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
with:
Expand All @@ -167,25 +167,8 @@ jobs:
- name: Install dependencies
run: yarn install

- name: Copy static assets
run: |
mkdir -p frontends/mit-open/build/static;
cp -R frontends/mit-open/public/ frontends/mit-open/build/static;

- run: PUBLIC_URL=/mit-open yarn build-github-pages
working-directory: frontends

- run: PUBLIC_URL=/mit-open yarn build-storybook --output-dir ../github-pages/build/storybook
working-directory: frontends

- name: Setup Pages
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5

- name: Upload artifact
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4
with:
name: pages-site
path: frontends/github-pages/build
- name: Build Storybook
run: yarn workspace mit-open build-storybook

openapi-generated-client-check-v0:
# This job checks that the output of openapi-generator-typescript-axios that
Expand All @@ -197,7 +180,7 @@ jobs:
GENERATOR_OUTPUT_DIR_VC: ./frontends/api/src/generated/v0
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
with:
node-version: "^20"
Expand Down Expand Up @@ -236,7 +219,7 @@ jobs:
GENERATOR_OUTPUT_DIR_VC: ./frontends/api/src/generated/v1
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
with:
node-version: "^20"
Expand Down Expand Up @@ -271,7 +254,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4

- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/openapi-diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout HEAD
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
ref: ${{ github.head_ref }}
path: head
- name: Checkout BASE
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
ref: ${{ github.base_ref }}
path: base
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
github.event_name == 'workflow_dispatch' ||
github.event.workflow_run.conclusion == 'success'
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
ref: release

Expand All @@ -41,7 +41,8 @@ jobs:
POSTHOG_PROJECT_ID: ${{ secrets.POSTHOG_PROJECT_ID_PROD }}
POSTHOG_PROJECT_API_KEY: ${{ secrets.POSTHOG_PROJECT_API_KEY_PROD }}
MITOPEN_AXIOS_WITH_CREDENTIALS: true
MITOPEN_AXIOS_BASE_PATH: https://api.mitopen.odl.mit.edu
MITOPEN_API_BASE_URL: https://api.mitopen.odl.mit.edu
MITOPEN_SUPPORT_EMAIL: mitopen-support@mit.edu

- uses: akhileshns/heroku-deploy@581dd286c962b6972d427fcf8980f60755c15520
with:
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/publish-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
on:
# Runs on pushes targeting the default branch
push:
branches: [$default-branch]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4

- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
with:
node-version: "^20"
cache: yarn
cache-dependency-path: yarn.lock

- name: Install dependencies
run: yarn install

- name: Build Storybook
run: yarn workspace mit-open build-storybook

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./frontends/mit-open/storybook-static

deploy:
needs: build

permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
5 changes: 3 additions & 2 deletions .github/workflows/release-candidate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
github.event_name == 'workflow_dispatch' ||
github.event.workflow_run.conclusion == 'success'
steps:
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
with:
ref: release-candidate

Expand All @@ -41,7 +41,8 @@ jobs:
POSTHOG_PROJECT_ID: ${{ secrets.POSTHOG_PROJECT_ID_RC }}
POSTHOG_PROJECT_API_KEY: ${{ secrets.POSTHOG_PROJECT_API_KEY_RC }}
MITOPEN_AXIOS_WITH_CREDENTIALS: true
MITOPEN_AXIOS_BASE_PATH: https://api.mitopen-rc.odl.mit.edu
MITOPEN_API_BASE_URL: https://api.mitopen-rc.odl.mit.edu
MITOPEN_SUPPORT_EMAIL: odl-mitopen-rc-support@mit.edu

- uses: akhileshns/heroku-deploy@581dd286c962b6972d427fcf8980f60755c15520
with:
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ __pycache__/

# Distribution / packaging
.Python
env/
build/
build-exports/
develop-eggs/
Expand Down
25 changes: 16 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,25 @@ MIT Open follows the same [initial setup steps outlined in the common OL web app
Run through those steps **including the addition of `/etc/hosts` aliases and the optional step for running the
`createsuperuser` command**.

### Configure required `.env` settings
### Configuration

Configuration can be put in the following filess which are gitignored:

```
mit-open/
├── env/
│ ├── shared.local.env (provided to both frontend and backend containers)
│ ├── frontend.local.env (provided only to frontend containers)
│ └── backend.local.env (provided only to frontend containers)
└── .env (legacy file)
```

The following settings must be configured before running the app:

- `COMPOSE_PROFILES`

Controls which docker containers run. To run them all, use `COMPOSE_PROFILES=backend,frontend`. See [Frontend Development](./frontends/README.md) for more.

- `INDEXING_API_USERNAME`

At least to start out, this should be set to the username of the superuser
you created above.
This can be set either in a top-level `.env` that `docker compose` [automatically ingests](https://docs.docker.com/compose/environment-variables/envvars/#compose_env_files) or through any other method of setting an environment variable in your shell (e.g. `direnv`).

- `MAILGUN_KEY` and `MAILGUN_SENDER_DOMAIN`

Expand Down Expand Up @@ -216,7 +223,7 @@ Once these are set (and you've restarted the app), you should see events flowing
A Javascript bundle of exported frontend components can be generated for use in external websites that have CORS allowance into a given instance of `mit-open`. There are a few settings you might want to change in order to get the expected results.

- `MITOPEN_AXIOS_WITH_CREDENTIALS` - This sets `withCredentials: true` when initializing the Axios API, which tells the end user's browser to send along any browser level cookies for the current domain when making CORS requests
- `MITOPEN_AXIOS_BASE_PATH` - This sets the base path used for API requests, which will need to be set to a fully qualified url pointing to an instance of `mit-open` (i.e. https://mitopen.odl.mit.edu) in order for requests from the external site to reach the proper destination
- `MITOPEN_API_BASE_URL` - This sets the base url used for API requests, which will need to be set to a fully qualified url pointing to an instance of `mit-open` (i.e. https://mitopen.odl.mit.edu) in order for requests from the external site to reach the proper destination
- `CORS_ALLOWED_ORIGINS`, `CSRF_TRUSTED_ORIGINS` - On the instance of `mit-open` that the externally hosted components will access via the API, the domains of any sites that need CORS access need to be here as a list of strings

To build the bundle of exported components, run:
Expand Down Expand Up @@ -247,6 +254,6 @@ $("#add-to-user-list-button").on("click", async (event) => {

This is just an example, and you could input any `readable_id` to bring up a dialog to add any given `LearningResource` object to a `UserList`.

## GitHub Pages
## GitHub Pages Storybook

A static site for this repo with developer resources publishes to https://mitodl.github.io/mit-open/ during CI runs.
Demos and documentation of reusable UI components in this repo are published as a [storybook](https://storybook.js.org/) at https://mitodl.github.io/mit-open/.
31 changes: 31 additions & 0 deletions RELEASE.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,37 @@
Release Notes
=============

Version 0.13.18
---------------

- Fix logout view (#1236)
- remove manage widgets (#1239)
- Unit and detail page copy updates (#1235)
- Align departments listing colors to designs (#1238)
- resource drawer UI fixes (#1237)
- Remove "Top picks" carousel if no results (#1195)
- fix learning path count, increase item page size (#1230)
- Use ovewrite=True when calling pluggy function from upsert_offered_by (#1227)
- open resources in new tab (#1220)
- extra weight for instructors (#1231)
- Homepage and nav drawer copy edits (#1233)
- Update dependency eslint-plugin-jest to v28 (#1038)
- Only publish enrollable mitxonline courses (#1229)
- Navigation UI fixes (#1228)
- better spacing around pagination component (#1219)
- Update resource drawer text and URL for podcast episodes (#1191)
- resource type (#1222)
- Data fixtures app for loading static fixtures (#1218)
- Webpack build config loads .env files for running outside of Docker (#1221)
- Updates icons to use Remixicons where they don't already (#1157)
- make primary buttons shadowy, remove edge=none (#1213)
- resource category tabs (#1211)
- Fix storybook github pages publishing (#1200)
- Fix and reenable onboarding page tests (#1216)
- Removed nginx serving of frontend locally (#1179)
- Update actions/checkout digest to 692973e (#961)
- Privacy policy updates (#1208)

Version 0.13.17 (Released July 02, 2024)
---------------

Expand Down
18 changes: 2 additions & 16 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
{
"url": "https://github.com/heroku/heroku-buildpack-apt"
},
{
"url": "https://github.com/heroku/heroku-buildpack-nodejs"
},
{
"url": "https://github.com/moneymeets/python-poetry-buildpack"
},
Expand Down Expand Up @@ -172,9 +169,6 @@
"description": "Prefix path for cached images generated by imagekit",
"required": false
},
"INDEXING_API_USERNAME": {
"description": "Username used for indexing"
},
"INDEXING_ERROR_RETRIES": {
"description": "Number of times to retry an indexing operation on failure",
"required": false
Expand Down Expand Up @@ -298,20 +292,12 @@
"description": "List of pluggy plugins to use for authentication",
"required": false
},
"MITOPEN_AXIOS_WITH_CREDENTIALS": {
"description": "When building the Axios API, set defaults.withCredentials to this value",
"required": false
},
"MITOPEN_AXIOS_BASE_PATH": {
"description": "The base path to use when making API requests",
"required": false
},
"MITOPEN_LEARNING_RESOURCES_PLUGINS": {
"description": "List of pluggy plugins to use for learning resources",
"required": false
},
"MITOPEN_BASE_URL": {
"description": "Base url to link users to in emails"
"MITOPEN_APP_BASE_URL": {
"description": "Base url to create links to the app"
},
"MITOPEN_COOKIE_NAME": {
"description": "Name of the cookie for the JWT auth token"
Expand Down
Loading