Skip to content

Commit

Permalink
Release v4.13.1
Browse files Browse the repository at this point in the history
  • Loading branch information
attemka authored Nov 9, 2023
2 parents 9a474ec + 460e9d4 commit 7b6caec
Show file tree
Hide file tree
Showing 21 changed files with 77 additions and 51 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ 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).

## [4.13.1] - 2023-11-09

### Fixed

- Minor markup fixes on referrals page
- Fixed issue with YPP landing page carousel
- Fixed user logs

## [4.13.0] - 2023-11-08

### Added
Expand Down
2 changes: 1 addition & 1 deletion packages/atlas/codegen.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { CodegenConfig } from '@graphql-codegen/cli'

import { customSchemaLoader } from './scripts/customSchemaLoader'

const ENV = process.env.VITE_DEFAULT_DATA_ENV?.toUpperCase() ?? process.env.VITE_ENV?.toUpperCase() ?? 'PRODUCTION'
const ENV = process.env.VITE_DEFAULT_DATA_ENV?.toUpperCase() || process.env.VITE_ENV?.toUpperCase() || 'PRODUCTION'
const schemaUrl = process.env[`VITE_${ENV}_ORION_URL`]
if (!schemaUrl) throw new Error(`VITE_${ENV}_ORION_URL is not defined`)

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": "4.13.0",
"version": "4.13.1",
"license": "GPL-3.0",
"scripts": {
"start": "vite",
Expand Down
6 changes: 3 additions & 3 deletions packages/atlas/src/api/hooks/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,18 +87,18 @@ export const useBasicChannels = (
export type PayeeChannel = {
id: string
title?: string | null
cumulativeRewardPaid: BN
cumulativeReward: BN
avatarPhoto?: { resolvedUrls: string[] } | null
}
export const useMostPaidChannels = (): { channels: PayeeChannel[] | undefined; loading: boolean } => {
const { data, loading } = useGetMostPaidChannelsQuery()

const channels = useMemo<PayeeChannel[] | undefined>(
() =>
data?.channels.map(({ id, title, cumulativeRewardPaid, avatarPhoto }) => ({
data?.channels.map(({ id, title, cumulativeReward, avatarPhoto }) => ({
id,
title: title ?? undefined,
cumulativeRewardPaid: cumulativeRewardPaid ? new BN(cumulativeRewardPaid) : BN_ZERO,
cumulativeReward: cumulativeReward ? new BN(cumulativeReward) : BN_ZERO,
avatarPhoto: avatarPhoto ?? undefined,
})),
[data]
Expand Down
34 changes: 17 additions & 17 deletions packages/atlas/src/api/queries/__generated__/baseTypes.generated.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions packages/atlas/src/api/queries/channels.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -297,13 +297,16 @@ query GetChannelPaymentEvents($channelId: String) {
}

query GetMostPaidChannels {
channels(orderBy: cumulativeRewardPaid_DESC, limit: 50) {
channels(orderBy: cumulativeReward_DESC, limit: 50) {
id
title
cumulativeRewardPaid
cumulativeReward
avatarPhoto {
resolvedUrls
isAccepted
storageBag {
id
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/atlas/src/api/schemas/orion.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ export default {
channel: {
title: 'my channel',
id: '3',
cumulativeRewardPaid: 123_456,
cumulativeReward: 123_456,
avatarPhoto: { id: '1' },
},
},

render: (args) => {
const amount = (args.channel?.cumulativeRewardPaid as number) ?? 0
const amount = (args.channel?.cumulativeReward as number) ?? 0
const channel = args.channel && {
...args.channel,
cumulativeRewardPaid: new BN(`${Math.trunc(amount)}${(amount % 1).toFixed(10).substring(2)}`),
cumulativeReward: new BN(`${Math.trunc(amount)}${(amount % 1).toFixed(10).substring(2)}`),
}
return (
<Grid>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const PaidChannelCard: FC<PaidChannelCardProps> = ({ onClick, channel, lo
) : (
<>
<Amount
value={channel.cumulativeRewardPaid}
value={channel.cumulativeReward}
as="span"
withToken="small"
withTooltip
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const SidebarNavLink = styled(Link, { shouldForwardProp: isPropValid })<S
}
> span {
margin-left: ${sizes(6)};
margin-left: ${sizes(7)};
font: ${cVar('typographyDesktopH400')};
letter-spacing: ${cVar('typographyDesktopH400LetterSpacing')};
text-transform: ${cVar('typographyDesktopH400TextTransform')};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export const viewerNavItems = [
name: 'Referrals',
expandedName: 'Referrals program',
to: absoluteRoutes.viewer.referrals(),
bottomNav: true,
},
]
export const SidenavViewer: FC = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export const StyledStepContainer = styled(FlexBox)<{ isSelected: boolean; disabl
opacity: ${({ isSelected }) => (isSelected ? '1' : '0.5')};
flex: 1;
background-size: 200% 100%;
text-align: left;
${({ disabled }) =>
!disabled &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ const pulse = keyframes`
`
export const TierBanner = styled.div<{ tier: 'bronze' | 'silver' | 'gold' | 'diamond' }>`
width: 100%;
max-height: 80px;
border-radius: calc(1.5 * ${cVar('radiusLarge')}) calc(1.5 * ${cVar('radiusLarge')}) 0 0;
overflow: hidden;
display: flex;
flex-direction: column;
align-items: center;
position: relative;
padding: ${sizes(2.5)};
padding-bottom: ${sizes(6)};
background: ${(props) => {
switch (props.tier) {
case 'diamond':
Expand All @@ -83,6 +83,10 @@ export const TierBanner = styled.div<{ tier: 'bronze' | 'silver' | 'gold' | 'dia
${square(36)}
}
.absolute-container {
position: absolute;
}
::before {
content: ' ';
position: absolute;
Expand Down
18 changes: 11 additions & 7 deletions packages/atlas/src/components/_referrals/TierCard/TierCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
TierBanner,
Wrapper,
} from '@/components/_referrals/TierCard/TierCard.styles'
import { atlasConfig } from '@/config'
import { capitalizeFirstLetter } from '@/utils/misc'
import { getTierRewards } from '@/utils/ypp'
import { TickWrapper } from '@/views/global/YppLandingView/YppAuthorizationModal/YppAuthorizationSteps/YppAuthorizationRequirementsStep/YppAuthorizationRequirementsStep.styles'
Expand All @@ -40,7 +41,8 @@ export const getTierIcon = (tier: TierCardProps['tier']) => {
}

export const TierCard = ({ reqs, tier }: TierCardProps) => {
const referralReward = getTierRewards(tier)?.referral
const signupMultiplier = tier === 'bronze' ? 1 : atlasConfig.features.ypp.tierBoostMultiplier || 1
const referralReward = (getTierRewards(tier)?.referral || 0) * signupMultiplier
return (
<Wrapper>
<TierBanner tier={tier}>
Expand All @@ -50,12 +52,14 @@ export const TierCard = ({ reqs, tier }: TierCardProps) => {
{capitalizeFirstLetter(tier)}
</Text>
</FlexBox>
<svg>
<filter id="noise">
<feTurbulence type="fractalNoise" baseFrequency="1" numOctaves="1" stitchTiles="stitch" />
<feBlend in="SourceGraphic" in2="colorNoise" mode="multiply" />
</filter>
</svg>
<div className="absolute-container">
<svg>
<filter id="noise">
<feTurbulence type="fractalNoise" baseFrequency="1" numOctaves="1" stitchTiles="stitch" />
<feBlend in="SourceGraphic" in2="colorNoise" mode="multiply" />
</filter>
</svg>
</div>
</TierBanner>

<ContentWrapper gap={2} flow="column">
Expand Down
2 changes: 1 addition & 1 deletion packages/atlas/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />

<preference name="AllowInlineMediaPlayback" value="true" />
<!-- The following node will be replaced by Optimize init script during Vite's build step (see ../plugins) -->
<optimize-script />

Expand Down
6 changes: 1 addition & 5 deletions packages/atlas/src/providers/assets/assets.helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export const testAssetDownload = (url: string, type: AssetType | null): Promise<

const reject = (err?: unknown) => {
cleanup()
UserEventsLogger.logAssetUploadFailedEvent({ resolvedUrl: url }, err as Error)
_reject(err)
}

Expand Down Expand Up @@ -76,10 +75,7 @@ export const testAssetDownload = (url: string, type: AssetType | null): Promise<
video.src = url
} else if (type === 'subtitles') {
fetch(url, { method: 'HEAD', mode: 'cors', cache: 'no-store' })
.then((response) => {
if (!response.ok) {
UserEventsLogger.logAssetUploadFailedEvent({ resolvedUrl: url }, new Error(response.statusText))
}
.then(() => {
resolve()
})
.catch(reject)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export const ReferralSteps = () => {
onMouseLeave={() => (shouldSwitch.current = true)}
>
<StepVideoContainer>
<StyledStepVideo ref={videoRef} autoPlay loop muted>
<StyledStepVideo ref={videoRef} playsInline autoPlay loop muted>
<source src={videoSrcs[selectedStep]} type="video/mp4" />
</StyledStepVideo>
</StepVideoContainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { media, sizes, square } from '@/styles'

export const TiersGraphicWrapper = styled.div`
display: grid;
justify-content: center;
grid-template-rows: 1fr 1fr;
grid-template-columns: 2fr 1fr 2fr;
gap: 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const ReferralsVideo = () => {
</LogosContainer>
<Text
as="h1"
margin={{ top: 14 }}
margin={{ top: smMatch ? 14 : 8 }}
variant={mainTitleVariant}
data-aos="fade-up"
data-aos-delay="250"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const TopReferrals = () => {
const channelById = (id: string) => topReferrersChannels?.find((channel) => channel.channel.id === id)?.channel

return (
<FlexBox flow="column" marginTop={mdMatch ? 24 : xsMatch ? 16 : 14} gap={18} alignItems="center">
<FlexBox flow="column" marginTop={mdMatch ? 24 : xsMatch ? 16 : 14} gap={xsMatch ? 18 : 12} alignItems="center">
<Text
as="h2"
variant={titleVariant}
Expand Down

0 comments on commit 7b6caec

Please sign in to comment.