Skip to content

Commit

Permalink
Merge pull request Joystream#68 from Lezek123/gleev/5.5.1
Browse files Browse the repository at this point in the history
🌐 Gleev v5.5.1
  • Loading branch information
Lezek123 authored Dec 2, 2024
2 parents b5cb7dc + e9362f3 commit edb920e
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 32 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [5.5.1] - 2024-11-05

### Changed

- Re-enabled YPP (`features.ypp.suspended: false`)
- Added a message in YPP dashboard for creators potentially affected by [opted-out issue](https://github.com/Joystream/youtube-synch/issues/337)

## [5.5.0] - 2024-11-07

**IMPORTANT:** Depends on Orion release `4.1.0`
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"description": "UI for consuming Joystream - a user governed video platform",
"version": "5.5.0",
"version": "5.5.1",
"license": "GPL-3.0",
"workspaces": [
"packages/*"
Expand Down
2 changes: 1 addition & 1 deletion packages/atlas/atlas.config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ joystream:

features:
ypp:
suspended: true # Whether the YPP is currently suspended
suspended: false # Whether the YPP is currently suspended
yppDelayThreshold: 300 # When the YPP sync backlog exceeds the threshold, Atlas will consider the YPP sync delayed.
landingPageOgTitle: 'Gleev Creator Rewards Program' # Open graph title for YPP landing page - used in open graph meta tags in HTML
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
Expand Down
2 changes: 1 addition & 1 deletion packages/atlas/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@joystream/atlas",
"description": "UI for consuming Joystream - a user governed video platform",
"version": "5.5.0",
"version": "5.5.1",
"license": "GPL-3.0",
"scripts": {
"start": "vite",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export type YppSyncedChannel = {
aggregatedStats: number
shouldBeIngested: boolean
yppStatus: YppChannelStatus
preOptOutStatus?: YppChannelStatus
joystreamChannelId: number
videoCategoryId: string
thumbnails: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ export const useGetYppSyncedChannels = () => {
}
})
)
const optedOutChannels = syncedChannels.filter(
(channel): channel is YppSyncedChannel => !!channel && channel?.yppStatus === 'OptedOut'
)
const fetchedChannels = syncedChannels.filter(
(channel): channel is YppSyncedChannel => !!channel && channel.yppStatus !== 'OptedOut'
)
Expand All @@ -43,6 +46,7 @@ export const useGetYppSyncedChannels = () => {
return {
unsyncedChannels: activeMembership?.channels.filter((channel) => !syncedChannelIds?.includes(channel.id)),
syncedChannels: fetchedChannels,
optedOutChannels,
currentChannel: fetchedChannels?.find(
(syncedChannels) => syncedChannels.joystreamChannelId.toString() === channelId
),
Expand All @@ -62,6 +66,7 @@ export const useGetYppSyncedChannels = () => {
unsyncedChannels: yppSyncedData?.unsyncedChannels,
syncedChannels: yppSyncedData?.syncedChannels,
currentChannel: yppSyncedData?.currentChannel,
optedOutChannels: yppSyncedData?.optedOutChannels,
refetchYppSyncedChannels: refetch,
isLoading: isLoading || membershipsLoading,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
SvgActionNewChannel,
SvgActionNewTab,
SvgAlertsInformative24,
SvgAlertsWarning24,
SvgLogoDiscordOnDark,
} from '@/assets/icons'
import { Banner } from '@/components/Banner'
Expand Down Expand Up @@ -115,7 +116,7 @@ export const YppDashboardMainTab: FC = () => {
} = useSegmentAnalytics()
const navigate = useNavigate()
const _handleYppSignUpClick = useYppAuthorizeHandler()
const { unsyncedChannels, currentChannel } = useGetYppSyncedChannels()
const { unsyncedChannels, currentChannel, optedOutChannels } = useGetYppSyncedChannels()

const mdMatch = useMediaMatch('md')
const smMatch = useMediaMatch('sm')
Expand All @@ -129,6 +130,8 @@ export const YppDashboardMainTab: FC = () => {
const isSilverOrAbove = ['Verified::Silver', 'Verified::Gold', 'Verified::Diamond'].includes(
currentChannel?.yppStatus ?? ''
)
const preOptOutStatus = optedOutChannels?.find((c) => c.joystreamChannelId.toString() === channelId)?.preOptOutStatus

// const isBronze = currentChannel?.yppStatus === 'Verified::Bronze'
const handleYppSignUpClick = () => {
const success = _handleYppSignUpClick()
Expand All @@ -137,26 +140,6 @@ export const YppDashboardMainTab: FC = () => {
}
}

const syncStatusContent = (
<YppSyncStatus>
<Tooltip
text={
currentChannel?.shouldBeIngested
? `Your YouTube channel is being automatically synced with your ${atlasConfig.general.appName} channel. You will be rewarded every time a new video gets synced.`
: `Automatic YouTube channel sync with ${atlasConfig.general.appName} is disabled. You can enable it again anytime in YPP settings tab.`
}
placement="top-start"
>
<StatusDotWrapper>
<StatusDot isOn={currentChannel?.shouldBeIngested ?? false} />
</StatusDotWrapper>
</Tooltip>
<Text variant="t200" as="p">
Autosync: {currentChannel?.shouldBeIngested ? 'On' : 'Off'}
</Text>
</YppSyncStatus>
)

// const silverTierGroup = (
// <FlexBox gap={3} alignItems="center">
// <SilverTierWrapper tier="Verified::Silver">{getTierIcon('Verified::Silver')}</SilverTierWrapper>
Expand Down Expand Up @@ -190,18 +173,76 @@ export const YppDashboardMainTab: FC = () => {
)
}

const syncStatusContent = (
<YppSyncStatus>
<Tooltip
text={
currentChannel?.shouldBeIngested
? `Your YouTube channel is being automatically synced with your ${atlasConfig.general.appName} channel. You will be rewarded every time a new video gets synced.`
: `Automatic YouTube channel sync with ${atlasConfig.general.appName} is disabled. You can enable it again anytime in YPP settings tab.`
}
placement="top-start"
>
<StatusDotWrapper>
<StatusDot isOn={currentChannel?.shouldBeIngested ?? false} />
</StatusDotWrapper>
</Tooltip>
<Text variant="t200" as="p">
Autosync: {currentChannel?.shouldBeIngested ? 'On' : 'Off'}
</Text>
</YppSyncStatus>
)

return (
<>
{!atlasConfig.features.ypp.suspended && <YppAuthorizationModal unSyncedChannels={unsyncedChannels} />}
<YppAuthorizationModal unSyncedChannels={unsyncedChannels} />
<LayoutGrid>
<GridItem colSpan={{ base: 12 }}>
<Banner
dismissibleId="ypp-sync-second-channel"
title="Have another YouTube channel?"
icon={<SvgAlertsInformative24 />}
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.`}
actionButton={{ text: 'Add new channel', onClick: handleYppSignUpClick }}
/>
{preOptOutStatus ? (
<Banner
dismissibleId="ypp-opted-out-bug"
title="Was your channel mistakenly removed from YPP?"
borderColor={cVar('colorTextCaution')}
icon={<SvgAlertsWarning24 />}
description={
<>
<Text variant="t200" color="colorText" as="p" margin={{ bottom: 2 }}>
A&nbsp;
<TextButton
openLinkInNewTab={true}
to="https://github.com/Joystream/youtube-synch/issues/337"
icon={<SvgActionNewTab />}
iconPlacement="right"
>
recent bug
</TextButton>{' '}
in YouTube sync has caused some channels to be automatically removed from YPP and we detected that
your channel was potentially affected.
</Text>
<Text variant="t200" color="colorText" as="p" margin={{ bottom: 2 }}>
If you didn't leave the program willigly, please sign up again in order to continue receiving
rewards. Your previously assigned tier,{' '}
<Text variant="t200" color="colorTextStrong" as="span">
{preOptOutStatus}
</Text>
, will be restored automatically.
</Text>
<Text variant="t200" color="colorText" as="p">
We deeply apologize for the inconvenience.
</Text>
</>
}
actionButton={{ text: 'Sign up again', _textOnly: false, onClick: handleYppSignUpClick }}
/>
) : (
<Banner
dismissibleId="ypp-sync-second-channel"
title="Have another YouTube channel?"
icon={<SvgAlertsInformative24 />}
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.`}
actionButton={{ text: 'Add new channel', onClick: handleYppSignUpClick }}
/>
)}
</GridItem>
<GridItem colSpan={{ xxs: 12, md: 4 }}>
<YppDashboardTier onSignUp={handleYppSignUpClick} status={currentChannel?.yppStatus} />
Expand Down

0 comments on commit edb920e

Please sign in to comment.