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
67dfc70
refactor: update logic in training module to use installedApps to che…
deeonwuli Mar 2, 2026
3bbcdbb
feat: import translations action for each training module and landing…
deeonwuli Mar 24, 2026
4ef895a
refactor: reset selected language, module, and terms after saving in …
deeonwuli Mar 24, 2026
a15b215
Migrate to vite
xurxodev Mar 26, 2026
51d2784
Migrate to yarn 4 1d406fb - Enable core pack in prepare script - Add …
xurxodev Mar 26, 2026
0f42e87
Vite library mode + TS/build fixes
xurxodev Mar 26, 2026
aba0d43
chore(deps): upgrade direct dependencies and untrack yarn install state
xurxodev Mar 26, 2026
29e30d6
chore(security): upgrade deps, adapt file-type API, and remove unused…
xurxodev Mar 27, 2026
b026f81
fix(bootstrap): resolve DHIS2 baseUrl from injected meta before manif…
xurxodev Mar 27, 2026
942d66a
chore: Update d2-api
xurxodev Mar 31, 2026
fff20f8
fix: support 2.42 to retrieve current user
xurxodev Mar 31, 2026
a12eb42
fix: double bar in settings page
xurxodev Mar 31, 2026
1be15d0
fix: double bar in iframe
xurxodev Mar 31, 2026
02a3d45
feat: add v42 to compatibility list
xurxodev Mar 31, 2026
dea56fc
fix: double bar appear to start other training module
xurxodev Mar 31, 2026
6b5bd9b
feat: clear cache after installing a new app to prevent stale data
deeonwuli Mar 31, 2026
6a9adff
feat: memoize get version function
deeonwuli Mar 31, 2026
6f3cc4d
feat: extract get installed apps to helper function
deeonwuli Mar 31, 2026
08952f5
refactor: move DhisInstalledApp type definition to installedApps module
deeonwuli Apr 1, 2026
97b9ac9
fix: remove unnecessary installed apps parameter
deeonwuli Apr 1, 2026
3c7246b
fix: optimize dependencies in hooks and components to remove warnings
deeonwuli Apr 1, 2026
417008f
Merge branch 'development' of https://github.com/EyeSeeTea/training-a…
deeonwuli Apr 1, 2026
69de6f4
chore: remove Cypress and travis from the repository
xurxodev Apr 7, 2026
39bf6a9
chore: enable GitHub action in all pull requests
xurxodev Apr 7, 2026
f786f82
Merge pull request #225 from EyeSeeTea/refactor/fewer-requests-to-che…
adrianq Apr 8, 2026
aec076e
Merge pull request #231 from EyeSeeTea/feature/security
adrianq Apr 9, 2026
3771096
bump version
adrianq Apr 26, 2026
6ba74cf
Merge branch 'development' into feature/support_2.42
adrianq Apr 26, 2026
7395ca7
Merge pull request #232 from EyeSeeTea/feature/support_2.42
adrianq Apr 26, 2026
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
6 changes: 4 additions & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
BROWSER=false
PORT=8081
VITE_PORT=8081
SKIP_PREFLIGHT_CHECK=true
REACT_APP_DHIS2_BASE_URL=https://dev.eyeseetea.com/play
REACT_APP_LOGO_PATH=

VITE_DHIS2_BASE_URL=https://dev.eyeseetea.com/play
VITE_LOGO_PATH=
4 changes: 1 addition & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ module.exports = {
"react-app",
"eslint:recommended",
"plugin:react/recommended",
"plugin:cypress/recommended",
"plugin:@typescript-eslint/recommended",
],
parser: "@typescript-eslint/parser",
Expand Down Expand Up @@ -43,8 +42,7 @@ module.exports = {
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
},
plugins: ["cypress", "@typescript-eslint", "react-hooks", "unused-imports"],
env: { "cypress/globals": true },
plugins: ["@typescript-eslint", "react-hooks", "unused-imports"],
settings: {
react: {
pragma: "React",
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: "Shared Master Workflow"

on:
push:
branches: ["master", "development"]
pull_request:
branches: [ "master", "development" ]
workflow_dispatch:
push:
branches: ["master", "development"]
pull_request:

workflow_dispatch:

jobs:
master-workflow:
uses: EyeSeeTea/github-workflows/.github/workflows/master.yml@master
master-workflow:
uses: EyeSeeTea/github-workflows/.github/workflows/master.yml@master
11 changes: 7 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,16 @@ src/locales/
src/react-app.d.ts
src/react-app-env.d.ts

# cypress
cypress/screenshots/
cypress/videos/

# IntelliJ
.idea/*

# Custom
bak
dist

# Yarn 4
.yarn/cache
.yarn/install-state.gz
.yarn/unplugged
.yarn/build-state.yml
.pnp.*
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.14.0
v22.22.0
41 changes: 0 additions & 41 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
67 changes: 48 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,61 @@
## Setup

```
$ nvm use # uses node version in .nvmrc
$ yarn install
```

This project uses **Yarn 4** managed by **Corepack** and declares:

```json
"packageManager": "yarn@4.12.0"
```

### If you have Yarn 1 globally and see a packageManager error

If running `yarn` shows an error like:

> This project's package.json defines "packageManager": "yarn@4.12.0". However the current global version of Yarn is 1.22.x.

do the following once on your machine:

```bash
# 1) Remove global Yarn (optional but recommended)
npm uninstall -g yarn

# 2) Enable Corepack (shipped with Node 16.9+ / 14.19+)
corepack enable

# 3) Set Yarn 1.x as the default for projects WITHOUT packageManager
corepack prepare yarn@1.22.22 --activate
```

Then, in this project (normal case, once Corepack is enabled):

```bash
nvm use # use the version from .nvmrc
yarn install
```

If for some reason `yarn --version` still shows `1.x` inside this repo (for example due to old Corepack state), prepare the Yarn 4 binary without changing the global default or `package.json`:

```bash
COREPACK_ENABLE_AUTO_PIN=0 corepack prepare yarn@4.12.0
yarn --version # should now print 4.12.0
yarn install
```

After this:

- This repo will use **Yarn 4.12.0**.
- Other repos without `packageManager` will keep using **Yarn 1.22.22** (or whatever you activated with `corepack prepare`).

## Development

Start development server:

```
$ PORT=8082 REACT_APP_DHIS2_BASE_URL="https://play.dhis2.org/dev" yarn start
$ VITE_PORT=8082 VITE_DHIS2_BASE_URL="https://play.dhis2.org/dev" yarn start
```

Linting:
Expand All @@ -26,22 +72,6 @@ Run unit tests:
$ yarn test
```

Run integration tests locally:

```
$ export CYPRESS_DHIS2_AUTH='admin:district'
$ export CYPRESS_EXTERNAL_API="http://localhost:8080"
$ export CYPRESS_ROOT_URL=http://localhost:8081

# non-interactive
$ yarn cy:e2e:run

# interactive UI
$ yarn cy:e2e:open
```

For this to work in Travis CI, you will have to create an environment variable CYPRESS_DHIS2_AUTH (Settings -> Environment Variables) with the password used in your testing DHIS2 instance.

## Build app ZIP

```
Expand All @@ -60,7 +90,6 @@ $ yarn build-webapp
- `src/types`: `.d.ts` file types for modules without TS definitions.
- `src/utils`: Misc utilities.
- `src/locales`: Auto-generated, don't change nor add to version control.
- `cypress/integration/`: Contains the integration Cypress tests.

### i18n

Expand All @@ -85,7 +114,7 @@ const SomeComponent: React.FunctionComponent = () => {

### App logo

Add `REACT_APP_LOGO_PATH` to change the path from where the app is loading the logo image on Homepage. Since the root path is `public`, the variable value must be preceded by `img/`. By default, if the value is left blank, WHO logo will show up.
Add `VITE_LOGO_PATH` to change the path from where the app is loading the logo image on Homepage. Since the root path is `public`, the variable value must be preceded by `img/`. By default, if the value is left blank, WHO logo will show up.

### Build as a library

Expand Down
30 changes: 0 additions & 30 deletions craco.config.js

This file was deleted.

4 changes: 0 additions & 4 deletions cypress.json

This file was deleted.

5 changes: 0 additions & 5 deletions cypress/fixtures/example.json

This file was deleted.

18 changes: 0 additions & 18 deletions cypress/integration/example-page.spec.js

This file was deleted.

23 changes: 0 additions & 23 deletions cypress/plugins/index.js

This file was deleted.

Loading
Loading