diff --git a/CHANGELOG.md b/CHANGELOG.md index a08c9e4e2..4989a57c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,13 +16,37 @@ changes. ### Fixed +- + +### Changed + +- + +### Removed + +- + +## [v2.0.11](https://github.com/IntersectMBO/govtool/releases/tag/v2.0.11) 2025-02-04 + +### Added + +- + +### Fixed + - Fix displaying DRep with doNotList property as string - Handle exception when no index is provided to /proposal/get endpoint [Issue 1841](https://github.com/IntersectMBO/govtool/issues/1841) - Fix displaying vote pill on voted on cards +- Fix incorrect link to learn more about direct voters [Issue 2647](https://github.com/IntersectMBO/govtool/issues/2647) +- Fix missing No DRep found message on DRep Directory [Issue 2889](https://github.com/IntersectMBO/govtool/issues/2889) +- Fix displaying givenName placeholder instead of actual value on DRep card [Issue 2888](https://github.com/IntersectMBO/govtool/issues/2888) +- Fix executing insertBefore on undefined node [Issue 2878](https://github.com/IntersectMBO/govtool/issues/2878) ### Changed - Change votes representation on Governance Actions [Issue 2880](https://github.com/IntersectMBO/govtool/issues/2880) +- Change vote rationale character limit to 10000 [Issue 2891](https://github.com/IntersectMBO/govtool/issues/2891) +- Move ratification threshold label below the voter type [Issue 2893](https://github.com/IntersectMBO/govtool/issues/2893) ### Removed @@ -79,6 +103,7 @@ changes. - Fix usage of trim on missing label - Fix blank screen when registering as a DRep [Issue 2408](https://github.com/IntersectMBO/govtool/issues/2408) - Fix type mismatch between sql and haskell code for stake key address +- Handle missing api key exception [Issue 2683](https://github.com/IntersectMBO/govtool/issues/2683) ### Changed diff --git a/govtool/backend/Dockerfile b/govtool/backend/Dockerfile index dbae88e52..ceab1adc1 100644 --- a/govtool/backend/Dockerfile +++ b/govtool/backend/Dockerfile @@ -4,4 +4,4 @@ FROM $BASE_IMAGE_REPO:$BASE_IMAGE_TAG WORKDIR /src COPY . . RUN cabal build -RUN cp dist-newstyle/build/x86_64-linux/ghc-9.2.7/vva-be-2.0.10/x/vva-be/build/vva-be/vva-be /usr/local/bin +RUN cp dist-newstyle/build/x86_64-linux/ghc-9.2.7/vva-be-2.0.11/x/vva-be/build/vva-be/vva-be /usr/local/bin diff --git a/govtool/backend/Dockerfile.qovery b/govtool/backend/Dockerfile.qovery index d58de4f70..026ec4d56 100644 --- a/govtool/backend/Dockerfile.qovery +++ b/govtool/backend/Dockerfile.qovery @@ -4,7 +4,7 @@ FROM $BASE_IMAGE_REPO:$BASE_IMAGE_TAG WORKDIR /src COPY . . RUN cabal build -RUN cp dist-newstyle/build/x86_64-linux/ghc-9.2.7/vva-be-2.0.10/x/vva-be/build/vva-be/vva-be /usr/local/bin +RUN cp dist-newstyle/build/x86_64-linux/ghc-9.2.7/vva-be-2.0.11/x/vva-be/build/vva-be/vva-be /usr/local/bin # Expose the necessary port EXPOSE 9876 diff --git a/govtool/backend/vva-be.cabal b/govtool/backend/vva-be.cabal index 2f05a3d46..b4e68cd67 100644 --- a/govtool/backend/vva-be.cabal +++ b/govtool/backend/vva-be.cabal @@ -1,6 +1,6 @@ cabal-version: 3.6 name: vva-be -version: 2.0.10 +version: 2.0.11 -- A short (one-line) description of the package. -- synopsis: diff --git a/govtool/frontend/index.html b/govtool/frontend/index.html index f35c02b74..16173bfe2 100644 --- a/govtool/frontend/index.html +++ b/govtool/frontend/index.html @@ -42,7 +42,11 @@ s = d.getElementsByTagName("script")[0]; g.async = true; g.src = u + "matomo.js"; - s.parentNode.insertBefore(g, s); + if (s && s.parentNode) { + s.parentNode.insertBefore(g, s); + } else { + d.head.appendChild(g); + } })();
diff --git a/govtool/frontend/package-lock.json b/govtool/frontend/package-lock.json index 5cb32afd1..6bdf01c7d 100644 --- a/govtool/frontend/package-lock.json +++ b/govtool/frontend/package-lock.json @@ -1,12 +1,12 @@ { "name": "@govtool/frontend", - "version": "2.0.10", + "version": "2.0.11", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@govtool/frontend", - "version": "2.0.10", + "version": "2.0.11", "hasInstallScript": true, "dependencies": { "@emotion/react": "^11.11.1", diff --git a/govtool/frontend/package.json b/govtool/frontend/package.json index ce8e9df09..ad0c21fde 100644 --- a/govtool/frontend/package.json +++ b/govtool/frontend/package.json @@ -1,7 +1,7 @@ { "name": "@govtool/frontend", "private": true, - "version": "2.0.10", + "version": "2.0.11", "type": "module", "scripts": { "build": "vite build", diff --git a/govtool/frontend/src/components/molecules/VotesSubmitted.tsx b/govtool/frontend/src/components/molecules/VotesSubmitted.tsx index de4a64c12..50109c3b6 100644 --- a/govtool/frontend/src/components/molecules/VotesSubmitted.tsx +++ b/govtool/frontend/src/components/molecules/VotesSubmitted.tsx @@ -226,27 +226,6 @@ const VotesGroup = ({ > {t(`govActions.${type}`)} - - - - {typeof notVotedVotes === "number" && ( - - )} {threshold !== undefined && threshold !== null && ( )} + + + + {typeof notVotedVotes === "number" && ( + + )} ); }; diff --git a/govtool/frontend/src/components/organisms/DashboardCards/DRepDashboardCard.tsx b/govtool/frontend/src/components/organisms/DashboardCards/DRepDashboardCard.tsx index bd9908734..f993f8595 100644 --- a/govtool/frontend/src/components/organisms/DashboardCards/DRepDashboardCard.tsx +++ b/govtool/frontend/src/components/organisms/DashboardCards/DRepDashboardCard.tsx @@ -66,7 +66,7 @@ export const DRepDashboardCard = ({ i18nKey="dashboard.cards.drep.retirementInProgressWithGivenName" values={{ deposit: correctAdaFormat(voter?.deposit), - name: voter?.givenName, + givenName: voter?.givenName, }} /> ) : ( @@ -140,7 +140,7 @@ export const DRepDashboardCard = ({ description: voter?.givenName ? ( ) : ( diff --git a/govtool/frontend/src/components/organisms/VoteContext/VoteContextText.tsx b/govtool/frontend/src/components/organisms/VoteContext/VoteContextText.tsx index 3ac7117e2..066e9a5ad 100644 --- a/govtool/frontend/src/components/organisms/VoteContext/VoteContextText.tsx +++ b/govtool/frontend/src/components/organisms/VoteContext/VoteContextText.tsx @@ -10,6 +10,7 @@ type VoteContextTextProps = { setStep: Dispatch>; onCancel: () => void; }; +const MAX_LENGTH = 10000; export const VoteContextText = ({ setStep, @@ -31,9 +32,9 @@ export const VoteContextText = ({ message: t("createGovernanceAction.fields.validations.required"), }, maxLength: { - value: 500, + value: MAX_LENGTH, message: t("createGovernanceAction.fields.validations.maxLength", { - maxLength: 500, + maxLength: MAX_LENGTH, }), }, }, @@ -64,13 +65,13 @@ export const VoteContextText = ({ {t("govActions.provideContextAboutYourVote")} - {/* TODO: Update text when design is finalised */} - Additional information about your vote + {t("govActions.additionalInformationAboutYourVote")} diff --git a/govtool/frontend/src/context/usersnapContext.tsx b/govtool/frontend/src/context/usersnapContext.tsx index 55ea92831..2b8643f0f 100644 --- a/govtool/frontend/src/context/usersnapContext.tsx +++ b/govtool/frontend/src/context/usersnapContext.tsx @@ -73,11 +73,19 @@ export const UsersnapProvider = ({ }, [usersnapApi]); useEffect(() => { - loadSpace(API_KEY).then((api) => { - api.init(initParams); - setUsersnapApi(api); - }); - }, [initParams]); + const initUsersnapSpace = async () => { + if (API_KEY) { + try { + const api = await loadSpace(API_KEY); + api.init(initParams); + setUsersnapApi(api); + } catch (error) { + console.error(error); + } + } + }; + initUsersnapSpace(); + }, [initParams, API_KEY]); const value = useMemo(() => ({ openFeedbackWindow }), [openFeedbackWindow]); diff --git a/govtool/frontend/src/i18n/locales/en.json b/govtool/frontend/src/i18n/locales/en.json index 9d7cd33cd..370a74adf 100644 --- a/govtool/frontend/src/i18n/locales/en.json +++ b/govtool/frontend/src/i18n/locales/en.json @@ -394,6 +394,7 @@ "optional": "(optional)", "provideContext": "Provide context", "provideContextAboutYourVote": "Provide context about your vote", + "additionalInformationAboutYourVote": "Additional information about your vote", "provideNewContextAboutYourVote": "Provide new context about your vote", "rationale": "Rationale", "seeExternalData": "See external data", diff --git a/govtool/frontend/src/pages/DRepDirectoryContent.tsx b/govtool/frontend/src/pages/DRepDirectoryContent.tsx index 432438347..7bcc2199d 100644 --- a/govtool/frontend/src/pages/DRepDirectoryContent.tsx +++ b/govtool/frontend/src/pages/DRepDirectoryContent.tsx @@ -217,7 +217,7 @@ export const DRepDirectoryContent: FC = ({ flex: 1, }} > - {dRepList?.length === 0 && } + {dRepListToDisplay?.length === 0 && } {dRepListToDisplay?.map((dRep) => ( { values={{ deposit: correctAdaFormat(epochParams?.drep_deposit) }} components={[ openInNewTab("https://sancho.network/")} + onClick={() => openInNewTab("https://docs.gov.tools/cardano-govtool/faqs/direct-voter-vs-drep")} sx={{ cursor: "pointer" }} key="0" />, diff --git a/govtool/frontend/src/pages/RetireAsDirectVoter.tsx b/govtool/frontend/src/pages/RetireAsDirectVoter.tsx index 29d65bfae..1227cb815 100644 --- a/govtool/frontend/src/pages/RetireAsDirectVoter.tsx +++ b/govtool/frontend/src/pages/RetireAsDirectVoter.tsx @@ -121,7 +121,7 @@ export const RetireAsDirectVoter = () => { values={{ deposit: correctAdaFormat(voter?.deposit) }} components={[ openInNewTab("https://sancho.network/")} + onClick={() => openInNewTab("https://docs.gov.tools/cardano-govtool/faqs/direct-voter-vs-drep")} sx={{ cursor: "pointer", textDecoration: "none" }} key="0" />, diff --git a/govtool/metadata-validation/package-lock.json b/govtool/metadata-validation/package-lock.json index 917c36675..d2ff25ec4 100644 --- a/govtool/metadata-validation/package-lock.json +++ b/govtool/metadata-validation/package-lock.json @@ -1,12 +1,12 @@ { "name": "@govtool/metadata-validation", - "version": "2.0.10", + "version": "2.0.11", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@govtool/metadata-validation", - "version": "2.0.10", + "version": "2.0.11", "license": "UNLICENSED", "dependencies": { "@nestjs/axios": "^3.0.2", diff --git a/govtool/metadata-validation/package.json b/govtool/metadata-validation/package.json index 4083f42e4..6dfde4daa 100644 --- a/govtool/metadata-validation/package.json +++ b/govtool/metadata-validation/package.json @@ -1,6 +1,6 @@ { "name": "@govtool/metadata-validation", - "version": "2.0.10", + "version": "2.0.11", "description": "", "author": "", "private": true, diff --git a/govtool/metadata-validation/src/main.ts b/govtool/metadata-validation/src/main.ts index eac48e84c..c25db9a68 100644 --- a/govtool/metadata-validation/src/main.ts +++ b/govtool/metadata-validation/src/main.ts @@ -13,7 +13,7 @@ async function bootstrap() { const config = new DocumentBuilder() .setTitle('Metadata Validation Tool') .setDescription('The Metadata Validation Tool API description') - .setVersion('2.0.10') + .setVersion('2.0.11') .build(); const document = SwaggerModule.createDocument(app, config);