Skip to content

Commit edb920e

Browse files
authored
Merge pull request #68 from Lezek123/gleev/5.5.1
🌐 Gleev v5.5.1
2 parents b5cb7dc + e9362f3 commit edb920e

File tree

7 files changed

+86
-32
lines changed

7 files changed

+86
-32
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [5.5.1] - 2024-11-05
9+
10+
### Changed
11+
12+
- Re-enabled YPP (`features.ypp.suspended: false`)
13+
- Added a message in YPP dashboard for creators potentially affected by [opted-out issue](https://github.com/Joystream/youtube-synch/issues/337)
14+
815
## [5.5.0] - 2024-11-07
916

1017
**IMPORTANT:** Depends on Orion release `4.1.0`

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"description": "UI for consuming Joystream - a user governed video platform",
3-
"version": "5.5.0",
3+
"version": "5.5.1",
44
"license": "GPL-3.0",
55
"workspaces": [
66
"packages/*"

packages/atlas/atlas.config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ joystream:
3838

3939
features:
4040
ypp:
41-
suspended: true # Whether the YPP is currently suspended
41+
suspended: false # Whether the YPP is currently suspended
4242
yppDelayThreshold: 300 # When the YPP sync backlog exceeds the threshold, Atlas will consider the YPP sync delayed.
4343
landingPageOgTitle: 'Gleev Creator Rewards Program' # Open graph title for YPP landing page - used in open graph meta tags in HTML
4444
landingPageOgDescription: 'Connect and monetize your content with Web3 native features on Gleev, the video streaming dApp built on Joystream blockchain.' # Open graph description for YPP landing page - used in open graph meta tags in HTML

packages/atlas/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@joystream/atlas",
33
"description": "UI for consuming Joystream - a user governed video platform",
4-
"version": "5.5.0",
4+
"version": "5.5.1",
55
"license": "GPL-3.0",
66
"scripts": {
77
"start": "vite",

packages/atlas/src/views/global/YppLandingView/YppLandingView.types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export type YppSyncedChannel = {
1313
aggregatedStats: number
1414
shouldBeIngested: boolean
1515
yppStatus: YppChannelStatus
16+
preOptOutStatus?: YppChannelStatus
1617
joystreamChannelId: number
1718
videoCategoryId: string
1819
thumbnails: {

packages/atlas/src/views/global/YppLandingView/useGetYppSyncedChannels.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ export const useGetYppSyncedChannels = () => {
3535
}
3636
})
3737
)
38+
const optedOutChannels = syncedChannels.filter(
39+
(channel): channel is YppSyncedChannel => !!channel && channel?.yppStatus === 'OptedOut'
40+
)
3841
const fetchedChannels = syncedChannels.filter(
3942
(channel): channel is YppSyncedChannel => !!channel && channel.yppStatus !== 'OptedOut'
4043
)
@@ -43,6 +46,7 @@ export const useGetYppSyncedChannels = () => {
4346
return {
4447
unsyncedChannels: activeMembership?.channels.filter((channel) => !syncedChannelIds?.includes(channel.id)),
4548
syncedChannels: fetchedChannels,
49+
optedOutChannels,
4650
currentChannel: fetchedChannels?.find(
4751
(syncedChannels) => syncedChannels.joystreamChannelId.toString() === channelId
4852
),
@@ -62,6 +66,7 @@ export const useGetYppSyncedChannels = () => {
6266
unsyncedChannels: yppSyncedData?.unsyncedChannels,
6367
syncedChannels: yppSyncedData?.syncedChannels,
6468
currentChannel: yppSyncedData?.currentChannel,
69+
optedOutChannels: yppSyncedData?.optedOutChannels,
6570
refetchYppSyncedChannels: refetch,
6671
isLoading: isLoading || membershipsLoading,
6772
}

packages/atlas/src/views/studio/YppDashboard/tabs/YppDashboardMainTab.tsx

Lines changed: 70 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
SvgActionNewChannel,
99
SvgActionNewTab,
1010
SvgAlertsInformative24,
11+
SvgAlertsWarning24,
1112
SvgLogoDiscordOnDark,
1213
} from '@/assets/icons'
1314
import { Banner } from '@/components/Banner'
@@ -115,7 +116,7 @@ export const YppDashboardMainTab: FC = () => {
115116
} = useSegmentAnalytics()
116117
const navigate = useNavigate()
117118
const _handleYppSignUpClick = useYppAuthorizeHandler()
118-
const { unsyncedChannels, currentChannel } = useGetYppSyncedChannels()
119+
const { unsyncedChannels, currentChannel, optedOutChannels } = useGetYppSyncedChannels()
119120

120121
const mdMatch = useMediaMatch('md')
121122
const smMatch = useMediaMatch('sm')
@@ -129,6 +130,8 @@ export const YppDashboardMainTab: FC = () => {
129130
const isSilverOrAbove = ['Verified::Silver', 'Verified::Gold', 'Verified::Diamond'].includes(
130131
currentChannel?.yppStatus ?? ''
131132
)
133+
const preOptOutStatus = optedOutChannels?.find((c) => c.joystreamChannelId.toString() === channelId)?.preOptOutStatus
134+
132135
// const isBronze = currentChannel?.yppStatus === 'Verified::Bronze'
133136
const handleYppSignUpClick = () => {
134137
const success = _handleYppSignUpClick()
@@ -137,26 +140,6 @@ export const YppDashboardMainTab: FC = () => {
137140
}
138141
}
139142

140-
const syncStatusContent = (
141-
<YppSyncStatus>
142-
<Tooltip
143-
text={
144-
currentChannel?.shouldBeIngested
145-
? `Your YouTube channel is being automatically synced with your ${atlasConfig.general.appName} channel. You will be rewarded every time a new video gets synced.`
146-
: `Automatic YouTube channel sync with ${atlasConfig.general.appName} is disabled. You can enable it again anytime in YPP settings tab.`
147-
}
148-
placement="top-start"
149-
>
150-
<StatusDotWrapper>
151-
<StatusDot isOn={currentChannel?.shouldBeIngested ?? false} />
152-
</StatusDotWrapper>
153-
</Tooltip>
154-
<Text variant="t200" as="p">
155-
Autosync: {currentChannel?.shouldBeIngested ? 'On' : 'Off'}
156-
</Text>
157-
</YppSyncStatus>
158-
)
159-
160143
// const silverTierGroup = (
161144
// <FlexBox gap={3} alignItems="center">
162145
// <SilverTierWrapper tier="Verified::Silver">{getTierIcon('Verified::Silver')}</SilverTierWrapper>
@@ -190,18 +173,76 @@ export const YppDashboardMainTab: FC = () => {
190173
)
191174
}
192175

176+
const syncStatusContent = (
177+
<YppSyncStatus>
178+
<Tooltip
179+
text={
180+
currentChannel?.shouldBeIngested
181+
? `Your YouTube channel is being automatically synced with your ${atlasConfig.general.appName} channel. You will be rewarded every time a new video gets synced.`
182+
: `Automatic YouTube channel sync with ${atlasConfig.general.appName} is disabled. You can enable it again anytime in YPP settings tab.`
183+
}
184+
placement="top-start"
185+
>
186+
<StatusDotWrapper>
187+
<StatusDot isOn={currentChannel?.shouldBeIngested ?? false} />
188+
</StatusDotWrapper>
189+
</Tooltip>
190+
<Text variant="t200" as="p">
191+
Autosync: {currentChannel?.shouldBeIngested ? 'On' : 'Off'}
192+
</Text>
193+
</YppSyncStatus>
194+
)
195+
193196
return (
194197
<>
195-
{!atlasConfig.features.ypp.suspended && <YppAuthorizationModal unSyncedChannels={unsyncedChannels} />}
198+
<YppAuthorizationModal unSyncedChannels={unsyncedChannels} />
196199
<LayoutGrid>
197200
<GridItem colSpan={{ base: 12 }}>
198-
<Banner
199-
dismissibleId="ypp-sync-second-channel"
200-
title="Have another YouTube channel?"
201-
icon={<SvgAlertsInformative24 />}
202-
description={`You can apply to the YouTube Partner Program with as many YouTube & ${atlasConfig.general.appName} channels as you want. Each YouTube channel can be assigned to only one ${atlasConfig.general.appName} channel.`}
203-
actionButton={{ text: 'Add new channel', onClick: handleYppSignUpClick }}
204-
/>
201+
{preOptOutStatus ? (
202+
<Banner
203+
dismissibleId="ypp-opted-out-bug"
204+
title="Was your channel mistakenly removed from YPP?"
205+
borderColor={cVar('colorTextCaution')}
206+
icon={<SvgAlertsWarning24 />}
207+
description={
208+
<>
209+
<Text variant="t200" color="colorText" as="p" margin={{ bottom: 2 }}>
210+
A&nbsp;
211+
<TextButton
212+
openLinkInNewTab={true}
213+
to="https://github.com/Joystream/youtube-synch/issues/337"
214+
icon={<SvgActionNewTab />}
215+
iconPlacement="right"
216+
>
217+
recent bug
218+
</TextButton>{' '}
219+
in YouTube sync has caused some channels to be automatically removed from YPP and we detected that
220+
your channel was potentially affected.
221+
</Text>
222+
<Text variant="t200" color="colorText" as="p" margin={{ bottom: 2 }}>
223+
If you didn't leave the program willigly, please sign up again in order to continue receiving
224+
rewards. Your previously assigned tier,{' '}
225+
<Text variant="t200" color="colorTextStrong" as="span">
226+
{preOptOutStatus}
227+
</Text>
228+
, will be restored automatically.
229+
</Text>
230+
<Text variant="t200" color="colorText" as="p">
231+
We deeply apologize for the inconvenience.
232+
</Text>
233+
</>
234+
}
235+
actionButton={{ text: 'Sign up again', _textOnly: false, onClick: handleYppSignUpClick }}
236+
/>
237+
) : (
238+
<Banner
239+
dismissibleId="ypp-sync-second-channel"
240+
title="Have another YouTube channel?"
241+
icon={<SvgAlertsInformative24 />}
242+
description={`You can apply to the YouTube Partner Program with as many YouTube & ${atlasConfig.general.appName} channels as you want. Each YouTube channel can be assigned to only one ${atlasConfig.general.appName} channel.`}
243+
actionButton={{ text: 'Add new channel', onClick: handleYppSignUpClick }}
244+
/>
245+
)}
205246
</GridItem>
206247
<GridItem colSpan={{ xxs: 12, md: 4 }}>
207248
<YppDashboardTier onSignUp={handleYppSignUpClick} status={currentChannel?.yppStatus} />

0 commit comments

Comments
 (0)