From 957bd06d2044381ee5c822b02ec83d8223bfabb0 Mon Sep 17 00:00:00 2001 From: Joystream Stats Date: Fri, 21 Oct 2022 17:28:32 +0000 Subject: [PATCH 1/3] Update handbook links and tooltips (#2847) --- .../ui/src/app/pages/Election/Election.tsx | 4 ++-- .../ui/src/app/pages/Profile/MyAccounts.tsx | 16 +++++++++++++- .../pages/WorkingGroups/UpcomingOpening.tsx | 2 +- .../WorkingGroups/WorkingGroup/AboutTab.tsx | 2 +- .../WorkingGroup/OpeningsTab.tsx | 4 ++-- .../WorkingGroups/WorkingGroupsOpening.tsx | 6 +++++- .../pastCouncil/PastCouncilStats.tsx | 12 ++++++++++- .../ProposalList/ProposalListItem.tsx | 21 ++++++++++++++++--- 8 files changed, 55 insertions(+), 12 deletions(-) diff --git a/packages/ui/src/app/pages/Election/Election.tsx b/packages/ui/src/app/pages/Election/Election.tsx index cde7c7fae7..4ac869321c 100644 --- a/packages/ui/src/app/pages/Election/Election.tsx +++ b/packages/ui/src/app/pages/Election/Election.tsx @@ -97,7 +97,7 @@ export const Election = () => { Elections occur periodically, and each one has a sequence of stages referred to as the election cycle. Stages are: announcing period, voting period and revealing period.{' '} More details @@ -113,7 +113,7 @@ export const Election = () => { <> Remaining length of current period before the next one starts.{' '} Link diff --git a/packages/ui/src/app/pages/Profile/MyAccounts.tsx b/packages/ui/src/app/pages/Profile/MyAccounts.tsx index 28349a78d1..bc397c4b0b 100644 --- a/packages/ui/src/app/pages/Profile/MyAccounts.tsx +++ b/packages/ui/src/app/pages/Profile/MyAccounts.tsx @@ -57,7 +57,21 @@ export const MyAccounts = () => { } value={locked} /> - + + + Recoverable balance encapsulates all tokens that can be recovered, following the termination of + the process where they were previously staked. Example: Vote has been casted for a candidate in + council elections. That candidate lost the election and now the stake that was put behind the + voting power for such candidate can be recovered, meaning locked balance will be reduced by such + amount, while transferable balance will increase for the amount of staking lock. + {' '} + + } + value={recoverable} + /> {vestingTotal.gtn(0) && ( )} diff --git a/packages/ui/src/app/pages/WorkingGroups/UpcomingOpening.tsx b/packages/ui/src/app/pages/WorkingGroups/UpcomingOpening.tsx index a8365ab240..c0588c9bf6 100644 --- a/packages/ui/src/app/pages/WorkingGroups/UpcomingOpening.tsx +++ b/packages/ui/src/app/pages/WorkingGroups/UpcomingOpening.tsx @@ -45,7 +45,7 @@ export const UpcomingOpening = () => {

The opening hasn't started yet

- Lorem ipsum dolor sit amet.Lorem ipsum dolor sit amet. + This opening becomes available for applications when at the set block.
)) diff --git a/packages/ui/src/app/pages/WorkingGroups/WorkingGroup/AboutTab.tsx b/packages/ui/src/app/pages/WorkingGroups/WorkingGroup/AboutTab.tsx index a573acd0ab..e6394c7cb3 100644 --- a/packages/ui/src/app/pages/WorkingGroups/WorkingGroup/AboutTab.tsx +++ b/packages/ui/src/app/pages/WorkingGroups/WorkingGroup/AboutTab.tsx @@ -27,7 +27,7 @@ export const AboutTab = ({ workingGroup }: Props) => { {statistics.spending ? ( ) : ( diff --git a/packages/ui/src/app/pages/WorkingGroups/WorkingGroup/OpeningsTab.tsx b/packages/ui/src/app/pages/WorkingGroups/WorkingGroup/OpeningsTab.tsx index 2e38ed3873..ce9927ed69 100644 --- a/packages/ui/src/app/pages/WorkingGroups/WorkingGroup/OpeningsTab.tsx +++ b/packages/ui/src/app/pages/WorkingGroups/WorkingGroup/OpeningsTab.tsx @@ -35,7 +35,7 @@ export const OpeningsTab = ({ workingGroup }: Props) => { The budget is the root resource pool for all token minting in the working group, and the size of the pool is denoted by budget. Link @@ -55,7 +55,7 @@ export const OpeningsTab = ({ workingGroup }: Props) => { <> Average stake size by members undertaking the roles of workers and the lead in this group.{' '} Link diff --git a/packages/ui/src/app/pages/WorkingGroups/WorkingGroupsOpening.tsx b/packages/ui/src/app/pages/WorkingGroups/WorkingGroupsOpening.tsx index 0a73ea9bf3..7773bb1d74 100644 --- a/packages/ui/src/app/pages/WorkingGroups/WorkingGroupsOpening.tsx +++ b/packages/ui/src/app/pages/WorkingGroups/WorkingGroupsOpening.tsx @@ -153,7 +153,11 @@ export const WorkingGroupOpening = () => { title={`Reward per ${rewardPeriod?.toString()} blocks`} value={rewardPeriod?.mul(opening.rewardPerBlock)} /> - + diff --git a/packages/ui/src/council/components/pastCouncil/PastCouncilStats.tsx b/packages/ui/src/council/components/pastCouncil/PastCouncilStats.tsx index a9b3f1450a..a7c7392cb3 100644 --- a/packages/ui/src/council/components/pastCouncil/PastCouncilStats.tsx +++ b/packages/ui/src/council/components/pastCouncil/PastCouncilStats.tsx @@ -28,7 +28,17 @@ export const PastCouncilStats = ({ + Total rewards missed. Missed rewards are unallocated rewards from the council budget.{' '} + + Learn more + + + } /> {camelCaseToText(proposal.status)} - + + {checkStatus()}{' '} + + Learn more + + + } + > From 121c00b6dec2db7ae3d6ae68b96a2078f3969700 Mon Sep 17 00:00:00 2001 From: Joystream Stats Date: Tue, 25 Oct 2022 02:00:48 +0000 Subject: [PATCH 2/3] use tooltipLinkURL --- .../ui/src/app/pages/Election/Election.tsx | 28 +++--------------- .../ui/src/app/pages/Profile/MyAccounts.tsx | 29 +++---------------- .../WorkingGroup/OpeningsTab.tsx | 28 +++--------------- 3 files changed, 12 insertions(+), 73 deletions(-) diff --git a/packages/ui/src/app/pages/Election/Election.tsx b/packages/ui/src/app/pages/Election/Election.tsx index 4ac869321c..cc2696e2e1 100644 --- a/packages/ui/src/app/pages/Election/Election.tsx +++ b/packages/ui/src/app/pages/Election/Election.tsx @@ -9,7 +9,6 @@ import { Loading } from '@/common/components/Loading' import { MainPanel } from '@/common/components/page/PageContent' import { PageTitle } from '@/common/components/page/PageTitle' import { BlockDurationStatistics, StatisticItem, Statistics } from '@/common/components/statistics' -import { TooltipExternalLink } from '@/common/components/Tooltip' import { TextHuge, TextMedium } from '@/common/components/typography' import { camelCaseToText } from '@/common/helpers' import { useRefetchQueries } from '@/common/hooks/useRefetchQueries' @@ -92,35 +91,16 @@ export const Election = () => { - Elections occur periodically, and each one has a sequence of stages referred to as the election cycle. - Stages are: announcing period, voting period and revealing period.{' '} - - More details - - - } + tooltipText="Elections occur periodically. Each has a sequence of stages referred to as the election cycle. Stages are: announcing period, voting period and revealing period." + tooltipLinkURL="https://joystream.gitbook.io/testnet-workspace/system/council?q=lock#election" > {camelCaseToText(electionStage)} Period - Remaining length of current period before the next one starts.{' '} - - Link - - - } value={remainingPeriod} + tooltipText="Remaining length of current period before the next one starts." + tooltipLinkURL="https://joystream.gitbook.io/testnet-workspace/system/council?q=lock#election" /> { /> - - Staking, or bonding, is the act of locking up funds under some terms so that they are not - transferable and otherwise not entirely usable as they otherwise would be. The terms, referred to - as unstaking terms describe the circumstances under which the funds may begin to cease being - staked. The way staking is implemented is with the use of account{' '} - - locks - - {' '} - - } + tooltipText="Staking, or bonding, is the act of locking up funds under some terms so that they are not transferable and otherwise not entirely usable as they otherwise would be. The terms, referred to as unstaking terms describe the circumstances under which the funds may begin to cease being staked. The way staking is implemented is with the use of account." + tooltipLinkURL="https://joystream.gitbook.io/joystream-handbook/key-concepts/staking#locks" value={locked} /> - - Recoverable balance encapsulates all tokens that can be recovered, following the termination of - the process where they were previously staked. Example: Vote has been casted for a candidate in - council elections. That candidate lost the election and now the stake that was put behind the - voting power for such candidate can be recovered, meaning locked balance will be reduced by such - amount, while transferable balance will increase for the amount of staking lock. - {' '} - - } + tooltipText="Recoverable balance encapsulates all tokens that can be recovered, following the termination of the process where they were previously staked. Example: Vote has been casted for a candidate in council elections. That candidate lost the election and now the stake that was put behind the voting power for such candidate can be recovered, meaning locked balance will be reduced by such amount, while transferable balance will increase for the amount of staking lock." value={recoverable} /> {vestingTotal.gtn(0) && ( @@ -81,7 +60,7 @@ export const MyAccounts = () => { {vestingTotal.gtn(0) && ( diff --git a/packages/ui/src/app/pages/WorkingGroups/WorkingGroup/OpeningsTab.tsx b/packages/ui/src/app/pages/WorkingGroups/WorkingGroup/OpeningsTab.tsx index ce9927ed69..2bc6509271 100644 --- a/packages/ui/src/app/pages/WorkingGroups/WorkingGroup/OpeningsTab.tsx +++ b/packages/ui/src/app/pages/WorkingGroups/WorkingGroup/OpeningsTab.tsx @@ -6,7 +6,6 @@ import { LinkSymbol } from '@/common/components/icons/symbols' import { MainPanel } from '@/common/components/page/PageContent' import { SidePanel } from '@/common/components/page/SidePanel' import { Statistics, TokenValueStat } from '@/common/components/statistics' -import { TooltipExternalLink } from '@/common/components/Tooltip' import { Label, TextMedium } from '@/common/components/typography' import { LoadingOpenings } from '@/working-groups/components/OpeningsList' import { WorkersList } from '@/working-groups/components/WorkersList' @@ -30,18 +29,8 @@ export const OpeningsTab = ({ workingGroup }: Props) => { - The budget is the root resource pool for all token minting in the working group, and the size of the pool - is denoted by budget. - - Link - - - } + tooltipText="The budget is the root resource pool for all token minting in the working group, and the size of the pool is denoted by budget." + tooltipLinkURL="https://joystream.gitbook.io/testnet-workspace/system/working-groups?q=lock#concepts" value={workingGroup.budget} /> { /> - Average stake size by members undertaking the roles of workers and the lead in this group.{' '} - - Link - - - } value={workingGroup.averageStake} + tooltipText="Average stake size by members undertaking the roles of workers and the lead in this group." + tooltipLinkURL="https://joystream.gitbook.io/testnet-workspace/system/working-groups?q=lock#concepts" /> From f1f2f35b75c9810cff06e28c27055811e651c408 Mon Sep 17 00:00:00 2001 From: Joystream Stats Date: Tue, 25 Oct 2022 03:08:33 +0000 Subject: [PATCH 3/3] dito --- .../pastCouncil/PastCouncilStats.tsx | 30 +++---------------- .../ProposalList/ProposalListItem.tsx | 15 ++-------- 2 files changed, 7 insertions(+), 38 deletions(-) diff --git a/packages/ui/src/council/components/pastCouncil/PastCouncilStats.tsx b/packages/ui/src/council/components/pastCouncil/PastCouncilStats.tsx index a7c7392cb3..9e22682ee2 100644 --- a/packages/ui/src/council/components/pastCouncil/PastCouncilStats.tsx +++ b/packages/ui/src/council/components/pastCouncil/PastCouncilStats.tsx @@ -1,10 +1,7 @@ import BN from 'bn.js' import React from 'react' -import { LinkSymbol } from '@/common/components/icons/symbols' import { Statistics, TokenValueStat } from '@/common/components/statistics' -import { TooltipExternalLink } from '@/common/components/Tooltip' -import { TextMedium } from '@/common/components/typography' interface PastCouncilStatsProps { totalSpent: BN @@ -28,17 +25,8 @@ export const PastCouncilStats = ({ - Total rewards missed. Missed rewards are unallocated rewards from the council budget.{' '} - - Learn more - - - } + tooltipText="Total rewards missed. Missed rewards are unallocated rewards from the council budget." + tooltipLinkURL="https://joystream.gitbook.io/testnet-workspace/system/council?q=lock#budget" /> - Total council budget spent on proposals, including funding proposals. More details on proposals spending can - be found in the Overview module{' '} - - Link - - - } + tooltipText="Total council budget spent on proposals, including funding proposals. More details on proposals spending can be found in the Overview module." + tooltipLinkURL="https://joystream.gitbook.io/joystream-handbook/governance/council#council" /> ) diff --git a/packages/ui/src/proposals/components/ProposalList/ProposalListItem.tsx b/packages/ui/src/proposals/components/ProposalList/ProposalListItem.tsx index c0ab09a371..6e04d27f6f 100644 --- a/packages/ui/src/proposals/components/ProposalList/ProposalListItem.tsx +++ b/packages/ui/src/proposals/components/ProposalList/ProposalListItem.tsx @@ -8,7 +8,7 @@ import { LinkIcon } from '@/common/components/icons' import { LinkSymbol } from '@/common/components/icons/symbols' import { TableListItem } from '@/common/components/List' import { GhostRouterLink } from '@/common/components/RouterLink' -import { Tooltip, TooltipDefault, TooltipExternalLink } from '@/common/components/Tooltip' +import { Tooltip, TooltipDefault } from '@/common/components/Tooltip' import { Subscription } from '@/common/components/typography/Subscription' import { TextSmall, TextMedium } from '@/common/components/typography/Text' import { Colors, Overflow } from '@/common/constants' @@ -78,17 +78,8 @@ export const ProposalListItem = ({ proposal, isPast, memberId, isCouncilMember } {camelCaseToText(proposal.status)} - {checkStatus()}{' '} - - Learn more - - - } + tooltipText={checkStatus()} + tooltipLinkURL="https://joystream.gitbook.io/testnet-workspace/system/proposal-system?q=lock#proposal" >