Skip to content

Commit 0ac1f80

Browse files
authored
Merge pull request #4827 from coralproject/develop
v9.10.7
2 parents 5a8a380 + 1c942e8 commit 0ac1f80

File tree

10 files changed

+52
-21
lines changed

10 files changed

+52
-21
lines changed

client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@coralproject/talk",
3-
"version": "9.10.6",
3+
"version": "9.10.7",
44
"author": "The Coral Project",
55
"homepage": "https://coralproject.net/",
66
"sideEffects": [

client/src/core/client/framework/helpers/supportedBrowsersRegExp.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
* Any manual changes will be overridden.
44
*/
55
// eslint-disable-next-line
6-
const supportedBrowsersRegExp = /((CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS)[ +]+(10[_.]0|10[_.]([1-9]|\d{2,})|10[_.]2|10[_.]([3-9]|\d{2,})|(1[1-9]|[2-9]\d|\d{3,})[_.]\d+|11[_.]0|11[_.]([1-9]|\d{2,})|11[_.]2|11[_.]([3-9]|\d{2,})|(1[2-9]|[2-9]\d|\d{3,})[_.]\d+|12[_.]0|12[_.]([1-9]|\d{2,})|12[_.]5|12[_.]([6-9]|\d{2,})|(1[3-9]|[2-9]\d|\d{3,})[_.]\d+|13[_.]0|13[_.]([1-9]|\d{2,})|13[_.]7|13[_.]([8-9]|\d{2,})|(1[4-9]|[2-9]\d|\d{3,})[_.]\d+|14[_.]0|14[_.]([1-9]|\d{2,})|14[_.]4|14[_.]([5-9]|\d{2,})|14[_.]8|14[_.](9|\d{2,})|(1[5-9]|[2-9]\d|\d{3,})[_.]\d+|15[_.]0|15[_.]([1-9]|\d{2,})|15[_.]8|15[_.](9|\d{2,})|(1[6-9]|[2-9]\d|\d{3,})[_.]\d+|16[_.]0|16[_.]([1-9]|\d{2,})|(1[7-9]|[2-9]\d|\d{3,})[_.]\d+|17[_.]0|17[_.]([1-9]|\d{2,})|(1[8-9]|[2-9]\d|\d{3,})[_.]\d+|18[_.]0|18[_.]([1-9]|\d{2,})|(19|[2-9]\d|\d{3,})[_.]\d+)(?:[_.]\d+)?)|(CFNetwork\/808\.(\d))|(CFNetwork\/8.* Darwin\/16\.5\.\d+)|(CFNetwork\/8.* Darwin\/16\.6\.\d+)|(CFNetwork\/8.* Darwin\/16\.7\.\d+)|(CFNetwork\/8.* Darwin\/16\.\d+)|(CFNetwork\/8.* Darwin\/17\.0\.\d+)|(CFNetwork\/8.* Darwin\/17\.2\.\d+)|(CFNetwork\/8.* Darwin\/17\.3\.\d+)|(CFNetwork\/8.* Darwin\/17\.\d+)|(Opera\/.+Opera Mobi.+Version\/(80\.0|80\.([1-9]|\d{2,})|(8[1-9]|9\d|\d{3,})\.\d+))|(Opera\/(80\.0|80\.([1-9]|\d{2,})|(8[1-9]|9\d|\d{3,})\.\d+).+Opera Mobi)|(Opera Mobi.+Opera(?:\/|\s+)(80\.0|80\.([1-9]|\d{2,})|(8[1-9]|9\d|\d{3,})\.\d+))|(SamsungBrowser\/(25\.0|25\.([1-9]|\d{2,})|(2[6-9]|[3-9]\d|\d{3,})\.\d+))|(Edge\/(79(?:\.0)?|79(?:\.([1-9]|\d{2,}))?|([8-9]\d|\d{3,})(?:\.\d+)?|83(?:\.0)?|83(?:\.([1-9]|\d{2,}))?|(8[4-9]|9\d|\d{3,})(?:\.\d+)?))|((Chromium|Chrome)\/(54\.0|54\.([1-9]|\d{2,})|(5[5-9]|[6-9]\d|\d{3,})\.\d+|83\.0|83\.([1-9]|\d{2,})|(8[4-9]|9\d|\d{3,})\.\d+)(?:\.\d+)?)|(Version\/(10\.0|10\.([1-9]|\d{2,})|(1[1-9]|[2-9]\d|\d{3,})\.\d+|11\.0|11\.([1-9]|\d{2,})|(1[2-9]|[2-9]\d|\d{3,})\.\d+|12\.0|12\.([1-9]|\d{2,})|(1[3-9]|[2-9]\d|\d{3,})\.\d+|13\.0|13\.([1-9]|\d{2,})|(1[4-9]|[2-9]\d|\d{3,})\.\d+|14\.0|14\.([1-9]|\d{2,})|(1[5-9]|[2-9]\d|\d{3,})\.\d+|15\.0|15\.([1-9]|\d{2,})|(1[6-9]|[2-9]\d|\d{3,})\.\d+|16\.0|16\.([1-9]|\d{2,})|(1[7-9]|[2-9]\d|\d{3,})\.\d+|17\.0|17\.([1-9]|\d{2,})|(1[8-9]|[2-9]\d|\d{3,})\.\d+|18\.0|18\.([1-9]|\d{2,})|(19|[2-9]\d|\d{3,})\.\d+)(?:\.\d+)? Safari\/)|(Trident\/7\.0)|(Firefox\/(63\.0|63\.([1-9]|\d{2,})|(6[4-9]|[7-9]\d|\d{3,})\.\d+)\.\d+)|(Firefox\/(63\.0|63\.([1-9]|\d{2,})|(6[4-9]|[7-9]\d|\d{3,})\.\d+)(pre|[ab]\d+[a-z]*)?)|(([MS]?IE) (11\.0|11\.([1-9]|\d{2,})|(1[2-9]|[2-9]\d|\d{3,})\.\d+))/;
6+
const supportedBrowsersRegExp = /((CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS)[ +]+(10[_.]0|10[_.]([1-9]|\d{2,})|10[_.]2|10[_.]([3-9]|\d{2,})|(1[1-9]|[2-9]\d|\d{3,})[_.]\d+|11[_.]0|11[_.]([1-9]|\d{2,})|11[_.]2|11[_.]([3-9]|\d{2,})|(1[2-9]|[2-9]\d|\d{3,})[_.]\d+|12[_.]0|12[_.]([1-9]|\d{2,})|12[_.]5|12[_.]([6-9]|\d{2,})|(1[3-9]|[2-9]\d|\d{3,})[_.]\d+|13[_.]0|13[_.]([1-9]|\d{2,})|13[_.]7|13[_.]([8-9]|\d{2,})|(1[4-9]|[2-9]\d|\d{3,})[_.]\d+|14[_.]0|14[_.]([1-9]|\d{2,})|14[_.]4|14[_.]([5-9]|\d{2,})|14[_.]8|14[_.](9|\d{2,})|(1[5-9]|[2-9]\d|\d{3,})[_.]\d+|15[_.]0|15[_.]([1-9]|\d{2,})|(1[6-9]|[2-9]\d|\d{3,})[_.]\d+)(?:[_.]\d+)?)|(CFNetwork\/808\.(\d))|(CFNetwork\/8.* Darwin\/16\.5\.\d+)|(CFNetwork\/8.* Darwin\/16\.6\.\d+)|(CFNetwork\/8.* Darwin\/16\.7\.\d+)|(CFNetwork\/8.* Darwin\/16\.\d+)|(CFNetwork\/8.* Darwin\/17\.0\.\d+)|(CFNetwork\/8.* Darwin\/17\.2\.\d+)|(CFNetwork\/8.* Darwin\/17\.3\.\d+)|(CFNetwork\/8.* Darwin\/17\.\d+)|(Opera\/.+Opera Mobi.+Version\/(64\.0|64\.([1-9]|\d{2,})|(6[5-9]|[7-9]\d|\d{3,})\.\d+))|(Opera\/(64\.0|64\.([1-9]|\d{2,})|(6[5-9]|[7-9]\d|\d{3,})\.\d+).+Opera Mobi)|(Opera Mobi.+Opera(?:\/|\s+)(64\.0|64\.([1-9]|\d{2,})|(6[5-9]|[7-9]\d|\d{3,})\.\d+))|(SamsungBrowser\/(12\.0|12\.([1-9]|\d{2,})|(1[3-9]|[2-9]\d|\d{3,})\.\d+))|(Edge\/(79(?:\.0)?|79(?:\.([1-9]|\d{2,}))?|([8-9]\d|\d{3,})(?:\.\d+)?|83(?:\.0)?|83(?:\.([1-9]|\d{2,}))?|(8[4-9]|9\d|\d{3,})(?:\.\d+)?))|((Chromium|Chrome)\/(54\.0|54\.([1-9]|\d{2,})|(5[5-9]|[6-9]\d|\d{3,})\.\d+|83\.0|83\.([1-9]|\d{2,})|(8[4-9]|9\d|\d{3,})\.\d+)(?:\.\d+)?)|(Version\/(10\.0|10\.([1-9]|\d{2,})|(1[1-9]|[2-9]\d|\d{3,})\.\d+|11\.0|11\.([1-9]|\d{2,})|(1[2-9]|[2-9]\d|\d{3,})\.\d+|12\.0|12\.([1-9]|\d{2,})|(1[3-9]|[2-9]\d|\d{3,})\.\d+|13\.0|13\.([1-9]|\d{2,})|(1[4-9]|[2-9]\d|\d{3,})\.\d+|14\.0|14\.([1-9]|\d{2,})|(1[5-9]|[2-9]\d|\d{3,})\.\d+|15\.0|15\.([1-9]|\d{2,})|(1[6-9]|[2-9]\d|\d{3,})\.\d+)(?:\.\d+)? Safari\/)|(Trident\/7\.0)|(Firefox\/(63\.0|63\.([1-9]|\d{2,})|(6[4-9]|[7-9]\d|\d{3,})\.\d+)\.\d+)|(Firefox\/(63\.0|63\.([1-9]|\d{2,})|(6[4-9]|[7-9]\d|\d{3,})\.\d+)(pre|[ab]\d+[a-z]*)?)|(([MS]?IE) (11\.0|11\.([1-9]|\d{2,})|(1[2-9]|[2-9]\d|\d{3,})\.\d+))/;
77
export default supportedBrowsersRegExp;

client/src/core/client/stream/App/TabBarContainer.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ export const TabBarContainer: FunctionComponent<Props> = ({
8383
<>
8484
{!!viewer &&
8585
!!settings?.inPageNotifications?.enabled &&
86-
!!settings?.inPageNotifications?.floatingBellIndicator && (
86+
!!settings?.inPageNotifications?.floatingBellIndicator &&
87+
!!settings?.inPageNotifications?.active && (
8788
<FloatingNotificationButton
8889
viewerID={viewer?.id}
8990
enabled={!!viewer?.inPageNotifications?.enabled}
@@ -97,7 +98,9 @@ export const TabBarContainer: FunctionComponent<Props> = ({
9798
showDiscussionsTab={showDiscussionsTab}
9899
showConfigureTab={showConfigureTab}
99100
showNotificationsTab={
100-
!!viewer && !!settings?.inPageNotifications?.enabled
101+
!!viewer &&
102+
!!settings?.inPageNotifications?.enabled &&
103+
!!settings?.inPageNotifications?.active
101104
}
102105
hasNewNotifications={!!hasNewNotifications}
103106
userNotificationsEnabled={!!viewer?.inPageNotifications?.enabled}
@@ -135,6 +138,7 @@ const enhanced = withSetActiveTabMutation(
135138
inPageNotifications {
136139
enabled
137140
floatingBellIndicator
141+
active
138142
}
139143
...useLiveNotificationsPolling_settings
140144
}

client/src/core/client/stream/common/KeyboardShortcuts/KeyboardShortcuts.tsx

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ interface Props {
8484
viewNewCount: number;
8585
hasMore: boolean;
8686
userNotificationsEnabled: boolean;
87+
inPageNotificationsActive: boolean;
8788
}
8889

8990
export interface KeyboardEventData {
@@ -291,6 +292,7 @@ const KeyboardShortcuts: FunctionComponent<Props> = ({
291292
viewNewCount,
292293
hasMore,
293294
userNotificationsEnabled,
295+
inPageNotificationsActive,
294296
}) => {
295297
const {
296298
relayEnvironment,
@@ -1431,17 +1433,19 @@ const KeyboardShortcuts: FunctionComponent<Props> = ({
14311433
</Flex>
14321434
</button>
14331435
</div>
1434-
<div
1435-
className={cn(
1436-
styles.notificationActionContainer,
1437-
CLASSES.mobileToolbar.notificationsAction
1438-
)}
1439-
>
1440-
<MobileNotificationButton
1441-
viewerID={viewerID}
1442-
enabled={userNotificationsEnabled}
1443-
/>
1444-
</div>
1436+
{inPageNotificationsActive && (
1437+
<div
1438+
className={cn(
1439+
styles.notificationActionContainer,
1440+
CLASSES.mobileToolbar.notificationsAction
1441+
)}
1442+
>
1443+
<MobileNotificationButton
1444+
viewerID={viewerID}
1445+
enabled={userNotificationsEnabled}
1446+
/>
1447+
</div>
1448+
)}
14451449
</Flex>
14461450
</MobileToolbar>
14471451
)

client/src/core/client/stream/tabs/Comments/Stream/AllCommentsTab/AllCommentsTabContainer.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,7 @@ export const AllCommentsTabContainer: FunctionComponent<Props> = ({
441441
viewNewCount={viewNewCount}
442442
hasMore={hasMore}
443443
userNotificationsEnabled={!!viewer?.inPageNotifications?.enabled}
444+
inPageNotificationsActive={!!settings?.inPageNotifications?.active}
444445
/>
445446
)}
446447
{tag === GQLTAG.REVIEW && (
@@ -742,6 +743,9 @@ const enhanced = withPaginationContainer<
742743
reaction {
743744
sortLabel
744745
}
746+
inPageNotifications {
747+
active
748+
}
745749
disableCommenting {
746750
enabled
747751
}

common/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "common",
3-
"version": "9.10.6",
3+
"version": "9.10.7",
44
"description": "",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

config/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "common",
3-
"version": "9.10.6",
3+
"version": "9.10.7",
44
"description": "",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@coralproject/talk",
3-
"version": "9.10.6",
3+
"version": "9.10.7",
44
"author": "The Coral Project",
55
"homepage": "https://coralproject.net/",
66
"sideEffects": [

server/src/core/server/graph/resolvers/Settings.ts

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,26 @@ export const Settings: GQLSettingsTypeResolver<Tenant> = {
8686
}) => protectedEmailDomains,
8787
disposableEmailDomains: ({ disposableEmailDomains = { enabled: false } }) =>
8888
disposableEmailDomains,
89-
inPageNotifications: ({
90-
inPageNotifications = { enabled: true, floatingBellIndicator: true },
91-
}) => inPageNotifications,
89+
inPageNotifications: (
90+
{
91+
inPageNotifications = {
92+
enabled: true,
93+
floatingBellIndicator: true,
94+
active: true,
95+
},
96+
},
97+
args,
98+
ctx
99+
) => {
100+
// if external notifications are active, we disable the in-page notifications
101+
if (ctx.externalNotifications.active()) {
102+
return {
103+
...inPageNotifications,
104+
active: false,
105+
};
106+
}
107+
return { ...inPageNotifications, active: true };
108+
},
92109
showUnmoderatedCounts: ({ showUnmoderatedCounts = true }) =>
93110
showUnmoderatedCounts,
94111
};

server/src/core/server/graph/schema/schema.graphql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2038,6 +2038,8 @@ type InPageNotificationsConfiguration {
20382038
enabled: Boolean
20392039

20402040
floatingBellIndicator: Boolean
2041+
2042+
active: Boolean
20412043
}
20422044

20432045
input TooManyPeriodsConfigInput {

0 commit comments

Comments
 (0)