@planningcenter/topbar 8.2.0-rc.0 → 8.2.0-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -4
- package/README.md +20 -4
- package/dist/topbar.js +1 -1
- package/dist/topbar.js.map +1 -1
- package/dist/topbar.modern.js +1 -1
- package/dist/topbar.modern.js.map +1 -1
- package/dist/topbar.module.js +1 -1
- package/dist/topbar.module.js.map +1 -1
- package/dist/topbar.umd.js +1 -1
- package/dist/topbar.umd.js.map +1 -1
- package/dist/types/modules/hooks/use_notifications.d.ts +2 -1
- package/dist/types/modules/hooks/use_notifications.d.ts.map +1 -1
- package/dist/types/modules/not_small_topbar.d.ts.map +1 -1
- package/dist/types/modules/small_topbar.d.ts.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,13 +5,29 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
-
## [8.
|
|
8
|
+
## [8.2.0] - 2021-05-11
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Make whether Jolt sends its logs to console configurable (`enableJoltLogging` prop) and default to `false`
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- Add more info regarding troubleshooting `yalc` issues to the README
|
|
17
|
+
- Send a `fetchAuthTokenFn` to `jolt-client` instead of `authToken`. Over time, the auth token can get stale. Sending a function instead of a value allows the client to refresh itself when required.
|
|
18
|
+
- Instead of fetching the WSS URLs for authorization from an api endpoint, hard-code them instead. After the change adding `fetchAuthTokenFn`, this change reduces required API calls by 1.
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- fix: hook into `pco-page-expired` to `disconnect` jolt instance when session is changed
|
|
23
|
+
|
|
24
|
+
## [8.1.1] - 2022-04-11
|
|
9
25
|
|
|
10
26
|
### Changed
|
|
11
27
|
|
|
12
28
|
- fix: don't send a `timeZone` key to `@churchcenter/datetime-fmt` if it doesn't have a value
|
|
13
29
|
|
|
14
|
-
## [8.1.0] -
|
|
30
|
+
## [8.1.0] - 2022-04-11
|
|
15
31
|
|
|
16
32
|
### Changed
|
|
17
33
|
|
|
@@ -22,14 +38,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
22
38
|
- Fix dark mode text styles in notifications inbox
|
|
23
39
|
- Fix notification date timezone not displaying in the org's time zone
|
|
24
40
|
|
|
25
|
-
## [8.0.1] -
|
|
41
|
+
## [8.0.1] - 2022-03-29
|
|
26
42
|
|
|
27
43
|
### Changed
|
|
28
44
|
|
|
29
45
|
- Correct the capitalization of "Check-Ins" in order to set the correct color for notifications
|
|
30
46
|
- Bring back the `notifications` prop for topbars so that if notifications are not enabled, it will render the `notifications` prop instead
|
|
31
47
|
|
|
32
|
-
## [8.0.0] -
|
|
48
|
+
## [8.0.0] - 2022-03-24
|
|
33
49
|
|
|
34
50
|
### Added
|
|
35
51
|
|
package/README.md
CHANGED
|
@@ -34,6 +34,11 @@ If a Jolt connection is not shared with topbar, it will gladly initiate its own
|
|
|
34
34
|
To reuse your app's Jolt connection, topbar requires a Promise that resolves into a [Jolt client](https://github.com/ministrycentered/jolt-client/) connection.
|
|
35
35
|
If nothing is passed—or if a Promise is passed that resolves to `undefined` or `void`—topbar will initiate its own connection.
|
|
36
36
|
|
|
37
|
+
Topbar hooks into `pco-page-expired` and will `disconnect` when the session is invalidated (i.e. logged out in a different tab).
|
|
38
|
+
This occurs for `topbar`-created jolt instances as well as jolt instances provided to `topbar` via the `joltPromise` prop.
|
|
39
|
+
CSRF tokens are invalidated when the session is invalidated.
|
|
40
|
+
Non-GET APIv2 requests (i.e. auth/subscribe) require a valid CSRF token and will never succeed in that state.
|
|
41
|
+
|
|
37
42
|
#### Example
|
|
38
43
|
|
|
39
44
|
As an example, we'll use what Services has done for the v7.3 alpha.
|
|
@@ -52,14 +57,12 @@ As a layout partial, they attach two Jolt-related things to `window`:
|
|
|
52
57
|
In their Topbar implementation component, they then create the function that provides topbar the required Promise...
|
|
53
58
|
|
|
54
59
|
```jsx
|
|
55
|
-
const waitForWindowJolt = async () =>
|
|
56
|
-
|
|
57
|
-
return listener.then((listener) => {
|
|
60
|
+
const waitForWindowJolt = async () =>
|
|
61
|
+
window.joltListenerPromise.then(listener => {
|
|
58
62
|
if (listener && listener.jolt) {
|
|
59
63
|
return listener.jolt
|
|
60
64
|
}
|
|
61
65
|
})
|
|
62
|
-
}
|
|
63
66
|
```
|
|
64
67
|
|
|
65
68
|
...and passes that function in for the `JoltPromise` prop to topbar.
|
|
@@ -98,6 +101,19 @@ When you make `topbar` changes, run `yalc publish --push` to update your product
|
|
|
98
101
|
|
|
99
102
|
When you're done, in your product directory run `yalc remove @planningcenter/topbar`.
|
|
100
103
|
|
|
104
|
+
If you are not seeing published updates after running `yalc publish --push` or things break in your app after running `yalc remove @planningcenter/topbar` then in your product you will want to be running `bin/webpack-dev-server`.
|
|
105
|
+
From experience, we have seen that the People app will automatically reload while running `bin/webpack-dev-server`.
|
|
106
|
+
Unfortunately, in the Services app we have had to restart `bin/webpack-dev-server` every time for a change to come in.
|
|
107
|
+
This may change depending on what app you're adding your yalc changes to.
|
|
108
|
+
|
|
109
|
+
### Debugging Jolt
|
|
110
|
+
|
|
111
|
+
The `jolt-client` library has the ability to log debug information to the console.
|
|
112
|
+
This functionality is configured when creating a client and is disabled by default.
|
|
113
|
+
If you are passing your own Jolt client object into Topbar via props, you can configure it as required before providing it to Topbar.
|
|
114
|
+
If you are relying on Topbar to create its own Jolt connection and would like to enable logging, pass `enableJoltLogging={true}` as a prop to whichever topbar
|
|
115
|
+
you are using (`SmallTopbar`/`NotSmallTopbar`).
|
|
116
|
+
|
|
101
117
|
## Migrate
|
|
102
118
|
|
|
103
119
|
These migration docs will guide you thru the process of updating to recent major releases.
|