Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: bring beta and alpha up-to-date with master, and merge alpha into beta #650

Merged
merged 57 commits into from
Sep 8, 2021

Conversation

varl
Copy link
Contributor

@varl varl commented Sep 8, 2021

  • feat: add service worker and pwa capabilities (feat: add service worker #550)
  • chore(release): cut 7.3.0-alpha.1 [skip ci]
  • fix: catch errors in completeRecording
  • fix: check whole URL against filter patterns
  • feat: allow RegEx for filter patterns in d2.config.js
  • docs: update pwa docs for regexes
  • refactor: only create url filter pattern regexes once
  • chore(release): cut 7.3.0-alpha.2 [skip ci]
  • fix: reopen indexedDB if global state resets
  • fix: simplify message payload to be compatible with firefox
  • fix: only return sections with cached data from getCachedSections
  • fix: return true if either cache or idb entry is removed
  • chore(deps): bump app-runtime pwa version
  • chore(release): cut 7.3.0-alpha.3 [skip ci]
  • chore(release): cut 7.5.1 [skip ci]
  • feat: use new headerbar with online status indicator (feat: use new headerbar with online status indicator #626)
  • chore(release): cut 7.3.0-alpha.4 [skip ci]
  • chore(release): cut 7.6.0-alpha.1 [skip ci]
  • chore(deps): use latest app-runtime
  • chore(release): cut 7.6.0 [skip ci]
  • ci: fix broken ci process
  • ci: update workflow
  • style: update lint errors
  • ci: update dependencies between jobs
  • ci: build before lint and test
  • fix(shell): create new stacking context for roots
  • ci: use lint command
  • chore(release): cut 7.6.1 [skip ci]
  • ci: allow lint to build separately for locales
  • fix: import index.css in index.js so styles are applied
  • chore: remove styles from index.css which may have unintended effects
  • chore(release): cut 7.6.2 [skip ci]
  • ci(netlify): deploy artifact to netlify (ci(netlify): deploy artifact to netlify #636)
  • ci(netlify): remove setup command
  • fix(offline-interface): prevent infinite update loop in Chrome (fix(offline-interface): prevent infinite update loop in Chrome #638)
  • chore(release): cut 7.6.3 [skip ci]
  • docs: minor updates to PWA docs (docs: minor updates to PWA docs #639)
  • fix(recording-mode): handle fulfilled requests after recording error (fix(recording-mode): handle fulfilled requests after recording error #642)
  • chore(release): cut 7.6.4 [skip ci]
  • fix(dependencies): update app-runtime to v3
  • chore(release): cut 8.0.0-alpha.1 [skip ci]

KaiVandivier and others added 30 commits July 23, 2021 15:43
* feat: add & update files, add deps

* fix: test cache-first route for file extension

* fix: add pwa_enabled to env vars to conditionally register SW

* fix: use older syntax

* feat: filter out url patterns from d2.config when caching by default

* fix: parse url array env var

* feat: add manifest.json

* chore: add comments

* fix: use 'browser' as pwa display mode

* feat: add recording started and completed messages

* feat: generate manifest.json programatically

* refactor: generate manifests before build step to precache

* feat: use workbox-cli to precache all static assets

* fix: linting error

* fix: remove 'pwa enabled' condition for SW event listener

* feat: add omitExternalRequests option to d2.config

* refactor: tentative SWR strategy for static assets

* chore: remove chatty console log

* refactor: clean up index.js; crudely compartmentalize SW reg

* feat: add 'getRecordedSections' function in sw

* feat: tentative messaging interface implementation

* refactor: move sw content to new package

* chore: add scripts & update deps

* chore: clean up shell

* chore: fix d2 config entry point

* refactor: move manifest injection to cli package

* chore: format

* docs: add pwa docs

* chore: init new example app for PWA

* chore: export constants from sw package

* chore: rename var

* test: add first draft of cacheable section attempt

* refactor: improve test component cascading fetch

* fix: receive 'children' prop

* fix: add recording states var

* fix: handle error when idb is not set up

* fix: handle required arg errors

* fix: handle more errors

* feat: section wrapper

* chore: add todo

* chore: set up demo config & scripts

* refactor: rename message keys

* refactor: callback interface; linting

* fix: recording timeout delay

* refactor: cacheable section to avoid unnecessary rerenders

* fix: don't record requests during confirmation

* refactor: just use sectionId for cache key

* fix: try cache if network fails for *all* requests

* fix: typo

* fix: remove recording on error

* chore: remove extraneous 'clientId's in payload

* fix: handle recording errors better

* fix: clean up listeners on recording success and failure

* chore: update comment

* fix: convert cachedSections to a map

* chore: script for pwa app demo

* refactor: add 'useCachedSection' for just one section

* chore: rename to initOfflineInterface

* chore: formatting

* chore: comment and var rename

* chore: remove unused 'interface' idea

* feat: add circular loader to screen cover

* chore: comments from meeting feedback

* refactor: init function (and meeting feedback)

* refactor: offline interface into a class

* chore: add JSDoc comments

* refactor: make promptUpdate API more generic

* chore: remove debugging log

* refactor: handle SW registration in offlineInterface

* fix: call 'onUpdate' if new SW is already waiting

* refactor: use arrow function to avoid using '.bind()'

* chore: add comments

* feat: decouple useCacheableSection and <CacheableSection>

* fix: avoid side effects if pwa is not enabled

* refactor: separate components to illustrate uCS decoupling

* chore: remove unused hook

* chore: translate user-facing strings

* chore: comment

* chore: tl strings

* chore: remove comments

* feat: add alerts to cacheable section

* fix: enable unregistration when pwa is not enabled

* feat: translations and alerts in useCacheableSection

* fix: add pwa-app to main build script

* chore: update yarn.lock

* fix: dependency resolutions

* feat: use alert for feedback when removing section

* feat: handle sections update error with alert feedback

* refactor: use async try/catch in removeSection()

* chore: rename to visualizations list

* chore: a newline

* chore: demo recordingState API

* fix: generate manifests in 'start' script too to avoid error

* refactor: make pwa config cleaner and more robust

* chore: update d2 config in pwa-app

* chore: rename to generateManifests now that it generates two

* chore: remove conditional chaining

* chore: remove unnecessary var

* fix: avoid DB-opening side effect when PWA is not enabled

* feat: clear rogue service workers

* feat: tear down caches & db if PWA is not enabled

* chore: update comment

* chore: update comments

* refactor: consolidate to one provider

* chore: update serve

* refactor: use modules from local app-runtime

* chore: update demo script to update local runtime

* chore: remove unused code that has moved to runtime

* chore: add 'verbose' to demo script

* refactor: move OfflineInterface to sw package

* refactor: move offline interface and provider to app adapter

* refactor: add pwaEnabled to app config & offline provider

* chore: update script

* feat(pwa-app): use online status

* chore: move 'serve' package to pwa-app

* refactor: quieter logging

* refactor(pwa-app): provide loading mask in app

* refactor: fix listener clean-up

* feat(pwa-app): show more offline API features

* refactor(pwa-app): show debounceDelay option

* chore: package resolutions

* chore(prettier): add vscode plugin workaround

* chore(pwa-app deps): update cli scripts

* refactor(registration): better custom register/update flow

* chore: use newest cli-style

* chore: update comment

* chore(pwa-app): add comment

* chore(sw): inline comments

* chore(sw): more comments

* chore(sw): more comments

* docs(pwa): update a bit

* chore(sw): dependencies

* chore(deps): add sw to deps

* fix(deps): bump @babel/preset-env to fix build error

* refactor(registration): change update function signature

* feat(sw): use service worker in development mode (#580)

* feat(sw): use sw in dev mode (WIP)

* chore(sections-db): switch to debug

* fix: use correct env vars for dev sw

* chore: use available var

* chore(pwa-app): remove unused tl strings

* feat(adapter): smarter error boundaries (#582)

* feat(adapter): add error boundary around app

* chore(pwa-app): use --debug in build script

* feat(adapter): check for SW update and reload in err boundary

* chore: change build order in `yarn build`

* chore(deps): update yarn.lock

* refactor(offline-interface): improve error protections

* docs: add link to PWA page from sidebar [skip-ci]

* refactor: use requests size instead of list

* chore(sw): use constants for message definitions

* docs(pwa): describe development mode

* fix(cli): change short_name to config.title in manifest.json

* refactor(pwa): prefix pwa_caching env vars

* refactor(cli): delete config.pwa from d2.config.json

* chore: clarify workbox precache comment

* chore(deps): bump react scripts

* chore: rename SW for consistency in file

* refactor(sw): break into multiple files

* refactor(sw): simplify fulfilled and pending requests

* refactor(error-boundary): use button and `onRetry` prop

* chore: remove unused pwaEnabled prop

* feat: show error message in fatal error boundary and allow copying stack trace to clipboard (#592)

* chore: brackets around 'if' blocks

Co-authored-by: Médi-Rémi Hashim <[email protected]>

* chore(deps): use released app-runtime dependency

* refactor: rename sw package to 'pwa'

* refactor: use workspace resolution for pwa pkg

* chore: comment out './locales' to hopefully fix build on CI

* test: update error boundary test

* chore: clean up after alpha merge

* chore(shell): add to kssw explanation

* chore: update snapshot

* chore: update versions after merge

* chore: remove locales comment

Co-authored-by: Médi-Rémi Hashim <[email protected]>
# [7.3.0-alpha.1](v7.2.0...v7.3.0-alpha.1) (2021-07-23)

### Features

* add service worker and pwa capabilities ([#550](#550)) ([225069e](225069e)), closes [#580](#580) [#582](#582) [#592](#592)
…tern

fix: check whole URL against filter patterns
feat: allow RegEx for filter patterns in d2.config.js
# [7.3.0-alpha.2](v7.3.0-alpha.1...v7.3.0-alpha.2) (2021-08-20)

### Bug Fixes

* catch errors in completeRecording ([e67ae82](e67ae82))
* check whole URL against filter patterns ([5468114](5468114))

### Features

* allow RegEx for filter patterns in d2.config.js ([9699330](9699330))
fix: reopen indexedDB if global state resets
fix: simplify message payload to be compatible with firefox
…che-discrepancies

fix: cached section status and removal given idb and cache discrepancies
# [7.3.0-alpha.3](v7.3.0-alpha.2...v7.3.0-alpha.3) (2021-08-23)

### Bug Fixes

* only return sections with cached data from getCachedSections ([f6242d1](f6242d1))
* reopen indexedDB if global state resets ([0aded68](0aded68))
* return true if either cache or idb entry is removed ([43d8001](43d8001))
* simplify message payload to be compatible with firefox ([5e5a633](5e5a633))
## [7.5.1](v7.5.0...v7.5.1) (2021-08-25)

### Reverts

* "feat: bump jest to v27 ([#616](#616))" ([7733d14](7733d14))
* chore(deps): use latest UI

* feat: add pwaEnabled to app config for headerbar
# [7.3.0-alpha.4](v7.3.0-alpha.3...v7.3.0-alpha.4) (2021-08-30)

### Features

* use new headerbar with online status indicator ([#626](#626)) ([3bd7d37](3bd7d37))
# [7.6.0-alpha.1](v7.5.1...v7.6.0-alpha.1) (2021-08-31)

### Bug Fixes

* catch errors in completeRecording ([e67ae82](e67ae82))
* check whole URL against filter patterns ([5468114](5468114))
* only return sections with cached data from getCachedSections ([f6242d1](f6242d1))
* reopen indexedDB if global state resets ([0aded68](0aded68))
* return true if either cache or idb entry is removed ([43d8001](43d8001))
* simplify message payload to be compatible with firefox ([5e5a633](5e5a633))

### Features

* add service worker and pwa capabilities ([#550](#550)) ([225069e](225069e)), closes [#580](#580) [#582](#582) [#592](#592)
* allow RegEx for filter patterns in d2.config.js ([9699330](9699330))
* use new headerbar with online status indicator ([#626](#626)) ([3bd7d37](3bd7d37))
feat: add PWA capabilities
# [7.6.0](v7.5.1...v7.6.0) (2021-08-31)

### Bug Fixes

* catch errors in completeRecording ([e67ae82](e67ae82))
* check whole URL against filter patterns ([5468114](5468114))
* only return sections with cached data from getCachedSections ([f6242d1](f6242d1))
* reopen indexedDB if global state resets ([0aded68](0aded68))
* return true if either cache or idb entry is removed ([43d8001](43d8001))
* simplify message payload to be compatible with firefox ([5e5a633](5e5a633))

### Features

* add service worker and pwa capabilities ([#550](#550)) ([225069e](225069e)), closes [#580](#580) [#582](#582) [#592](#592)
* allow RegEx for filter patterns in d2.config.js ([9699330](9699330))
* use new headerbar with online status indicator ([#626](#626)) ([3bd7d37](3bd7d37))
varl and others added 20 commits September 2, 2021 09:08
fix: import index css file to apply global styles
## [7.6.2](v7.6.1...v7.6.2) (2021-09-02)

### Bug Fixes

* import index.css in index.js so styles are applied ([8db1bf8](8db1bf8))
## [7.6.3](v7.6.2...v7.6.3) (2021-09-07)

### Bug Fixes

* **offline-interface:** prevent infinite update loop in Chrome ([#638](#638)) ([079f6ea](079f6ea))
…642)

* chore: remove todo comment

* fix(recording-mode): return early if recording state is undefined

* fix(recording-mode): reduce unnecessary error logging
## [7.6.4](v7.6.3...v7.6.4) (2021-09-08)

### Bug Fixes

* **recording-mode:** handle fulfilled requests after recording error ([#642](#642)) ([928e2cb](928e2cb))
BREAKING CHANGE: This updates the app-platform to version 3 of the
app-runtime. That means that this version of the app-platform will only
work with apps that use version 3 of the app-runtime.
fix(dependencies): update app-runtime to v3
# [8.0.0-alpha.1](v7.6.2...v8.0.0-alpha.1) (2021-09-08)

### Bug Fixes

* **dependencies:** update app-runtime to v3 ([8777699](8777699))

### BREAKING CHANGES

* **dependencies:** This updates the app-platform to version 3 of the
app-runtime. That means that this version of the app-platform will only
work with apps that use version 3 of the app-runtime.
@varl
Copy link
Contributor Author

varl commented Sep 8, 2021

Closes #645
Closes #646
Closes #647

@varl varl changed the title alpha beta chore: bring beta and alpha up-to-date with master, and merge alpha into beta Sep 8, 2021
@ghost ghost self-requested a review September 8, 2021 13:25
@varl varl merged commit 10b0dd2 into beta Sep 8, 2021
@varl varl deleted the alpha-beta branch September 8, 2021 13:28
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 8.0.0-beta.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 8.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants