-
Notifications
You must be signed in to change notification settings - Fork 70
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
Certain Proposal does not show gracing period in hours/blocks (#3903) #3959
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some tests need updating.
● ProposalPreview › Vote button › Member is a council member › Member has not voted yet
|
| Unable to find an element with the text: /Vote on Proposal/i. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
● ProposalPreview › Vote button › Member is a council member › Member has already voted
|
| Unable to find an element with the text: /Already voted/i. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
● ProposalPreview › "You voted for" section › Voted for rejecting
|
| Unable to find an element with the text: /You voted for:/i. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
@@ -2,6 +2,10 @@ import React, { useEffect, useMemo, useState } from 'react' | |||
import { useLocation } from 'react-router' | |||
import { useHistory, useParams } from 'react-router-dom' | |||
import styled from 'styled-components' | |||
import { TokenValueStat } from '@/common/components/statistics'// | |||
import { useRewardPeriod } from '@/working-groups/hooks/useRewardPeriod'// | |||
import { useOpening } from '@/working-groups/hooks/useOpening'// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove comments
import { TokenValueStat } from '@/common/components/statistics'// | ||
import { useRewardPeriod } from '@/working-groups/hooks/useRewardPeriod'// | ||
import { useOpening } from '@/working-groups/hooks/useOpening'// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import { TokenValueStat } from '@/common/components/statistics'// | |
import { useRewardPeriod } from '@/working-groups/hooks/useRewardPeriod'// | |
import { useOpening } from '@/working-groups/hooks/useOpening'// | |
import { TokenValueStat } from '@/common/components/statistics' | |
import { useRewardPeriod } from '@/working-groups/hooks/useRewardPeriod' | |
import { useOpening } from '@/working-groups/hooks/useOpening' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, you can just apply the suggestion, the rest looks good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
applied changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition is #3903 still happening ?
It's not urgent but could you add a test for it on the ProposalPreview
stories please ?
It would be nice to be able to the status with the args in these stories and infer the updates
the from it, instead of the current way of setting the parameters.statuses
. It would allow to quickly check most of the proposal preview the states (I'll try to do that when I get some time).
<TokenValueStat | ||
title={`Reward per ${rewardPeriod?.toString()} blocks`} | ||
value={rewardPeriod?.mul(opening.rewardPerBlock)} | ||
/> | ||
<TokenValueStat | ||
title="Minimal stake" | ||
tooltipText="Minimal amount of tokens required to be staked for any applicant to such role." | ||
value={opening.stake} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @chrlschwb I don't understand how does adding these statistics relates to #3903 ?
@@ -52,6 +56,9 @@ export const ProposalPreview = () => { | |||
const votingRounds = useVotingRounds(proposal?.votes, proposal?.proposalStatusUpdates) | |||
const [currentVotingRound, setVotingRound] = useState(0) | |||
|
|||
const { opening } = useOpening(urlParamToOpeningId(id))// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also this is wrong the url parameter is a proposal id not a opening id. As a result all proposal pages will show a 404. E.g: https://dao-git-fork-chrlschwb-fix-3903-gracingperiod-joystream.vercel.app/#/proposals/preview/606
fix #3903
Issue is that Set Membership Lead Invitation Quota Proposal does not show gracing period in hours/blocks.
Added the time counter part to
[pioneer\packages\ui\src\app\pages\Proposals\ProposalPreview.tsx]