;
@@ -35,6 +36,7 @@ export const ProposalsList = ({
protocolUpgradeProposals,
lastBlockHeight,
}: ProposalsListProps) => {
+ const { VEGA_DOCS_URL } = useEnvironment();
const { t } = useTranslation();
const [filterString, setFilterString] = useState('');
const sortedProposals = proposals.reduce(
@@ -81,15 +83,18 @@ export const ProposalsList = ({
marginBottom={false}
title={t('pageTitleProposals')}
/>
-
-
-
+ {VEGA_DOCS_URL && (
+
+
+
+
+
+ )}
{t(
diff --git a/apps/governance/src/routes/proposals/propose/freeform/propose-freeform.spec.tsx b/apps/governance/src/routes/proposals/propose/freeform/propose-freeform.spec.tsx
index 4f206e056..9371840c3 100644
--- a/apps/governance/src/routes/proposals/propose/freeform/propose-freeform.spec.tsx
+++ b/apps/governance/src/routes/proposals/propose/freeform/propose-freeform.spec.tsx
@@ -108,7 +108,7 @@ describe('Propose Freeform', () => {
expect(screen.getByTestId('proposal-title')).toBeTruthy();
expect(screen.getByTestId('proposal-description')).toBeTruthy();
expect(screen.getByTestId('proposal-vote-deadline')).toBeTruthy();
- expect(screen.getByTestId('proposal-submit')).toBeTruthy();
+
expect(screen.getByTestId('proposal-download-json')).toBeTruthy();
expect(screen.getByTestId('proposal-transaction-dialog')).toBeTruthy();
});
diff --git a/apps/governance/src/routes/proposals/propose/freeform/propose-freeform.tsx b/apps/governance/src/routes/proposals/propose/freeform/propose-freeform.tsx
index 7e4574746..58eb2a537 100644
--- a/apps/governance/src/routes/proposals/propose/freeform/propose-freeform.tsx
+++ b/apps/governance/src/routes/proposals/propose/freeform/propose-freeform.tsx
@@ -9,7 +9,6 @@ import { useEnvironment } from '@vegaprotocol/environment';
import {
ProposalFormDescription,
ProposalFormSubheader,
- ProposalFormSubmit,
ProposalFormTitle,
ProposalFormTransactionDialog,
ProposalFormDownloadJson,
@@ -48,7 +47,7 @@ export const ProposeFreeform = () => {
const {
register,
handleSubmit,
- formState: { isSubmitting, errors },
+ formState: { errors },
setValue,
watch,
} = useForm();
@@ -165,7 +164,6 @@ export const ProposeFreeform = () => {
voteMaxClose={params.governance_proposal_freeform_maxClose}
/>
-
{
expect(screen.getByTestId('proposal-description')).toBeTruthy();
expect(screen.getByTestId('proposal-vote-deadline')).toBeTruthy();
expect(screen.getByTestId('proposal-enactment-deadline')).toBeTruthy();
- expect(screen.getByTestId('proposal-submit')).toBeTruthy();
+
expect(screen.getByTestId('proposal-download-json')).toBeTruthy();
expect(screen.getByTestId('proposal-transaction-dialog')).toBeTruthy();
});
diff --git a/apps/governance/src/routes/proposals/propose/network-parameter/propose-network-parameter.tsx b/apps/governance/src/routes/proposals/propose/network-parameter/propose-network-parameter.tsx
index b13a47085..4f45ee549 100644
--- a/apps/governance/src/routes/proposals/propose/network-parameter/propose-network-parameter.tsx
+++ b/apps/governance/src/routes/proposals/propose/network-parameter/propose-network-parameter.tsx
@@ -16,7 +16,6 @@ import { useEnvironment } from '@vegaprotocol/environment';
import {
ProposalFormDescription,
ProposalFormSubheader,
- ProposalFormSubmit,
ProposalFormTitle,
ProposalFormTransactionDialog,
ProposalFormVoteAndEnactmentDeadline,
@@ -90,7 +89,7 @@ export const ProposeNetworkParameter = () => {
const {
register,
handleSubmit,
- formState: { isSubmitting, errors },
+ formState: { errors },
setValue,
watch,
} = useForm();
@@ -310,7 +309,6 @@ export const ProposeNetworkParameter = () => {
}
/>
-
{
expect(screen.getByTestId('proposal-vote-deadline')).toBeTruthy();
expect(screen.getByTestId('proposal-validation-deadline')).toBeTruthy();
expect(screen.getByTestId('proposal-enactment-deadline')).toBeTruthy();
- expect(screen.getByTestId('proposal-submit')).toBeTruthy();
+
expect(screen.getByTestId('proposal-download-json')).toBeTruthy();
expect(screen.getByTestId('proposal-transaction-dialog')).toBeTruthy();
});
diff --git a/apps/governance/src/routes/proposals/propose/new-asset/propose-new-asset.tsx b/apps/governance/src/routes/proposals/propose/new-asset/propose-new-asset.tsx
index cf621bf2d..c95551e68 100644
--- a/apps/governance/src/routes/proposals/propose/new-asset/propose-new-asset.tsx
+++ b/apps/governance/src/routes/proposals/propose/new-asset/propose-new-asset.tsx
@@ -16,7 +16,6 @@ import {
import {
ProposalFormDescription,
ProposalFormSubheader,
- ProposalFormSubmit,
ProposalFormTerms,
ProposalFormTitle,
ProposalFormTransactionDialog,
@@ -59,7 +58,7 @@ export const ProposeNewAsset = () => {
const {
register,
handleSubmit,
- formState: { isSubmitting, errors },
+ formState: { errors },
setValue,
watch,
} = useForm();
@@ -226,7 +225,6 @@ export const ProposeNewAsset = () => {
}
/>
-
{
expect(screen.getByTestId('proposal-terms')).toBeTruthy();
expect(screen.getByTestId('proposal-vote-deadline')).toBeTruthy();
expect(screen.getByTestId('proposal-enactment-deadline')).toBeTruthy();
- expect(screen.getByTestId('proposal-submit')).toBeTruthy();
+
expect(screen.getByTestId('proposal-download-json')).toBeTruthy();
expect(screen.getByTestId('proposal-transaction-dialog')).toBeTruthy();
});
diff --git a/apps/governance/src/routes/proposals/propose/new-market/propose-new-market.tsx b/apps/governance/src/routes/proposals/propose/new-market/propose-new-market.tsx
index 013c444ca..181b6e449 100644
--- a/apps/governance/src/routes/proposals/propose/new-market/propose-new-market.tsx
+++ b/apps/governance/src/routes/proposals/propose/new-market/propose-new-market.tsx
@@ -15,7 +15,6 @@ import {
import {
ProposalFormDescription,
ProposalFormSubheader,
- ProposalFormSubmit,
ProposalFormTerms,
ProposalFormTitle,
ProposalFormTransactionDialog,
@@ -57,7 +56,7 @@ export const ProposeNewMarket = () => {
const {
register,
handleSubmit,
- formState: { isSubmitting, errors },
+ formState: { errors },
setValue,
watch,
} = useForm();
@@ -208,7 +207,6 @@ export const ProposeNewMarket = () => {
enactmentMaxClose={params.governance_proposal_market_maxEnact}
/>
-
{
expect(baseElement).toBeTruthy();
});
- it('should render the heading, proposal type question and options', () => {
+ it('should render the heading, proposals title and options', () => {
renderComponent();
expect(
- screen.getByText('What type of proposal would you like to make?')
+ screen.getByText('Create proposal and download JSON to share')
).toBeTruthy();
expect(screen.getByText('Network parameter')).toBeTruthy();
expect(screen.getByText('New market')).toBeTruthy();
@@ -26,6 +26,9 @@ describe('Propose', () => {
expect(screen.getByText('New asset')).toBeTruthy();
expect(screen.getByText('Update asset')).toBeTruthy();
expect(screen.getByText('Freeform')).toBeTruthy();
- expect(screen.getByText('Let me choose (raw proposal)')).toBeTruthy();
+ expect(
+ screen.getByText('Submit an agreed proposal from the forum')
+ ).toBeTruthy();
+ expect(screen.getByText('Submit agreed raw proposal')).toBeTruthy();
});
});
diff --git a/apps/governance/src/routes/proposals/propose/propose.tsx b/apps/governance/src/routes/proposals/propose/propose.tsx
index 45a8d1cc5..832fd8473 100644
--- a/apps/governance/src/routes/proposals/propose/propose.tsx
+++ b/apps/governance/src/routes/proposals/propose/propose.tsx
@@ -39,8 +39,8 @@ export const Propose = () => {
- {t('ProposalTypeQuestion')}
-
>
);
diff --git a/apps/governance/src/routes/proposals/propose/raw/propose-raw.tsx b/apps/governance/src/routes/proposals/propose/raw/propose-raw.tsx
index 7b0fd7004..62d0bbfb0 100644
--- a/apps/governance/src/routes/proposals/propose/raw/propose-raw.tsx
+++ b/apps/governance/src/routes/proposals/propose/raw/propose-raw.tsx
@@ -18,10 +18,8 @@ import { useProposalSubmit } from '@vegaprotocol/proposals';
import {
ProposalFormSubmit,
ProposalFormTransactionDialog,
- ProposalFormDownloadJson,
} from '../../components/propose';
import { ProposalRawMinRequirements } from './proposal-raw-min-requirements';
-import { downloadJson } from '../../../../lib/download-json';
export interface RawProposalFormFields {
rawProposalData: string;
@@ -47,7 +45,6 @@ export const ProposeRaw = () => {
register,
handleSubmit,
formState: { isSubmitting, errors },
- watch,
} = useForm();
const { finalizedProposal, submit, Dialog } = useProposalSubmit();
@@ -57,11 +54,6 @@ export const ProposeRaw = () => {
await submit(JSON.parse(fields.rawProposalData));
};
- const viewJson = () => {
- const formData = watch();
- downloadJson(JSON.stringify(formData), 'vega-raw-proposal');
- };
-
return (
{
)}
-
{
expect(screen.getByTestId('proposal-terms')).toBeTruthy();
expect(screen.getByTestId('proposal-vote-deadline')).toBeTruthy();
expect(screen.getByTestId('proposal-enactment-deadline')).toBeTruthy();
- expect(screen.getByTestId('proposal-submit')).toBeTruthy();
+
expect(screen.getByTestId('proposal-download-json')).toBeTruthy();
expect(screen.getByTestId('proposal-transaction-dialog')).toBeTruthy();
});
diff --git a/apps/governance/src/routes/proposals/propose/update-asset/propose-update-asset.tsx b/apps/governance/src/routes/proposals/propose/update-asset/propose-update-asset.tsx
index 0bbed4234..5ce192e02 100644
--- a/apps/governance/src/routes/proposals/propose/update-asset/propose-update-asset.tsx
+++ b/apps/governance/src/routes/proposals/propose/update-asset/propose-update-asset.tsx
@@ -15,7 +15,6 @@ import {
import {
ProposalFormDescription,
ProposalFormSubheader,
- ProposalFormSubmit,
ProposalFormTerms,
ProposalFormTitle,
ProposalFormTransactionDialog,
@@ -57,7 +56,7 @@ export const ProposeUpdateAsset = () => {
const {
register,
handleSubmit,
- formState: { isSubmitting, errors },
+ formState: { errors },
setValue,
watch,
} = useForm();
@@ -212,7 +211,6 @@ export const ProposeUpdateAsset = () => {
}
/>
-
{
expect(screen.getByTestId('proposal-terms')).toBeTruthy();
expect(screen.getByTestId('proposal-vote-deadline')).toBeTruthy();
expect(screen.getByTestId('proposal-enactment-deadline')).toBeTruthy();
- expect(screen.getByTestId('proposal-submit')).toBeTruthy();
+
expect(screen.getByTestId('proposal-download-json')).toBeTruthy();
expect(screen.getByTestId('proposal-transaction-dialog')).toBeTruthy();
});
diff --git a/apps/governance/src/routes/proposals/propose/update-market/propose-update-market.tsx b/apps/governance/src/routes/proposals/propose/update-market/propose-update-market.tsx
index 4d1bbd1b8..0242e2b88 100644
--- a/apps/governance/src/routes/proposals/propose/update-market/propose-update-market.tsx
+++ b/apps/governance/src/routes/proposals/propose/update-market/propose-update-market.tsx
@@ -17,7 +17,6 @@ import {
ProposalFormDescription,
ProposalFormDownloadJson,
ProposalFormSubheader,
- ProposalFormSubmit,
ProposalFormTerms,
ProposalFormTitle,
ProposalFormTransactionDialog,
@@ -104,7 +103,7 @@ export const ProposeUpdateMarket = () => {
const {
register,
handleSubmit,
- formState: { isSubmitting, errors },
+ formState: { errors },
setValue,
watch,
} = useForm();
@@ -317,7 +316,6 @@ export const ProposeUpdateMarket = () => {
}
/>
-