Skip to content

Commit

Permalink
Merge pull request #650 from dhis2/alpha-beta
Browse files Browse the repository at this point in the history
chore: bring beta and alpha up-to-date with master, and merge alpha into beta
  • Loading branch information
varl authored Sep 8, 2021
2 parents b4a5c9c + a3acfe9 commit 10b0dd2
Show file tree
Hide file tree
Showing 62 changed files with 17,943 additions and 1,305 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/dhis2-deploy-netlify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
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

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: 12.x

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

- run: yarn docs:build

- uses: nwtgck/[email protected]
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 }}
73 changes: 25 additions & 48 deletions .github/workflows/dhis2-verify-lib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,52 +2,29 @@ name: 'dhis2: verify (lib)'

on: push

concurrency:
group: ${{ github.workflow}}-${{ github.ref }}

env:
GIT_AUTHOR_NAME: '@dhis2-bot'
GIT_AUTHOR_EMAIL: '[email protected]'
GIT_COMMITTER_NAME: '@dhis2-bot'
GIT_COMMITTER_EMAIL: '[email protected]'
NPM_TOKEN: ${{secrets.DHIS2_BOT_NPM_TOKEN}}
GH_TOKEN: ${{secrets.DHIS2_BOT_GITHUB_TOKEN}}
CI: true
D2_VERBOSE: true

jobs:
install:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12.x

- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: '**/node_modules'
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}

- name: Install
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile

build:
runs-on: ubuntu-latest
needs: install
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12.x

- uses: actions/cache@v2
id: yarn-cache
with:
path: '**/node_modules'
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
- uses: c-hive/gha-yarn-cache@v1
- run: yarn install --frozen-lockfile

- name: Build
run: yarn build
Expand All @@ -62,49 +39,42 @@ jobs:

lint:
runs-on: ubuntu-latest
needs: [install]
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12.x

- uses: actions/cache@v2
id: yarn-cache
with:
path: '**/node_modules'
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
- uses: c-hive/gha-yarn-cache@v1
- run: yarn install --frozen-lockfile

- name: Build
run: yarn build
- run: yarn build

- name: Lint
run: yarn lint
- run: yarn lint

test:
runs-on: ubuntu-latest
needs: [install]
if: "!contains(github.event.head_commit.message, '[skip ci]')"
needs: [build]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12.x

- uses: actions/cache@v2
id: yarn-cache
- uses: actions/download-artifact@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
name: lib-build

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

- name: Test
run: yarn test

publish:
runs-on: ubuntu-latest
needs: [build, lint, test]
if: "!contains(github.event.head_commit.message, '[skip ci]')"
if: "!github.event.push.repository.fork && github.actor != 'dependabot[bot]'"
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -117,5 +87,12 @@ jobs:
with:
name: lib-build

- name: Publish to NPM
run: npx @dhis2/cli-utils release --publish npm
- uses: c-hive/gha-yarn-cache@v1
- run: yarn install --frozen-lockfile

- uses: dhis2/action-semantic-release@master
with:
publish-npm: true
publish-github: true
github-token: ${{ env.GH_TOKEN }}
npm-token: ${{ env.NPM_TOKEN }}
59 changes: 49 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,70 @@
# [8.0.0-beta.3](https://github.com/dhis2/app-platform/compare/v8.0.0-beta.2...v8.0.0-beta.3) (2021-08-30)
## [7.6.4](https://github.com/dhis2/app-platform/compare/v7.6.3...v7.6.4) (2021-09-08)


### Bug Fixes

* **cli:** set test environment to node ([#625](https://github.com/dhis2/app-platform/issues/625)) ([36d311b](https://github.com/dhis2/app-platform/commit/36d311b4aca74535d551d300a509117a1cb95179))
* **recording-mode:** handle fulfilled requests after recording error ([#642](https://github.com/dhis2/app-platform/issues/642)) ([928e2cb](https://github.com/dhis2/app-platform/commit/928e2cb4882bf8a79d4f560cc89487d36235cd50))

# [8.0.0-beta.2](https://github.com/dhis2/app-platform/compare/v8.0.0-beta.1...v8.0.0-beta.2) (2021-08-30)
## [7.6.3](https://github.com/dhis2/app-platform/compare/v7.6.2...v7.6.3) (2021-09-07)


### Bug Fixes

* set jsdom as default test environment ([#624](https://github.com/dhis2/app-platform/issues/624)) ([2f1ba42](https://github.com/dhis2/app-platform/commit/2f1ba4228a7a9a6f95a44258e615ba73461537bc))
* **offline-interface:** prevent infinite update loop in Chrome ([#638](https://github.com/dhis2/app-platform/issues/638)) ([079f6ea](https://github.com/dhis2/app-platform/commit/079f6ea382fa4fd29ee72a9cd526a282f591837b))

# [8.0.0-beta.1](https://github.com/dhis2/app-platform/compare/v7.5.1-beta.1...v8.0.0-beta.1) (2021-08-26)
## [7.6.2](https://github.com/dhis2/app-platform/compare/v7.6.1...v7.6.2) (2021-09-02)


### Bug Fixes

* import index.css in index.js so styles are applied ([8db1bf8](https://github.com/dhis2/app-platform/commit/8db1bf8f234e808a5299474df3f1dc6998feac44))

## [7.6.1](https://github.com/dhis2/app-platform/compare/v7.6.0...v7.6.1) (2021-09-02)


### Bug Fixes

* **shell:** create new stacking context for roots ([324a095](https://github.com/dhis2/app-platform/commit/324a0958ae436e75cb1b252263dfafbd1447097f))

# [7.6.0](https://github.com/dhis2/app-platform/compare/v7.5.1...v7.6.0) (2021-08-31)


### Bug Fixes

* catch errors in completeRecording ([e67ae82](https://github.com/dhis2/app-platform/commit/e67ae821b33990435f3846f3ce933362105520bb))
* check whole URL against filter patterns ([5468114](https://github.com/dhis2/app-platform/commit/5468114e8631610d4e70f6c54a288a62cc7f28c2))
* only return sections with cached data from getCachedSections ([f6242d1](https://github.com/dhis2/app-platform/commit/f6242d1b6b25268f3a0c441060264d584d023afe))
* reopen indexedDB if global state resets ([0aded68](https://github.com/dhis2/app-platform/commit/0aded6846b1f9abc567e44144006cb516516e8b3))
* return true if either cache or idb entry is removed ([43d8001](https://github.com/dhis2/app-platform/commit/43d8001ab2aa6077bb0dc3fbaecb2228399a26e4))
* simplify message payload to be compatible with firefox ([5e5a633](https://github.com/dhis2/app-platform/commit/5e5a633440e1b103669dae3d0b1e8786cde9f96b))


### Features

* bump jest to v27 ([f5015b2](https://github.com/dhis2/app-platform/commit/f5015b2186978a08a2315474de9317423fde9b90))
* add service worker and pwa capabilities ([#550](https://github.com/dhis2/app-platform/issues/550)) ([225069e](https://github.com/dhis2/app-platform/commit/225069e11d924734c5ac2e257af7d5e9185c612a)), closes [#580](https://github.com/dhis2/app-platform/issues/580) [#582](https://github.com/dhis2/app-platform/issues/582) [#592](https://github.com/dhis2/app-platform/issues/592)
* allow RegEx for filter patterns in d2.config.js ([9699330](https://github.com/dhis2/app-platform/commit/96993301f1d3ba4eec719bd2ecf93b72995653ba))
* use new headerbar with online status indicator ([#626](https://github.com/dhis2/app-platform/issues/626)) ([3bd7d37](https://github.com/dhis2/app-platform/commit/3bd7d37d0776dfd44ab583a95ad47734c1302f84))

# [7.6.0-alpha.1](https://github.com/dhis2/app-platform/compare/v7.5.1...v7.6.0-alpha.1) (2021-08-31)

### BREAKING CHANGES

* Upgrade Jest to 27.x.
Please see for a list of changes: https://jestjs.io/blog/2021/05/25/jest-27
### Bug Fixes

* catch errors in completeRecording ([e67ae82](https://github.com/dhis2/app-platform/commit/e67ae821b33990435f3846f3ce933362105520bb))
* check whole URL against filter patterns ([5468114](https://github.com/dhis2/app-platform/commit/5468114e8631610d4e70f6c54a288a62cc7f28c2))
* only return sections with cached data from getCachedSections ([f6242d1](https://github.com/dhis2/app-platform/commit/f6242d1b6b25268f3a0c441060264d584d023afe))
* reopen indexedDB if global state resets ([0aded68](https://github.com/dhis2/app-platform/commit/0aded6846b1f9abc567e44144006cb516516e8b3))
* return true if either cache or idb entry is removed ([43d8001](https://github.com/dhis2/app-platform/commit/43d8001ab2aa6077bb0dc3fbaecb2228399a26e4))
* simplify message payload to be compatible with firefox ([5e5a633](https://github.com/dhis2/app-platform/commit/5e5a633440e1b103669dae3d0b1e8786cde9f96b))


### Features

* add service worker and pwa capabilities ([#550](https://github.com/dhis2/app-platform/issues/550)) ([225069e](https://github.com/dhis2/app-platform/commit/225069e11d924734c5ac2e257af7d5e9185c612a)), closes [#580](https://github.com/dhis2/app-platform/issues/580) [#582](https://github.com/dhis2/app-platform/issues/582) [#592](https://github.com/dhis2/app-platform/issues/592)
* allow RegEx for filter patterns in d2.config.js ([9699330](https://github.com/dhis2/app-platform/commit/96993301f1d3ba4eec719bd2ecf93b72995653ba))
* use new headerbar with online status indicator ([#626](https://github.com/dhis2/app-platform/issues/626)) ([3bd7d37](https://github.com/dhis2/app-platform/commit/3bd7d37d0776dfd44ab583a95ad47734c1302f84))

## [7.5.1-beta.1](https://github.com/dhis2/app-platform/compare/v7.5.0...v7.5.1-beta.1) (2021-08-25)
## [7.5.1](https://github.com/dhis2/app-platform/compare/v7.5.0...v7.5.1) (2021-08-25)


### Reverts
Expand Down
34 changes: 20 additions & 14 deletions adapter/i18n/en.pot
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,44 @@ msgstr ""
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1)\n"
"POT-Creation-Date: 2020-10-08T15:51:57.880Z\n"
"PO-Revision-Date: 2020-10-08T15:51:57.880Z\n"
"POT-Creation-Date: 2021-07-16T13:22:12.456Z\n"
"PO-Revision-Date: 2021-07-16T13:22:12.456Z\n"

msgid "An error occurred in the DHIS2 application."
msgstr ""
msgstr "An error occurred in the DHIS2 application."

msgid "Technical details copied to clipboard"
msgstr "Technical details copied to clipboard"

msgid "Something went wrong"
msgstr ""
msgstr "Something went wrong"

msgid "Refresh to try again"
msgstr ""
msgid "Try again"
msgstr "Try again"

msgid "Hide technical details"
msgstr ""
msgstr "Hide technical details"

msgid "Show technical details"
msgstr ""
msgstr "Show technical details"

msgid "The following information may be requested by technical support."
msgstr ""
msgstr "The following information may be requested by technical support."

msgid "Copy technical details to clipboard"
msgstr "Copy technical details to clipboard"

msgid "Please sign in"
msgstr ""
msgstr "Please sign in"

msgid "Server"
msgstr ""
msgstr "Server"

msgid "Username"
msgstr ""
msgstr "Username"

msgid "Password"
msgstr ""
msgstr "Password"

msgid "Sign in"
msgstr ""
msgstr "Sign in"
7 changes: 4 additions & 3 deletions adapter/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dhis2/app-adapter",
"version": "8.0.0-beta.3",
"version": "7.6.4",
"repository": {
"type": "git",
"url": "https://github.com/amcgee/dhis2-app-platform",
Expand All @@ -21,10 +21,11 @@
"build"
],
"dependencies": {
"@dhis2/pwa": "7.6.4",
"moment": "^2.24.0"
},
"devDependencies": {
"@dhis2/cli-app-scripts": "8.0.0-beta.3",
"@dhis2/cli-app-scripts": "7.6.4",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.5",
"react": "^16.8",
Expand All @@ -35,7 +36,7 @@
"test": "d2-app-scripts test"
},
"peerDependencies": {
"@dhis2/app-runtime": "^2",
"@dhis2/app-runtime": "^3",
"@dhis2/d2-i18n": "^1",
"@dhis2/ui": "^6",
"classnames": "^2",
Expand Down
7 changes: 6 additions & 1 deletion adapter/src/components/AppWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import PropTypes from 'prop-types'
import React from 'react'
import { useCurrentUserLocale } from '../utils/useLocale.js'
import { Alerts } from './Alerts.js'
import { ErrorBoundary } from './ErrorBoundary.js'
import { LoadingMask } from './LoadingMask.js'
import { styles } from './styles/AppWrapper.style.js'

Expand All @@ -17,7 +18,11 @@ export const AppWrapper = ({ appName, children }) => {
<div className="app-shell-adapter">
<style jsx>{styles}</style>
<HeaderBar appName={appName} />
<div className="app-shell-app">{children}</div>
<div className="app-shell-app">
<ErrorBoundary onRetry={() => window.location.reload()}>
{children}
</ErrorBoundary>
</div>
<Alerts />
</div>
)
Expand Down
Loading

0 comments on commit 10b0dd2

Please sign in to comment.