Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚀 Release 1.1.0 #4001

Merged
merged 28 commits into from
Jan 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
0348b49
Show sum of my vote stakes on `CandidateVote` (#2985) (#3790)
traumschule Dec 12, 2022
50442e8
Hide error while loading on `ClaimVestingModal` (#3838) (#3842)
traumschule Dec 12, 2022
a591d7a
hiringLimit 0 to 1 (#2451) (#3860)
chrlschwb Dec 12, 2022
8a34719
Don't overwrite watchlist (#3769) (#3796)
traumschule Dec 12, 2022
eba70a7
added description for ForumPageHeader (#3904) (#3925)
mkbeefcake Dec 12, 2022
6da5e61
Forum refetch fix (#3915) (#3952)
traumschule Dec 12, 2022
6afd081
Stake changed Activities (#3458) (#3826)
traumschule Dec 12, 2022
3272196
Display whitelisted members for closed proposal discussions (#2480) (…
traumschule Dec 12, 2022
0ece6ce
Fix tooltips for Election Round and Minimal Stake (#3946)
gyroflaw Dec 12, 2022
651e540
Rename leader to lead (#3846)
traumschule Dec 12, 2022
ec63fe8
thread datetime (#3893)
traumschule Dec 12, 2022
f3345e6
Update `Withdraw Candidacy` warning (#3895) (#3923)
traumschule Dec 12, 2022
1b163bc
Show new invitation quota on `ProposalDetails` (#3902) (#3926)
traumschule Dec 12, 2022
d2d2d28
Hide `Earned in 24h` until calculation fix (#3181) (#3927)
traumschule Dec 12, 2022
b6a5d3e
🪢 Merge `main` into `dev` (#3986)
thesan Dec 19, 2022
aea293f
🧹 Fix/lint (#3988)
traumschule Dec 19, 2022
ab2e1c4
Settings: Chain info formatting + i18n (#2342) (#3987)
traumschule Dec 19, 2022
31a1067
Update README.md
dmtrjsg Dec 20, 2022
b9e887b
Fixed back link issue on opening with empty referrer (#3981)
vrrayz Dec 20, 2022
453787d
Fixed stake not displayed (#3982)
mkbeefcake Dec 20, 2022
5cccf6d
🙈 Do not version the root `package.json` (#3991)
thesan Dec 20, 2022
edc9453
Add InvitationLock tooltip on My Accounts (#3479) (#3878)
traumschule Dec 20, 2022
e11f9dc
Fix initial 'member.about' on `UpdateMembershipFormModal` (#3973) (#3…
traumschule Dec 21, 2022
2034b3e
Empty videoHints for now (#3971) (#3976)
traumschule Dec 21, 2022
846d2a1
Hide Languages tab (#3955) (#3964)
traumschule Dec 21, 2022
dd048e7
Update the change log for `1.1.0`
thesan Jan 2, 2023
4d8dee7
fix 2342 (#3989)
traumschule Jan 4, 2023
978b97a
Update the changelog and version
thesan Jan 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 33 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,36 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [1.1.0] - 2023-01-06

### Added
- Description in the forum category headers.
- Creation date/time on forum thread.
- Whitelist on proposal "closed" discussions.
- Invitation lock tooltip.

### Changed
- Renames "Own Stake" to "My Stake".

### Removed
- Language tab from settings.

### Fixed
- The edit membership about section.
- Stake info on announce candidacy sign-in modal.
- Back button on WG openings.
- Set Membership Lead Invitation Quota Proposal preview.
- Blockheight info labels (in the settings).
- Replaced/Removed some more lorem ipsum.
- Better prevent localstorage overwrites from the forum tread watchlist.
- The hire limit on single postion openings.
- The temporary "Insufficient balance to cover fee" message on the vesting claim modal.

## [1.0.1] - 2023-01-05

### Fixed
- Proposal view crashing due to high amounts of JOY

## [1.0.0] - 2022-12-16

### Added
Expand Down Expand Up @@ -40,6 +70,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.0.0...HEAD
[unreleased]: https://github.com/Joystream/pioneer/compare/v1.1.0...HEAD
[1.1.0]: https://github.com/Joystream/pioneer/compare/v1.0.1...v1.1.0
[1.0.1]: https://github.com/Joystream/pioneer/compare/v1.0.0...v1.0.1
[1.0.0]: https://github.com/Joystream/pioneer/compare/v0.1.1...v1.0.0
[0.1.1]: https://github.com/Joystream/pioneer/commits/v0.1.1
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ Governance application for the Joystream DAO platform.

## Deployed version

- The live production is available on [https://dao.joystream.org/](https://dao.joystream.org/)
- The preview build, deployed from the `dev` branch, is available on [https://pioneer-2.vercel.app/](https://pioneer-2.vercel.app/).
- The live production is available on [https://pioneerapp.xyz/)
- Components preview and testing from `dev` branch, is available on [https://pioneer-2-storybook.vercel.app/](https://pioneer-2-storybook.vercel.app/).

The deployed version can interact with two backends:
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "pioneer",
"private": true,
"version": "0.1.0",
"description": "Governance app for Joystream DAO",
"repository": "git@github.com:Joystream/pioneer.git",
"license": "GPL-3.0-only",
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.0.0",
"version": "1.1.0",
"license": "GPL-3.0-only",
"scripts": {
"build": "node --max_old_space_size=4096 ./build.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,22 @@ import { useGetMemberInvitedEventsQuery } from '@/memberships/queries'
import { LockItem } from '../LockItem'
import { LockDetailsProps } from '../types'

const tooltipLabel =
'Invitation lock can be spent on transaction fees and staking for proposals, voting and working groups applications. JOY tokens subject to this lock cannot be transferred to any other accounts. This lock is unrecoverable. NB: Transaction fees will first be taken from your transferable balance if it is positive.'

export const InvitationLockItem = ({ lock, address, isRecoverable }: LockDetailsProps) => {
const { data } = useGetMemberInvitedEventsQuery({ variables: { lockAccount: address } })
const eventData = data?.memberInvitedEvents[0]
const createdInEvent = eventData && asBlock(eventData)
const recoveryInfo = { unrecoverableLabel: 'Unrecoverable', tooltipLabel }

return (
<LockItem
lock={lock}
address={address}
isRecoverable={isRecoverable}
createdInEvent={createdInEvent}
lockRecovery={{ unrecoverableLabel: 'Unrecoverable' }}
lockRecovery={recoveryInfo}
/>
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export const ClaimVestingModal = () => {
<InputComponent
inputSize="l"
validation={canAfford ? undefined : 'invalid'}
message={canAfford ? '' : 'Insufficient balance to cover fee.'}
message={isReady ? (canAfford ? '' : 'Insufficient balance to cover fee.') : ''}
>
<SelectVestingAccount selected={selectedAccount} onChange={setSelectedAccount} />
</InputComponent>
Expand Down
7 changes: 6 additions & 1 deletion packages/ui/src/app/pages/Forum/ForumCategory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { Loading } from '@/common/components/Loading'
import { RowGapBlock } from '@/common/components/page/PageContent'
import { PageTitle } from '@/common/components/page/PageTitle'
import { PreviousPage } from '@/common/components/page/PreviousPage'
import { Label } from '@/common/components/typography'
import { Label, TextMedium } from '@/common/components/typography'
import { useModal } from '@/common/hooks/useModal'
import { useRefetchQueries } from '@/common/hooks/useRefetchQueries'
import { useSort } from '@/common/hooks/useSort'
Expand Down Expand Up @@ -73,6 +73,11 @@ export const ForumCategory = () => {
<PageTitle>{category.title}</PageTitle>
</PreviousPage>
}
description={
<TextMedium className="category-description" normalWeight inter lighter truncateLines={2}>
{category.description}
</TextMedium>
}
buttons={
<TransactionButton
style="primary"
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/app/pages/Forum/ForumThread.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export const ForumThread = () => {
{tag.title}
</BadgeStatus>
))}
<BlockTime block={thread.createdInBlock} />
<BlockTime block={thread.createdInBlock} layout="reverse" position="end" />
</BadgesRow>
</RowGapBlock>
</PageHeaderWrapper>
Expand Down
14 changes: 5 additions & 9 deletions packages/ui/src/app/pages/Settings/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const Settings = () => {
const [currentTab, setCurrentTab] = useState<Tab>('SETTINGS')
const tabs = [
{ title: t('network'), active: currentTab === 'SETTINGS', onClick: () => setCurrentTab('SETTINGS') },
{ title: t('language'), active: currentTab === 'LANGUAGE', onClick: () => setCurrentTab('LANGUAGE') },
//{ title: t('language'), active: currentTab === 'LANGUAGE', onClick: () => setCurrentTab('LANGUAGE') },
]
const switchNetwork = (network: NetworkType | null) => {
if (network) {
Expand All @@ -54,7 +54,7 @@ export const Settings = () => {
<MainPanel>
<RowGapBlock gap={32}>
<Tabs tabsSize="xs" tabs={tabs} />
{currentTab === 'LANGUAGE' && <LanguageSelect />}
{/**currentTab === 'LANGUAGE' && <LanguageSelect />**/}
{currentTab === 'SETTINGS' && (
<>
<SimpleSelect
Expand All @@ -81,17 +81,13 @@ export const Settings = () => {
<PolkadotAppInfo rpcUrl={endpoints.nodeRpcEndpoint} />
</>
)}
<SettingsInformation icon={<WarnedIcon />} title="Chain Informations">
<SettingsInformation icon={<WarnedIcon />} title={t('chainInfo')}>
<ColumnGapBlock gap={5}>
<TextMedium lighter bold>
RPC blockheight:{' '}
</TextMedium>
<TextMedium lighter>{t('rpcBlockheight')}</TextMedium>
<TextMedium lighter>{formatTokenValue(header?.number.toNumber())}</TextMedium>
</ColumnGapBlock>
<ColumnGapBlock gap={5}>
<TextMedium lighter bold>
QueryNode blockheight:{' '}
</TextMedium>
<TextMedium lighter>{t('qnBlockheight')}</TextMedium>
<TextMedium lighter>{formatTokenValue(queryNodeState?.indexerHead)}</TextMedium>
</ColumnGapBlock>
</SettingsInformation>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export const WorkingGroupOpening = () => {
header={
<PageHeaderWrapper>
<PageHeaderRow>
<PreviousPage>
<PreviousPage customLink={WorkingGroupsRoutes.openings}>
<PageTitle>{opening.title}</PageTitle>
</PreviousPage>
<ButtonsGroup>
Expand Down Expand Up @@ -156,7 +156,9 @@ export const WorkingGroupOpening = () => {
/>
<TokenValueStat
title="Minimal stake"
tooltipText="Minimal amount of tokens required to be staked for any applicant to such role."
tooltipText="Minimum tokens free of rivalrous locks required as application stake to this role."
tooltipLinkText="Learn more"
tooltipLinkURL="https://joystream.gitbook.io/testnet-workspace/system/working-groups#staking"
value={opening.stake}
/>
<ApplicationStats applicants={opening.applicants} hiring={opening.hiring} status={opening.status} />
Expand Down
7 changes: 5 additions & 2 deletions packages/ui/src/common/components/Tooltip/Tooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -301,13 +301,16 @@ export const TooltipLink = styled(Link)<{ to: string; target: string }>`
}
`

export const TooltipExternalLink = styled.a<{ href: string | undefined; target: string }>`
export const TooltipExternalLink = styled.a<{
href: string | undefined
target: string
}>`
display: grid;
grid-auto-flow: column;
grid-column-gap: 8px;
margin-top: 10px;
align-items: center;
width: fit-content;
margin-top: 10px;
font-size: 12px;
line-height: 18px;
font-weight: 400;
Expand Down
14 changes: 11 additions & 3 deletions packages/ui/src/common/components/page/PreviousPage.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { History } from 'history'
import React from 'react'
import { useHistory } from 'react-router-dom'
import styled from 'styled-components'
Expand All @@ -8,14 +9,21 @@ import { Arrow } from '../icons'
interface PreviousPageProps {
children?: React.ReactNode
showOverflow?: boolean
customLink?: string
}

export const PreviousPage = ({ children, showOverflow }: PreviousPageProps) => {
const setPrevHistory = (history: History<unknown>, customLink?: string) => {
if (history.action === 'POP' && customLink) {
history.push(customLink)
} else {
history.goBack()
}
}
export const PreviousPage = ({ children, showOverflow, customLink }: PreviousPageProps) => {
const history = useHistory()
return (
<PreviousPageBlock showOverflow={showOverflow}>
<PreviousPageButtonContainer>
<PreviousPageButton onClick={() => history.goBack()} size="small" square>
<PreviousPageButton onClick={() => setPrevHistory(history, customLink)} size="small" square>
<BackArrow direction="left" />
</PreviousPageButton>
</PreviousPageButtonContainer>
Expand Down
6 changes: 3 additions & 3 deletions packages/ui/src/common/constants/videoHints.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export type VideoHintType = 'workingGroups' | 'proposals' | 'council'

export const videoHints: { [key in VideoHintType]: string } = {
workingGroups: 'https://play.joystream.org/embedded/video/15',
proposals: 'https://play.joystream.org/embedded/video/15',
council: 'https://play.joystream.org/embedded/video/15',
workingGroups: '',
proposals: '',
council: '',
}
2 changes: 2 additions & 0 deletions packages/ui/src/common/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ export const wgListItemMappings = (value: string) => {
}
}
}

export const fileToDataUrl = (file: File) => {
return new Promise<string>((resolve, reject) => {
const reader = new FileReader()
Expand All @@ -109,6 +110,7 @@ export const fileToDataUrl = (file: File) => {
reader.readAsDataURL(file)
})
}

export const resizeImageFile = async (
file: File,
width: number,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ const args: CandidateVoteProps = {
candidateId: '1',
sumOfAllStakes: new BN(5000000),
totalStake: new BN(500000),
ownStake: new BN(32000),
votes: 20,
index: 1,
myStake: new BN(32000),
myVotes: [],
}
Default.args = args
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,26 @@ export interface CandidateVoteProps {
member: Member
sumOfAllStakes: BN
totalStake: BN
ownStake?: BN
votes: number
index: number
myVotes: MyCastVote[]
myStake?: BN
}

const AllRevealedButton = (
<ButtonPrimary size="medium" disabled>
Revealed
</ButtonPrimary>
)

export const CandidateVote = ({
candidateId,
member,
sumOfAllStakes,
totalStake,
ownStake,
votes,
index,
myStake,
myVotes,
}: CandidateVoteProps) => {
const { showModal } = useModal()
Expand All @@ -50,9 +56,11 @@ export const CandidateVote = ({
}, [showModal])

const roundedPercentage = totalStake.gt(BN_ZERO) ? sumOfAllStakes.muln(100).divRound(totalStake).toNumber() : 0
const hasOwnStake = ownStake && ownStake.gt(BN_ZERO)
const hasMyVotes = myVotes.length > 0
const userVoted = myVotes.length > 0
const allVotesRevealed = myVotes.every((vote) => vote.voteFor)

const RevealButton = <RevealVoteButton myVotes={myVotes} voteForHandle={member.handle} />

return (
<CandidateVoteWrapper onClick={showCandidate}>
<VoteIndex lighter inter>
Expand All @@ -74,11 +82,11 @@ export const CandidateVote = ({
</StatsValue>
</StakeAndVotesRow>
<StakeAndVotesRow>
{hasOwnStake && (
{myStake?.gt(BN_ZERO) && (
<>
<Subscription>My Stake</Subscription>
<StatsValue>
<TokenValue value={ownStake} />
<TokenValue value={myStake} />
</StatsValue>
</>
)}
Expand All @@ -91,16 +99,7 @@ export const CandidateVote = ({
</StakeAndVotesRow>
</StakeAndVotesGroup>
</VoteIndicatorWrapper>
<ButtonsGroup>
{hasMyVotes &&
(allVotesRevealed ? (
<ButtonPrimary size="medium" disabled>
Revealed
</ButtonPrimary>
) : (
<RevealVoteButton myVotes={myVotes} voteForHandle={member.handle} />
))}
</ButtonsGroup>
<ButtonsGroup>{userVoted && (allVotesRevealed ? AllRevealedButton : RevealButton)}</ButtonsGroup>
<CandidateCardArrow>
<Arrow direction="right" />
</CandidateCardArrow>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const RevealingStageVotes = ({ candidateWithVotes, totalStake, onlyMyVote
sumOfAllStakes: candidate.totalStake,
totalStake: totalStake ?? BN_ZERO,
votes: candidate.votesNumber,
ownStake: candidate.ownStake,
myStake: candidate.myStake,
myVotes: candidate.myVotes,
}))}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ export const PastElectionStats = ({
<StatisticItem title="Ended at">
{finishedAtBlock ? formatDateString(finishedAtBlock.timestamp) : '-'}
</StatisticItem>
<StatisticItem title="Election round" tooltipText="Lorem ipsum...">
<StatisticItem
title="Election round"
tooltipText="Ordinal number of the election round since the genesis block of the network."
tooltipLinkText="Learn more"
tooltipLinkURL="https://joystream.gitbook.io/testnet-workspace/system/council#election"
>
<TextHuge bold>{cycleId} round</TextHuge>
</StatisticItem>
<NumericValueStat title="Total candidates" value={totalCandidates} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ export const PastElectionTabs = ({ election }: PastElectionTabsProps) => {
revealed: !!myVote,
member: votingResult.candidate.member,
sumOfAllStakes: votingResult.totalStake,
ownStake: myVote ? myVote.stake : undefined,
totalStake: election.totalStake,
votes: votingResult.votes.length,
index: index + 1,
myVotes: [],
myStake: myVote?.stake,
}
})}
/>
Expand Down
Loading