Skip to content

Commit

Permalink
🚀 Release 1.7.0 (#4542)
Browse files Browse the repository at this point in the history
  • Loading branch information
thesan authored Sep 15, 2023
2 parents 35ff3ff + 66ed9c8 commit fd518a3
Show file tree
Hide file tree
Showing 20 changed files with 509 additions and 76 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ jobs:
if [ ${#SUBDOMAIN} -gt 63 ]; then
HASH=$(echo -n "${{ env.PREFIX }}-${BRANCH}${{ env.PROJECT }}" | sha256sum | head -c 6)
SUBDOMAIN="$(echo -n "$SUBDOMAIN" | head -c 46)-$HASH-joystream"
SUBDOMAIN="$(echo -n "$SUBDOMAIN" | head -c 46 | sed -e 's/[^-]$/\0-/')$HASH-joystream"
fi
echo "VERCEL_DEPLOYMENT_URL=$SUBDOMAIN.vercel.app" >> "$GITHUB_ENV"
Expand Down
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.7.0] - 2023-09-15

### Added
- Improve the multiple recipient funding request proposal preview.
- Links to buy and earn $JOY.
- Link to `joystream.subscan.io`.

## [1.6.0] - 2023-09-01

### Added
Expand Down Expand Up @@ -186,7 +193,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [0.1.1] - 2022-12-02

[unreleased]: https://github.com/Joystream/pioneer/compare/v1.6.0...HEAD
[unreleased]: https://github.com/Joystream/pioneer/compare/v1.7.0...HEAD
[1.7.0]: https://github.com/Joystream/pioneer/compare/v1.6.0...v1.7.0
[1.6.0]: https://github.com/Joystream/pioneer/compare/v1.5.1...v1.6.0
[1.5.1]: https://github.com/Joystream/pioneer/compare/v1.5.0...v1.5.1
[1.5.0]: https://github.com/Joystream/pioneer/compare/v1.4.0...v1.5.0
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@joystream/pioneer",
"version": "1.6.0",
"version": "1.7.0",
"license": "GPL-3.0-only",
"scripts": {
"build": "node --max_old_space_size=4096 ./build.js",
Expand Down
5 changes: 3 additions & 2 deletions packages/ui/src/app/components/SideBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import { SidebarConnections } from '@/app/components/SidebarConnections'
import { MembersRoutes, ProfileRoutes, SettingsRoutes } from '@/app/constants/routes'
import { BountyRoutes } from '@/bounty/constants'
import { Arrow } from '@/common/components/icons'
import { CalamarSymbol, LinkSymbol, LinkSymbolStyle, PolkadotSymbol } from '@/common/components/icons/symbols'
import { LinkSymbol, LinkSymbolStyle, PolkadotSymbol } from '@/common/components/icons/symbols'
import { SubscanSymbol } from '@/common/components/icons/symbols/SubscanSymbol'
import { AppsIcon } from '@/common/components/page/Sidebar/LinksIcons/AppsIcon'
import { BandwidthIcon } from '@/common/components/page/Sidebar/LinksIcons/BandwidthIcon'
import { BountyIcon } from '@/common/components/page/Sidebar/LinksIcons/BountyIcon'
Expand Down Expand Up @@ -109,7 +110,7 @@ export const SideBar = () => {
</NavigationLink>
</NavigationLinksItem>
<NavigationLinksItem>
<NavigationLink icon={<CalamarSymbol />} to="https://calamar.app/joystream">
<NavigationLink icon={<SubscanSymbol />} to="https://joystream.subscan.io">
Explorer
<LinkSymbol color={Colors.Black[500]} className="sidebarLinkSymbol" />
</NavigationLink>
Expand Down
4 changes: 4 additions & 0 deletions packages/ui/src/app/pages/Profile/MyAccounts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import { PageHeaderWrapper, PageLayout } from '@/app/components/PageLayout'
import { RowGapBlock } from '@/common/components/page/PageContent'
import { PageTitle } from '@/common/components/page/PageTitle'
import { Statistics, TokenValueStat } from '@/common/components/statistics'
import { useLocalStorage } from '@/common/hooks/useLocalStorage'

import { BannerSection } from './components/BannerSection'
import { MyProfileTabs } from './components/MyProfileTabs'

const hints = {
Expand Down Expand Up @@ -52,6 +54,7 @@ export const MyAccounts = () => {
const { total, transferable, locked, recoverable, vestingTotal, vestedClaimable, vestingLocked } =
useMyTotalBalances()
const { hasAccounts, isLoading } = useMyAccounts()
const [shouldDismissBanner, setShouldDismissBanner] = useLocalStorage<boolean>('buy-joy-banner') ?? false
const shouldHideStatistics = !hasAccounts && !isLoading

return (
Expand All @@ -62,6 +65,7 @@ export const MyAccounts = () => {
<PageTitle>My Profile</PageTitle>
<MyProfileTabs />
</PageHeaderWrapper>
{!shouldDismissBanner && <BannerSection setShouldDismissBanner={setShouldDismissBanner} />}
{!shouldHideStatistics && (
<Statistics>
<TokenValueStat {...hints.total} value={total} />
Expand Down
78 changes: 78 additions & 0 deletions packages/ui/src/app/pages/Profile/components/BannerSection.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
import React from 'react'
import styled from 'styled-components'

import { CloseButton } from '@/common/components/buttons'
import { LinkButtonLinkStyles } from '@/common/components/buttons/LinkButtons'
import { Arrow, QuestionIcon } from '@/common/components/icons'
import { RowGapBlock } from '@/common/components/page/PageContent'
import { DefaultTooltip } from '@/common/components/Tooltip'
import { TextInlineMedium, TextMedium } from '@/common/components/typography/Text'
import { Colors } from '@/common/constants'

interface Props {
setShouldDismissBanner: (bool: boolean) => void
}

export const BannerSection = ({ setShouldDismissBanner }: Props) => {
return (
<Banner gap={8}>
<BannerHeader>
<BannerTitle>
<BannerTooltip>
<QuestionIcon />
</BannerTooltip>
<TextInlineMedium bold={true}>What is Joy Token?</TextInlineMedium>
</BannerTitle>
<CloseButton onClick={() => setShouldDismissBanner(true)} />
</BannerHeader>
<TextMedium>
JOY token is a native crypto asset of Joystream blockchain. It is used for platform governance, purchasing NFTs,
trading creator tokens, and covering blockchain processing fees. They are listed on&nbsp;
<CustomLinkStyle
as={'a'}
to={''}
href="https://www.mexc.com/exchange/JOYSTREAM_USDT?_from=market"
target="_blank"
size={'medium'}
>
<TextInlineMedium>MEXC</TextInlineMedium>
</CustomLinkStyle>
&nbsp;exchange under "JOYSTREAM" ticker.
</TextMedium>
<TextLink href="https://www.joystream.org/token#earn" target="_blank">
<TextInlineMedium bold={true}>Learn how to earn JOY's</TextInlineMedium> <Arrow size={'24'} direction="right" />
</TextLink>
</Banner>
)
}
const Banner = styled(RowGapBlock)`
padding: 16px;
background-color: ${Colors.Blue[50]};
`
const BannerHeader = styled.div`
display: flex;
justify-content: space-between;
`
const BannerTitle = styled.h6`
display: flex;
column-gap: 8px;
`

const TextLink = styled.a`
color: ${Colors.Blue[500]};
display: flex;
column-gap: 8px;
width: 213px;
${TextInlineMedium} {
margin: auto 0px;
}
`
const BannerTooltip = styled(DefaultTooltip)`
margin-top: 1px;
`
const CustomLinkStyle = styled(LinkButtonLinkStyles)`
display: inline-flex;
// margin-left: 2px;
// margin-right: 2px;
`
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,9 @@ export const FillWorkingGroupLeadOpening: Story = {
export const FundingRequest: Story = {
args: { type: 'FundingRequestProposalDetails' },
}
export const FundingRequestMultipleRecipients: Story = {
args: { type: 'FundingRequestMultipleRecipientsProposalDetails' },
}
export const RuntimeUpgrade: Story = {
args: { type: 'RuntimeUpgradeProposalDetails', constitutionality: 2 },
parameters: {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
import { Meta, StoryContext, StoryObj } from '@storybook/react'
import { FC } from 'react'

import { member } from '@/mocks/data/members'
import { joy } from '@/mocks/helpers'
import { MocksParameters } from '@/mocks/providers'
import { GetWorkersDocument, GetWorkingGroupDocument } from '@/working-groups/queries'

import { WorkingGroup } from './WorkingGroup'

type Args = {
isLead: boolean
isLoggedIn: boolean
}

type Story = StoryObj<FC<Args>>

const WG_DATA = {
id: 'membershipWorkingGroup',
name: 'membership',
}

export default {
title: 'Pages/Working Group/WorkingGroup',
component: WorkingGroup,

args: {
isLoggedIn: true,
isLead: true,
},

parameters: {
router: { path: '/:name', href: `/${WG_DATA.name}` },
mocks: ({ args, parameters }: StoryContext<Args>): MocksParameters => {
const alice = member('alice', {
roles: [
{
__typename: 'Worker',
id: `${WG_DATA.id}-0`,
createdAt: '2021',
isLead: args.isLead,
group: {
__typename: 'WorkingGroup',
name: WG_DATA.name,
},
},
],
})
return {
accounts: parameters.isLoggedIn ? { active: { member: alice } } : { list: [{ member: alice }] },

// chain: undefined,

queryNode: [
{
query: GetWorkingGroupDocument,
data: {
workingGroupByUniqueInput: {
id: WG_DATA.id,
name: WG_DATA.name,
budget: joy(200),
workers: [],
leader: { membershipId: alice.id, isActive: true },
},
},
},
{
query: GetWorkersDocument,
data: {
workers: [
{
id: `${WG_DATA.id}-0`,
group: {
id: WG_DATA.id,
name: WG_DATA.name,
},
status: 'WorkerStatusActive',
membership: alice,
},
{
id: `${WG_DATA.id}-1`,
group: {
id: WG_DATA.id,
name: WG_DATA.name,
},
status: 'WorkerStatusActive',
membership: member('charlie'),
},
],
},
},
],
}
},
},
} satisfies Meta<Args>

export const Default: Story = {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import { Meta, StoryContext, StoryObj } from '@storybook/react'
import { FC } from 'react'

import { member } from '@/mocks/data/members'
import { MocksParameters } from '@/mocks/providers'

import { WorkingGroupsOpenings } from './WorkingGroupsOpenings'

type Args = {
isLead: boolean
isLoggedIn: boolean
}

type Story = StoryObj<FC<Args>>

export default {
title: 'Pages/Working Groups/Openings',
component: WorkingGroupsOpenings,

args: {
isLoggedIn: true,
isLead: true,
},

parameters: {
mocks: ({ args, parameters }: StoryContext<Args>): MocksParameters => {
const alice = member('alice', {
roles: [
{
__typename: 'Worker',
id: 'string',
createdAt: '2021',
isLead: args.isLead,
group: {
__typename: 'WorkingGroup',
name: 'string',
},
},
],
})
return {
accounts: parameters.isLoggedIn ? { active: { member: alice } } : { list: [{ member: alice }] },

chain: undefined,

queryNode: [],
}
},
},
} satisfies Meta<Args>

export const Default: Story = {}
5 changes: 4 additions & 1 deletion packages/ui/src/common/components/Tooltip/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ import { LinkSymbol, LinkSymbolStyle } from '../icons/symbols'

import { DefaultTooltip } from './TooltipDefault'

type TooltipPlacement = 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end'
export interface TooltipProps extends Omit<TooltipPopupProps, 'popUpHandlers' | 'position'> {
absolute?: boolean
maxWidth?: boolean
placement?: TooltipPlacement
children: React.ReactNode
}

Expand Down Expand Up @@ -45,6 +47,7 @@ export interface DarkTooltipInnerItemProps {
export const Tooltip = ({
absolute,
maxWidth,
placement,
children,
tooltipText,
tooltipOpen = false,
Expand All @@ -64,7 +67,7 @@ export const Tooltip = ({
const [boundaryElement, setBoundaryElement] = useState<HTMLElement | null>(null)

const { styles, attributes } = usePopper(referenceElementRef, popperElementRef, {
placement: 'bottom-start',
placement: placement || 'bottom-start',
modifiers: [
{
name: 'offset',
Expand Down
23 changes: 23 additions & 0 deletions packages/ui/src/common/components/icons/symbols/SubscanSymbol.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import React from 'react'

export function SubscanSymbol() {
return (
<svg width="26px" height="26px" viewBox="0 0 26 26" version="1.1" xmlns="http://www.w3.org/2000/svg">
<g fill="currentColor">
<path
d="m13.8 3.21c0.733-0.733 0.733-1.92 0-2.66-0.733-0.733-1.92-0.733-2.66 0l-10.6 10.6c-0.733 0.733-0.733 1.92 0 2.66l5.31 5.31v2.08e-4c0.733 0.733 1.92 0.733 2.66 0l9.29-9.29 2.66 2.66-9.29 9.29c-0.733 0.733-0.733 1.92 0 2.66 0.733 0.733 1.92 0.733 2.66 0l10.6-10.6c0.733-0.733 0.733-1.92 0-2.66l-5.31-5.31c-0.733-0.733-1.92-0.733-2.66 0l-9.29 9.29-2.66-2.66 9.29-9.29z"
opacity=".2"
/>
<path d="m3.21 11.2c0.733 0.733 0.733 1.92 0 2.66-0.733 0.734-1.92 0.734-2.66 0-0.733-0.733-0.733-1.92 0-2.66 0.733-0.734 1.92-0.734 2.66 0" />
<path d="m8.52 5.86c0.733 0.734 0.733 1.92 0 2.66-0.733 0.733-1.92 0.733-2.66 0-0.733-0.733-0.733-1.92 0-2.66 0.733-0.734 1.92-0.734 2.66-2.08e-4" />
<path d="m13.8 0.55c0.733 0.734 0.733 1.92 0 2.66-0.733 0.733-1.92 0.733-2.66 0-0.733-0.733-0.733-1.92 0-2.66 0.733-0.733 1.92-0.733 2.66 0" />
<path d="m8.52 16.5c0.733 0.733 0.733 1.92 0 2.66-0.733 0.733-1.92 0.733-2.66 0-0.733-0.733-0.733-1.92 0-2.66 0.733-0.733 1.92-0.733 2.66 0" />
<path d="m13.8 11.2c0.733 0.733 0.733 1.92 0 2.66-0.733 0.734-1.92 0.734-2.66 0-0.733-0.733-0.733-1.92 0-2.66 0.733-0.734 1.92-0.734 2.66 0" />
<path d="m19.1 5.86c0.733 0.734 0.733 1.92 0 2.66-0.733 0.733-1.92 0.733-2.66 0-0.733-0.733-0.733-1.92 0-2.66 0.733-0.734 1.92-0.734 2.66-2.08e-4" />
<path d="m13.8 21.8c0.733 0.733 0.733 1.92 0 2.66-0.733 0.733-1.92 0.733-2.66 0-0.733-0.733-0.733-1.92 0-2.66 0.733-0.733 1.92-0.733 2.66 0" />
<path d="m19.1 16.5c0.733 0.733 0.733 1.92 0 2.66-0.733 0.734-1.92 0.734-2.66 2.08e-4 -0.733-0.733-0.733-1.92 0-2.66 0.733-0.733 1.92-0.733 2.66 0" />
<path d="m24.5 11.2c0.733 0.733 0.733 1.92 0 2.66-0.733 0.734-1.92 0.734-2.66 0-0.733-0.733-0.733-1.92 0-2.66 0.733-0.734 1.92-0.734 2.66 0" />
</g>
</svg>
)
}
Loading

1 comment on commit fd518a3

@vercel
Copy link

@vercel vercel bot commented on fd518a3 Sep 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

dao – ./

dao.joystream.org
dao-git-main-joystream.vercel.app
dao-joystream.vercel.app
pioneerapp.xyz

Please sign in to comment.