Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: dhis2/ui
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v5.5.5
Choose a base ref
...
head repository: dhis2/ui
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing 3,551 changed files with 136,571 additions and 56,669 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
10 changes: 10 additions & 0 deletions .cypress-cucumber-preprocessorrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"nonGlobalStepDefinitions": true,
"e2e": {
"stepDefinitions": [
"[filepath]/*.{js,mjs,ts,tsx}",
"[filepath]/../common/index.{js,mjs,ts,tsx}",
"cypress/e2e/common.js"
]
}
}
25 changes: 0 additions & 25 deletions .dependabot/config.yml

This file was deleted.

6 changes: 4 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
**/cypress/assets
**/src/locales/*
.yarn/
utilities/icons/src/react/**/*.js
**/locales/
*.d.ts
59 changes: 56 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,62 @@
const { config } = require('@dhis2/cli-style')
const cliStyle = require('@dhis2/cli-style')

module.exports = {
extends: [config.eslintReact],
const config = {
extends: [cliStyle.config.eslintReact],
globals: {
cy: 'readonly',
Cypress: 'readonly',
},
rules: {
'import/no-webpack-loader-syntax': 'error',
'import/no-useless-path-segments': 'error',
'react/no-unknown-property': ['error', { ignore: ['jsx', 'global'] }],
},
overrides: [
{
files: ['*.stories.js', '*.stories.e2e.js', '**/__stories__/*.js'],
rules: {
'import/no-extraneous-dependencies': 'off',
'react/display-name': 'off',
'react/prop-types': 'off',
},
},
{
files: [
'components/*/src/**/*.js',
'collections/*/src/**/*.js',
'utilities/*/src/**/*.js',
],
excludedFiles: [
'**/features/**/*.js',
'**/__tests__/**/*.js',
'*.test.js',
'*.stories*.js',
'**/__stories__/*.js',
'**/__stories__/**/*.js',
'*.d.ts',
],
rules: {
'import/no-extraneous-dependencies': 'error',
},
},
],
}

// Run cpu intensive checks only on CI
const isCI = !!process.env.CI

if (isCI) {
if (!config.rules) {
config.rules = {}
}

config.rules['import/no-cycle'] = 'error'
config.rules['import/no-self-import'] = 'error'

// for newer versions of import plugin
//config.rules['import/no-internal-modules'] = 'error'
//config.rules['import/no-relative-parent-imports'] = 'error'
//config.rules['import/no-relative-packages'] = 'error'
}

module.exports = config
2 changes: 0 additions & 2 deletions .github/CODEOWNERS

This file was deleted.

16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2
updates:
- package-ecosystem: npm
directory: '/'
schedule:
interval: daily
open-pull-requests-limit: 10
target-branch: master
versioning-strategy: increase
ignore:
- dependency-name: react
versions:
- '>=16.9.x'
- dependency-name: react-dom
versions:
- '>=16.9.x'
29 changes: 29 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Implements [JIRA_ISSUE_ID](https://dhis2.atlassian.net/browse/JIRA_ISSUE_ID)

---

### Description

_text_

---

### Known issues

- [ ] _issue_

---

### Checklist

- [ ] API docs are generated
- [ ] Tests were added
- [ ] Storybook demos were added

_All points above should be relevant for feature PRs. For bugfixes, some points might not be relevant. In that case, just check them anyway to signal the work is done._

---

### Screenshots

_supporting text_
4 changes: 0 additions & 4 deletions .github/semantic.yml

This file was deleted.

13 changes: 13 additions & 0 deletions .github/workflows/comment-and-close.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
on:
issues:
types: [opened]

jobs:
comment-and-close:
runs-on: ubuntu-latest
steps:
- uses: vardevs/candc@v1
with:
close-comment: 'If you would like to file a bug report or feature request, please refer to our issue tracker: https://jira.dhis2.org'
exempt-users: dhis2-bot
github-token: ${{secrets.DHIS2_BOT_GITHUB_TOKEN}}
35 changes: 0 additions & 35 deletions .github/workflows/cypress.yml

This file was deleted.

52 changes: 52 additions & 0 deletions .github/workflows/dhis2-deploy-netlify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: 'dhis2: deploy (netlify)'

# Requirements:
#
# - Org secrets:
# DHIS2_BOT_NETLIFY_TOKEN
# DHIS2_BOT_GITHUB_TOKEN
# - Repo secrets:
# NETLIFY_SITE_ID
# - Customize the 'jobs.build.steps.netlify-deploy.publish-dir' property

on:
push:
branches:
- master
paths:
- '_redirects' # only rebuild and deploy when redirects file changes

concurrency:
group: ${{ github.workflow}}-${{ github.ref }}
cancel-in-progress: true

jobs:
deploy:
runs-on: ubuntu-latest
if: "!github.event.push.repository.fork && github.actor != 'dependabot[bot]'"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 20.x

# We use Netlify only for deploy previews, production docs are hosted at developers.dhis2.org
# Don't build anything, just copy the _redirects file into the dist directory

- run: |
mkdir dist
cp _redirects dist/_redirects
- uses: nwtgck/actions-netlify@v1.1
with:
production-branch: 'master'
production-deploy: true
github-token: ${{ secrets.DHIS2_BOT_GITHUB_TOKEN }}
deploy-message: 'Deploy documentation site from GitHub Actions'
enable-pull-request-comment: false
enable-commit-comment: false
enable-commit-status: false
publish-dir: 'dist'
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.DHIS2_BOT_NETLIFY_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
53 changes: 53 additions & 0 deletions .github/workflows/dhis2-preview-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: 'dhis2: pr preview'

# Requirements:
#
# - Org secrets:
# DHIS2_BOT_NETLIFY_TOKEN
# DHIS2_BOT_GITHUB_TOKEN
# - Repo secrets:
# NETLIFY_SITE_ID
# - Customize the 'jobs.build.steps.netlify-deploy.publish-dir' property

on:
pull_request:

concurrency:
group: ${{ github.workflow}}-${{ github.ref }}
cancel-in-progress: true

jobs:
preview:
runs-on: ubuntu-latest
if: "!github.event.push.repository.fork && github.actor != 'dependabot[bot]'"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 20.x

- uses: c-hive/gha-yarn-cache@v1
- run: yarn install --frozen-lockfile

- run: yarn build

- name: Deploy
id: netlify-deploy
uses: nwtgck/actions-netlify@v1.2.2
timeout-minutes: 1
with:
github-token: ${{ secrets.DHIS2_BOT_GITHUB_TOKEN }}
github-deployment-environment: 'netlify'
github-deployment-description: 'PR Preview on Netlify'
deploy-message: ${{ github.event.pull_request.title }}
enable-pull-request-comment: true
enable-commit-comment: true
enable-commit-status: true
alias: pr-${{ github.event.number }}
# customize according to project needs
publish-dir: 'dist'
env:
# org secret
NETLIFY_AUTH_TOKEN: ${{ secrets.DHIS2_BOT_NETLIFY_TOKEN }}
# repo secret
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
38 changes: 38 additions & 0 deletions .github/workflows/dhis2-verify-commits.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: 'dhis2: verify (commits)'

on:
pull_request:
types: ['opened', 'edited', 'reopened', 'synchronize']

jobs:
lint-pr-title:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 20.x
- uses: c-hive/gha-yarn-cache@v1
- run: yarn install --frozen-lockfile
- id: commitlint
run: echo ::set-output name=config_path::$(node -e "process.stdout.write(require('@dhis2/cli-style').config.commitlint)")
- uses: JulienKode/pull-request-name-linter-action@v0.5.0
with:
configuration-path: ${{ steps.commitlint.outputs.config_path }}

lint-commits:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v1
with:
node-version: 20.x
- uses: c-hive/gha-yarn-cache@v1
- run: yarn install --frozen-lockfile
- id: commitlint
run: echo ::set-output name=config_path::$(node -e "process.stdout.write(require('@dhis2/cli-style').config.commitlint)")
- uses: wagoid/commitlint-github-action@v5
with:
configFile: ${{ steps.commitlint.outputs.config_path }}
Loading