From b6deb692350c7e7e1e517e9a1c5093c3f90faa0b Mon Sep 17 00:00:00 2001 From: Niraj Date: Wed, 25 Jun 2025 22:14:29 +0545 Subject: [PATCH 01/17] fix: unnecessary character addition on wallet.json while write data --- .../playwright/lib/helpers/file.ts | 24 ++++++++++++++++++- .../playwright/lib/walletManager.ts | 4 ++-- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/tests/govtool-frontend/playwright/lib/helpers/file.ts b/tests/govtool-frontend/playwright/lib/helpers/file.ts index d8145b0a4..d7a787edb 100644 --- a/tests/govtool-frontend/playwright/lib/helpers/file.ts +++ b/tests/govtool-frontend/playwright/lib/helpers/file.ts @@ -1,4 +1,5 @@ -import { readFile, rm, writeFile } from "fs"; +import { faker } from "@faker-js/faker"; +import { readFile, rename, rm, writeFile } from "fs"; const path = require("path"); const mockFolderPath = path.resolve(__dirname, "../_mock"); @@ -20,6 +21,27 @@ export async function createFile(fileName: string, data?: any) { ); } +export async function renameFile(currentPath: string, newPath: string) { + await new Promise((resolve, reject) => + rename(currentPath, newPath, (err) => { + if (err) { + reject(err); + } else { + resolve(); + } + }) + ); +} + +export async function atomicWriteFile(fileName: string, data: any) { + const actualFilePath = `${mockFolderPath}/${fileName}`; + const tempFileName = `${faker.person.firstName()}-${faker.string.uuid()}.json`; + const tmpPath = `${mockFolderPath}/${tempFileName}`; + + await createFile(tempFileName, data); + await renameFile(tmpPath, actualFilePath); +} + export async function getFile(fileName: string): Promise { const data: string = await new Promise((resolve, reject) => readFile(`${mockFolderPath}/${fileName}`, "utf8", (err, data) => { diff --git a/tests/govtool-frontend/playwright/lib/walletManager.ts b/tests/govtool-frontend/playwright/lib/walletManager.ts index 23842a22d..6ec178828 100644 --- a/tests/govtool-frontend/playwright/lib/walletManager.ts +++ b/tests/govtool-frontend/playwright/lib/walletManager.ts @@ -1,6 +1,6 @@ import { StaticWallet } from "@types"; import { LockInterceptor } from "./lockInterceptor"; -import { createFile, getFile } from "@helpers/file"; +import { atomicWriteFile, createFile, getFile } from "@helpers/file"; const path = require("path"); const baseFilePath = path.resolve(__dirname, "./_mock"); @@ -73,7 +73,7 @@ class WalletManager { wallet.givenName = givenName; } }); - await createFile("wallets.json", wallets); + await atomicWriteFile("wallets.json", wallets); } } export default WalletManager.getInstance(); From ae9ee39ec8198ea1d02304a05982517694c4c939 Mon Sep 17 00:00:00 2001 From: Ciabas Date: Fri, 27 Jun 2025 15:19:11 +0200 Subject: [PATCH 02/17] (fix#3837): Images in Governance Action Details are displayed at full width and height without cropping or clipping --- .../molecules/GovernanceActionCardElement.tsx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/govtool/frontend/src/components/molecules/GovernanceActionCardElement.tsx b/govtool/frontend/src/components/molecules/GovernanceActionCardElement.tsx index d2c4bf83e..c2b2fa678 100644 --- a/govtool/frontend/src/components/molecules/GovernanceActionCardElement.tsx +++ b/govtool/frontend/src/components/molecules/GovernanceActionCardElement.tsx @@ -133,6 +133,21 @@ export const GovernanceActionCardElement = ({ p: ({ children: markdownChildren }: PropsWithChildren) => renderMarkdownText({ children: markdownChildren }), br: () =>
, + img: ({ + src, + alt, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + node, // node is passed by react-markdown but we should not use it + ...rest + }: React.ImgHTMLAttributes & { node: unknown }) => ( + {alt + ), }; const renderMarkdown = (markdownText: string | number) => { From 3655f3edd8176456dc2de51ab12bdd95e303cef3 Mon Sep 17 00:00:00 2001 From: Ciabas Date: Fri, 27 Jun 2025 15:23:02 +0200 Subject: [PATCH 03/17] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d2c4a786e..216a7e567 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ changes. - Fix missing off chain references in DRep details [Issue 3490](https://github.com/IntersectMBO/govtool/issues/3490) - Fix blank screen and type error on linkReferences when navigating to edit dRep page that has no links [Issue 3714](https://github.com/IntersectMBO/govtool/issues/3714) - Fix adding two link input fields when editing the dRep form when no links are present initially [Issue 3709](https://github.com/IntersectMBO/govtool/issues/3709) +- Fix images in Governance Action Details are displayed at full width and height without cropping or clipping [Issue 3837](https://github.com/IntersectMBO/govtool/issues/3837) ### Changed - Adjust top menu (navbar) layout when wallet is not connected [Issue-3682](https://github.com/IntersectMBO/govtool/issues/3682) From 670fd4d32dc54693e755aa1f2b699b60aed7febf Mon Sep 17 00:00:00 2001 From: Ciabas Date: Fri, 27 Jun 2025 15:46:05 +0200 Subject: [PATCH 04/17] type-fix --- .../src/components/molecules/GovernanceActionCardElement.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/govtool/frontend/src/components/molecules/GovernanceActionCardElement.tsx b/govtool/frontend/src/components/molecules/GovernanceActionCardElement.tsx index c2b2fa678..55fc43d39 100644 --- a/govtool/frontend/src/components/molecules/GovernanceActionCardElement.tsx +++ b/govtool/frontend/src/components/molecules/GovernanceActionCardElement.tsx @@ -139,7 +139,7 @@ export const GovernanceActionCardElement = ({ // eslint-disable-next-line @typescript-eslint/no-unused-vars node, // node is passed by react-markdown but we should not use it ...rest - }: React.ImgHTMLAttributes & { node: unknown }) => ( + }: React.ImgHTMLAttributes & { node?: unknown }) => ( Date: Fri, 27 Jun 2025 14:38:34 +0000 Subject: [PATCH 05/17] chore: update @intersect.mbo/pdf-ui to 1.0.4-alfa --- govtool/frontend/package-lock.json | 8 ++++---- govtool/frontend/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/govtool/frontend/package-lock.json b/govtool/frontend/package-lock.json index 24ffb835c..eb5e3e5e9 100644 --- a/govtool/frontend/package-lock.json +++ b/govtool/frontend/package-lock.json @@ -15,7 +15,7 @@ "@hookform/resolvers": "^3.3.1", "@intersect.mbo/govtool-outcomes-pillar-ui": "v1.5.1", "@intersect.mbo/intersectmbo.org-icons-set": "^1.0.8", - "@intersect.mbo/pdf-ui": "1.0.3-beta", + "@intersect.mbo/pdf-ui": "1.0.4-alfa", "@mui/icons-material": "^5.14.3", "@mui/material": "^5.14.4", "@noble/ed25519": "^2.3.0", @@ -3426,9 +3426,9 @@ "license": "ISC" }, "node_modules/@intersect.mbo/pdf-ui": { - "version": "1.0.3-beta", - "resolved": "https://registry.npmjs.org/@intersect.mbo/pdf-ui/-/pdf-ui-1.0.3-beta.tgz", - "integrity": "sha512-zsG3wD3C2k7x3rWPTmrUan22rIuly2ltLMx3lOYN7MIFFnQCeJ1+qXYwnZhvLsgVtzZbAi+gGnDqYggZLgVkoQ==", + "version": "1.0.4-alfa", + "resolved": "https://registry.npmjs.org/@intersect.mbo/pdf-ui/-/pdf-ui-1.0.4-alfa.tgz", + "integrity": "sha512-mIEvBJLTDJVvpQxIfFYgXIeO+FTNCDgmISnFgLbc9NwaHqlfSy9L/j+7/Ffk/LXk4Bk2BiPfrUYBazeprAFKeA==", "dependencies": { "@emurgo/cardano-serialization-lib-asmjs": "^12.0.0-beta.2", "@fontsource/poppins": "^5.0.14", diff --git a/govtool/frontend/package.json b/govtool/frontend/package.json index ea8747291..26d4e072c 100644 --- a/govtool/frontend/package.json +++ b/govtool/frontend/package.json @@ -29,7 +29,7 @@ "@hookform/resolvers": "^3.3.1", "@intersect.mbo/govtool-outcomes-pillar-ui": "v1.5.1", "@intersect.mbo/intersectmbo.org-icons-set": "^1.0.8", - "@intersect.mbo/pdf-ui": "1.0.3-beta", + "@intersect.mbo/pdf-ui": "1.0.4-alfa", "@mui/icons-material": "^5.14.3", "@mui/material": "^5.14.4", "@noble/ed25519": "^2.3.0", From 32e5d0ad547e29ae80ded19fcab3faba2942ff9f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:07:18 +0000 Subject: [PATCH 06/17] chore: update @intersect.mbo/pdf-ui to 1.0.4-beta --- govtool/frontend/package-lock.json | 8 ++++---- govtool/frontend/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/govtool/frontend/package-lock.json b/govtool/frontend/package-lock.json index eb5e3e5e9..898abfcf5 100644 --- a/govtool/frontend/package-lock.json +++ b/govtool/frontend/package-lock.json @@ -15,7 +15,7 @@ "@hookform/resolvers": "^3.3.1", "@intersect.mbo/govtool-outcomes-pillar-ui": "v1.5.1", "@intersect.mbo/intersectmbo.org-icons-set": "^1.0.8", - "@intersect.mbo/pdf-ui": "1.0.4-alfa", + "@intersect.mbo/pdf-ui": "1.0.4-beta", "@mui/icons-material": "^5.14.3", "@mui/material": "^5.14.4", "@noble/ed25519": "^2.3.0", @@ -3426,9 +3426,9 @@ "license": "ISC" }, "node_modules/@intersect.mbo/pdf-ui": { - "version": "1.0.4-alfa", - "resolved": "https://registry.npmjs.org/@intersect.mbo/pdf-ui/-/pdf-ui-1.0.4-alfa.tgz", - "integrity": "sha512-mIEvBJLTDJVvpQxIfFYgXIeO+FTNCDgmISnFgLbc9NwaHqlfSy9L/j+7/Ffk/LXk4Bk2BiPfrUYBazeprAFKeA==", + "version": "1.0.4-beta", + "resolved": "https://registry.npmjs.org/@intersect.mbo/pdf-ui/-/pdf-ui-1.0.4-beta.tgz", + "integrity": "sha512-01yQIscfK3hGMRihcL4scGeuW2RnvPcXFwk03nm2eqwTMRK9oXtWn5D2C1dZwZL9k0Fp2OfY2Z3dOYexbXk/Qw==", "dependencies": { "@emurgo/cardano-serialization-lib-asmjs": "^12.0.0-beta.2", "@fontsource/poppins": "^5.0.14", diff --git a/govtool/frontend/package.json b/govtool/frontend/package.json index 26d4e072c..39f14adb0 100644 --- a/govtool/frontend/package.json +++ b/govtool/frontend/package.json @@ -29,7 +29,7 @@ "@hookform/resolvers": "^3.3.1", "@intersect.mbo/govtool-outcomes-pillar-ui": "v1.5.1", "@intersect.mbo/intersectmbo.org-icons-set": "^1.0.8", - "@intersect.mbo/pdf-ui": "1.0.4-alfa", + "@intersect.mbo/pdf-ui": "1.0.4-beta", "@mui/icons-material": "^5.14.3", "@mui/material": "^5.14.4", "@noble/ed25519": "^2.3.0", From c05eae7b3d1280818dc6b02098e8fb22be477c42 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:59:11 +0000 Subject: [PATCH 07/17] chore: update @intersect.mbo/pdf-ui to 1.0.5-beta --- govtool/frontend/package-lock.json | 8 ++++---- govtool/frontend/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/govtool/frontend/package-lock.json b/govtool/frontend/package-lock.json index 898abfcf5..64f03d701 100644 --- a/govtool/frontend/package-lock.json +++ b/govtool/frontend/package-lock.json @@ -15,7 +15,7 @@ "@hookform/resolvers": "^3.3.1", "@intersect.mbo/govtool-outcomes-pillar-ui": "v1.5.1", "@intersect.mbo/intersectmbo.org-icons-set": "^1.0.8", - "@intersect.mbo/pdf-ui": "1.0.4-beta", + "@intersect.mbo/pdf-ui": "1.0.5-beta", "@mui/icons-material": "^5.14.3", "@mui/material": "^5.14.4", "@noble/ed25519": "^2.3.0", @@ -3426,9 +3426,9 @@ "license": "ISC" }, "node_modules/@intersect.mbo/pdf-ui": { - "version": "1.0.4-beta", - "resolved": "https://registry.npmjs.org/@intersect.mbo/pdf-ui/-/pdf-ui-1.0.4-beta.tgz", - "integrity": "sha512-01yQIscfK3hGMRihcL4scGeuW2RnvPcXFwk03nm2eqwTMRK9oXtWn5D2C1dZwZL9k0Fp2OfY2Z3dOYexbXk/Qw==", + "version": "1.0.5-beta", + "resolved": "https://registry.npmjs.org/@intersect.mbo/pdf-ui/-/pdf-ui-1.0.5-beta.tgz", + "integrity": "sha512-4B9ASe1UHd4f/ttRebb/mMe81LIWVQ6FbahJF7oJJyrmig8Wl8WZo/xoJBRbaB0ybaRXLrr1CcF1NwXc0OCDcA==", "dependencies": { "@emurgo/cardano-serialization-lib-asmjs": "^12.0.0-beta.2", "@fontsource/poppins": "^5.0.14", diff --git a/govtool/frontend/package.json b/govtool/frontend/package.json index 39f14adb0..662690f7d 100644 --- a/govtool/frontend/package.json +++ b/govtool/frontend/package.json @@ -29,7 +29,7 @@ "@hookform/resolvers": "^3.3.1", "@intersect.mbo/govtool-outcomes-pillar-ui": "v1.5.1", "@intersect.mbo/intersectmbo.org-icons-set": "^1.0.8", - "@intersect.mbo/pdf-ui": "1.0.4-beta", + "@intersect.mbo/pdf-ui": "1.0.5-beta", "@mui/icons-material": "^5.14.3", "@mui/material": "^5.14.4", "@noble/ed25519": "^2.3.0", From 7927a050273f1d945f99bba22dc3abda689a579b Mon Sep 17 00:00:00 2001 From: Ciabas Date: Mon, 30 Jun 2025 12:09:45 +0200 Subject: [PATCH 08/17] (fix#3326): Typo on Voting panel dates --- govtool/frontend/src/components/molecules/VoteActionForm.tsx | 5 ++++- govtool/frontend/src/i18n/locales/en.json | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/govtool/frontend/src/components/molecules/VoteActionForm.tsx b/govtool/frontend/src/components/molecules/VoteActionForm.tsx index ca72961a5..9bc79a797 100644 --- a/govtool/frontend/src/components/molecules/VoteActionForm.tsx +++ b/govtool/frontend/src/components/molecules/VoteActionForm.tsx @@ -144,7 +144,10 @@ export const VoteActionForm = ({ sx={{ lineHeight: "18px", alignSelf: "start" }} > {t("govActions.castVoteDeadline", { - date: expiryDate, + date: formatDisplayDate( + expiryDate ?? "", + "yyyy-MM-dd HH:mm:ss", + ), epoch: expiryEpochNo, })} diff --git a/govtool/frontend/src/i18n/locales/en.json b/govtool/frontend/src/i18n/locales/en.json index 111029fca..7d09f480f 100644 --- a/govtool/frontend/src/i18n/locales/en.json +++ b/govtool/frontend/src/i18n/locales/en.json @@ -432,7 +432,7 @@ }, "backToGovActions": "Back to Governance Actions", "castVote": "<0>You voted {{vote}} on this proposal\non {{date}} (Epoch {{epoch}})", - "castVoteDeadline": "You can change your vote up to {{date}} (Epoch {{epoch}})", + "castVoteDeadline": "You can change your vote up to {{date}} (UTC, Epoch {{epoch}})", "changeVote": "Change vote", "changeYourVote": "Change your vote", "chooseHowToVote": "Choose how you want to vote:", From 2c81d5781bb0cece382d3a22a5c185309d5e67b6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 30 Jun 2025 11:21:39 +0000 Subject: [PATCH 09/17] chore: update @intersect.mbo/pdf-ui to 1.0.6-beta --- govtool/frontend/package-lock.json | 8 ++++---- govtool/frontend/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/govtool/frontend/package-lock.json b/govtool/frontend/package-lock.json index 64f03d701..2df5f6ec4 100644 --- a/govtool/frontend/package-lock.json +++ b/govtool/frontend/package-lock.json @@ -15,7 +15,7 @@ "@hookform/resolvers": "^3.3.1", "@intersect.mbo/govtool-outcomes-pillar-ui": "v1.5.1", "@intersect.mbo/intersectmbo.org-icons-set": "^1.0.8", - "@intersect.mbo/pdf-ui": "1.0.5-beta", + "@intersect.mbo/pdf-ui": "1.0.6-beta", "@mui/icons-material": "^5.14.3", "@mui/material": "^5.14.4", "@noble/ed25519": "^2.3.0", @@ -3426,9 +3426,9 @@ "license": "ISC" }, "node_modules/@intersect.mbo/pdf-ui": { - "version": "1.0.5-beta", - "resolved": "https://registry.npmjs.org/@intersect.mbo/pdf-ui/-/pdf-ui-1.0.5-beta.tgz", - "integrity": "sha512-4B9ASe1UHd4f/ttRebb/mMe81LIWVQ6FbahJF7oJJyrmig8Wl8WZo/xoJBRbaB0ybaRXLrr1CcF1NwXc0OCDcA==", + "version": "1.0.6-beta", + "resolved": "https://registry.npmjs.org/@intersect.mbo/pdf-ui/-/pdf-ui-1.0.6-beta.tgz", + "integrity": "sha512-bnE7HUy+76OmfrWCPMI01rpDQ5FCVEyhyQjFtw/yydR5EUctT9NtyIs9ySEJ+QJIOcPU/b6GeFdxM0pqrBzR0g==", "dependencies": { "@emurgo/cardano-serialization-lib-asmjs": "^12.0.0-beta.2", "@fontsource/poppins": "^5.0.14", diff --git a/govtool/frontend/package.json b/govtool/frontend/package.json index 662690f7d..7136a57ba 100644 --- a/govtool/frontend/package.json +++ b/govtool/frontend/package.json @@ -29,7 +29,7 @@ "@hookform/resolvers": "^3.3.1", "@intersect.mbo/govtool-outcomes-pillar-ui": "v1.5.1", "@intersect.mbo/intersectmbo.org-icons-set": "^1.0.8", - "@intersect.mbo/pdf-ui": "1.0.5-beta", + "@intersect.mbo/pdf-ui": "1.0.6-beta", "@mui/icons-material": "^5.14.3", "@mui/material": "^5.14.4", "@noble/ed25519": "^2.3.0", From 3c662b70822acb584d5673b0fbe488c54a637bc0 Mon Sep 17 00:00:00 2001 From: Ciabas Date: Mon, 30 Jun 2025 13:21:41 +0200 Subject: [PATCH 10/17] fix-utc --- govtool/frontend/src/i18n/locales/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/govtool/frontend/src/i18n/locales/en.json b/govtool/frontend/src/i18n/locales/en.json index 7d09f480f..2e6013a9f 100644 --- a/govtool/frontend/src/i18n/locales/en.json +++ b/govtool/frontend/src/i18n/locales/en.json @@ -432,7 +432,7 @@ }, "backToGovActions": "Back to Governance Actions", "castVote": "<0>You voted {{vote}} on this proposal\non {{date}} (Epoch {{epoch}})", - "castVoteDeadline": "You can change your vote up to {{date}} (UTC, Epoch {{epoch}})", + "castVoteDeadline": "You can change your vote up to {{date}} UTC (Epoch {{epoch}})", "changeVote": "Change vote", "changeYourVote": "Change your vote", "chooseHowToVote": "Choose how you want to vote:", From e264616050a3ddac9c894393ae5c796cfe9f94ff Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 30 Jun 2025 13:41:29 +0000 Subject: [PATCH 11/17] chore: update @intersect.mbo/pdf-ui to 1.0.7-beta --- govtool/frontend/package-lock.json | 8 ++++---- govtool/frontend/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/govtool/frontend/package-lock.json b/govtool/frontend/package-lock.json index 2df5f6ec4..eaf502a5a 100644 --- a/govtool/frontend/package-lock.json +++ b/govtool/frontend/package-lock.json @@ -15,7 +15,7 @@ "@hookform/resolvers": "^3.3.1", "@intersect.mbo/govtool-outcomes-pillar-ui": "v1.5.1", "@intersect.mbo/intersectmbo.org-icons-set": "^1.0.8", - "@intersect.mbo/pdf-ui": "1.0.6-beta", + "@intersect.mbo/pdf-ui": "1.0.7-beta", "@mui/icons-material": "^5.14.3", "@mui/material": "^5.14.4", "@noble/ed25519": "^2.3.0", @@ -3426,9 +3426,9 @@ "license": "ISC" }, "node_modules/@intersect.mbo/pdf-ui": { - "version": "1.0.6-beta", - "resolved": "https://registry.npmjs.org/@intersect.mbo/pdf-ui/-/pdf-ui-1.0.6-beta.tgz", - "integrity": "sha512-bnE7HUy+76OmfrWCPMI01rpDQ5FCVEyhyQjFtw/yydR5EUctT9NtyIs9ySEJ+QJIOcPU/b6GeFdxM0pqrBzR0g==", + "version": "1.0.7-beta", + "resolved": "https://registry.npmjs.org/@intersect.mbo/pdf-ui/-/pdf-ui-1.0.7-beta.tgz", + "integrity": "sha512-TOK304V5IG7KAMblfZgnLFj51EW+41GOjFokTHlFWN4aP7ak5QhXjwKeipcqQPhqD2Ur8Hn1m8ixdT8G9LmMYg==", "dependencies": { "@emurgo/cardano-serialization-lib-asmjs": "^12.0.0-beta.2", "@fontsource/poppins": "^5.0.14", diff --git a/govtool/frontend/package.json b/govtool/frontend/package.json index 7136a57ba..645d4bf25 100644 --- a/govtool/frontend/package.json +++ b/govtool/frontend/package.json @@ -29,7 +29,7 @@ "@hookform/resolvers": "^3.3.1", "@intersect.mbo/govtool-outcomes-pillar-ui": "v1.5.1", "@intersect.mbo/intersectmbo.org-icons-set": "^1.0.8", - "@intersect.mbo/pdf-ui": "1.0.6-beta", + "@intersect.mbo/pdf-ui": "1.0.7-beta", "@mui/icons-material": "^5.14.3", "@mui/material": "^5.14.4", "@noble/ed25519": "^2.3.0", From ef4eb3cca2239de5e1d62f1bab0b189cafc4b2cb Mon Sep 17 00:00:00 2001 From: Ciabas Date: Tue, 1 Jul 2025 10:02:18 +0200 Subject: [PATCH 12/17] (fix#3142): Fix missing page titles on subpages: DRep details and Gov Actions details --- CHANGELOG.md | 1 + govtool/frontend/src/pages/Dashboard.tsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 216a7e567..ba69e3a67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ changes. - Fix blank screen and type error on linkReferences when navigating to edit dRep page that has no links [Issue 3714](https://github.com/IntersectMBO/govtool/issues/3714) - Fix adding two link input fields when editing the dRep form when no links are present initially [Issue 3709](https://github.com/IntersectMBO/govtool/issues/3709) - Fix images in Governance Action Details are displayed at full width and height without cropping or clipping [Issue 3837](https://github.com/IntersectMBO/govtool/issues/3837) +- Fix missing page titles on subpages: DRep details and Gov Actions details [Issue 3142](https://github.com/IntersectMBO/govtool/issues/3142) ### Changed - Adjust top menu (navbar) layout when wallet is not connected [Issue-3682](https://github.com/IntersectMBO/govtool/issues/3682) diff --git a/govtool/frontend/src/pages/Dashboard.tsx b/govtool/frontend/src/pages/Dashboard.tsx index 88648389d..130e6b6fc 100644 --- a/govtool/frontend/src/pages/Dashboard.tsx +++ b/govtool/frontend/src/pages/Dashboard.tsx @@ -60,7 +60,7 @@ export const Dashboard = () => { items.reduce( (result, item) => result ?? - (targetPath === item.navTo + (targetPath === item.navTo || targetPath.startsWith(`${item.navTo}/`) ? item.label : item.childNavItems ? findNavItem(item.childNavItems, targetPath) From 9fe69c1da687e24a3d85d4163b99048af5c552a9 Mon Sep 17 00:00:00 2001 From: Ciabas Date: Tue, 1 Jul 2025 10:52:28 +0200 Subject: [PATCH 13/17] (fix#3615): Fix CSS for markdown tables --- .../components/molecules/tableMarkdown.css | 44 +++++++++---------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/govtool/frontend/src/components/molecules/tableMarkdown.css b/govtool/frontend/src/components/molecules/tableMarkdown.css index 6a76a446c..acc270f75 100644 --- a/govtool/frontend/src/components/molecules/tableMarkdown.css +++ b/govtool/frontend/src/components/molecules/tableMarkdown.css @@ -1,28 +1,26 @@ -.markdown { - & table { - display: block; - overflow-x: auto; - margin: 32px 0; - border-spacing: 0; - border-collapse: collapse; - max-width: 100%; +.markdown table { + display: block; + overflow-x: auto; + margin: 32px 0; + border-spacing: 0; + border-collapse: collapse; + max-width: 100%; +} - & thead { - background-color: #d6e2ff80; - } +.markdown thead { + background-color: #d6e2ff80; +} - & th, - & td { - padding: 6px 13px; - border: 1px solid #d6e2ff; - } +.markdown th, +.markdown td { + padding: 6px 13px; + border: 1px solid #d6e2ff; +} - & td > :last-child { - margin-bottom: 0; - } +.markdown td > :last-child { + margin-bottom: 0; +} - & tr:nth-child(2n) { - background-color: #d6e2ff80; - } - } +.markdown tr:nth-child(2n) { + background-color: #d6e2ff80; } From a663c8628c9ce221d965a877c3444349bd940bd7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 1 Jul 2025 09:54:35 +0000 Subject: [PATCH 14/17] chore: update @intersect.mbo/pdf-ui to 1.0.8-beta --- govtool/frontend/package-lock.json | 8 ++++---- govtool/frontend/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/govtool/frontend/package-lock.json b/govtool/frontend/package-lock.json index eaf502a5a..f50c9d0b7 100644 --- a/govtool/frontend/package-lock.json +++ b/govtool/frontend/package-lock.json @@ -15,7 +15,7 @@ "@hookform/resolvers": "^3.3.1", "@intersect.mbo/govtool-outcomes-pillar-ui": "v1.5.1", "@intersect.mbo/intersectmbo.org-icons-set": "^1.0.8", - "@intersect.mbo/pdf-ui": "1.0.7-beta", + "@intersect.mbo/pdf-ui": "1.0.8-beta", "@mui/icons-material": "^5.14.3", "@mui/material": "^5.14.4", "@noble/ed25519": "^2.3.0", @@ -3426,9 +3426,9 @@ "license": "ISC" }, "node_modules/@intersect.mbo/pdf-ui": { - "version": "1.0.7-beta", - "resolved": "https://registry.npmjs.org/@intersect.mbo/pdf-ui/-/pdf-ui-1.0.7-beta.tgz", - "integrity": "sha512-TOK304V5IG7KAMblfZgnLFj51EW+41GOjFokTHlFWN4aP7ak5QhXjwKeipcqQPhqD2Ur8Hn1m8ixdT8G9LmMYg==", + "version": "1.0.8-beta", + "resolved": "https://registry.npmjs.org/@intersect.mbo/pdf-ui/-/pdf-ui-1.0.8-beta.tgz", + "integrity": "sha512-RX4GVJM1vOeu7Vhf8Ivs/sohLSXxlN6Cm7ZdFmkAfLoBih4D5aebAemr/4rt4pG0DMi2Ft/98qQBB+ijAi24YQ==", "dependencies": { "@emurgo/cardano-serialization-lib-asmjs": "^12.0.0-beta.2", "@fontsource/poppins": "^5.0.14", diff --git a/govtool/frontend/package.json b/govtool/frontend/package.json index 645d4bf25..a7d32a750 100644 --- a/govtool/frontend/package.json +++ b/govtool/frontend/package.json @@ -29,7 +29,7 @@ "@hookform/resolvers": "^3.3.1", "@intersect.mbo/govtool-outcomes-pillar-ui": "v1.5.1", "@intersect.mbo/intersectmbo.org-icons-set": "^1.0.8", - "@intersect.mbo/pdf-ui": "1.0.7-beta", + "@intersect.mbo/pdf-ui": "1.0.8-beta", "@mui/icons-material": "^5.14.3", "@mui/material": "^5.14.4", "@noble/ed25519": "^2.3.0", From c57ad9fdad855294c88109aeaa0f033e91372541 Mon Sep 17 00:00:00 2001 From: Ciabas Date: Tue, 1 Jul 2025 14:42:03 +0200 Subject: [PATCH 15/17] (fix#3132): change titles from Governance Actions to Live Voting --- govtool/frontend/src/consts/navItems.tsx | 8 ++++---- govtool/frontend/src/consts/paths.ts | 1 - govtool/frontend/src/i18n/locales/en.json | 4 ++-- govtool/frontend/src/pages/Dashboard.tsx | 5 +++++ 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/govtool/frontend/src/consts/navItems.tsx b/govtool/frontend/src/consts/navItems.tsx index 6274f7a33..e291728d1 100644 --- a/govtool/frontend/src/consts/navItems.tsx +++ b/govtool/frontend/src/consts/navItems.tsx @@ -45,7 +45,7 @@ export const NAV_ITEMS: Array = [ }, { dataTestId: "governance-actions", - label: i18n.t("govActions.title"), + label: i18n.t("govActions.categoryTitle"), childNavItems: [ { dataTestId: "proposed-governance-actions-link", @@ -56,7 +56,7 @@ export const NAV_ITEMS: Array = [ { dataTestId: "governance-actions-link", navTo: PATHS.governanceActions, - label: i18n.t("govActions.navTitle"), + label: i18n.t("govActions.title"), newTabLink: null, }, { @@ -108,7 +108,7 @@ export const CONNECTED_NAV_ITEMS = [ }, { dataTestId: "governance-actions-link", - label: i18n.t("govActions.title"), + label: i18n.t("govActions.categoryTitle"), navTo: PATHS.dashboardGovernanceActions, activeIcon: ICONS.governanceActionsActiveIcon, icon: ICONS.governanceActionsIcon, @@ -139,7 +139,7 @@ export const CONNECTED_NAV_ITEMS = [ { dataTestId: "governance-actions-live-voting-link", label: i18n.t("govActions.liveVoting.title"), - navTo: OUTCOMES_PATHS.governanceActionsLiveVoting, + navTo: PATHS.dashboardGovernanceActions, activeIcon: ICONS.governanceActionsActiveIcon, icon: ICONS.governanceActionsIcon, newTabLink: null, diff --git a/govtool/frontend/src/consts/paths.ts b/govtool/frontend/src/consts/paths.ts index 94e16e0a4..0fbd60ef0 100644 --- a/govtool/frontend/src/consts/paths.ts +++ b/govtool/frontend/src/consts/paths.ts @@ -49,5 +49,4 @@ export const USER_PATHS = { export const OUTCOMES_PATHS = { governanceActionsOutcomes: "/outcomes", governanceActionOutcomes: "/outcomes/governance_actions/:id", - governanceActionsLiveVoting: "/connected/governance_actions", }; diff --git a/govtool/frontend/src/i18n/locales/en.json b/govtool/frontend/src/i18n/locales/en.json index 2e6013a9f..c8994b1f9 100644 --- a/govtool/frontend/src/i18n/locales/en.json +++ b/govtool/frontend/src/i18n/locales/en.json @@ -489,8 +489,8 @@ "submittedDateWithEpoch": "Submitted: <0>{{date}} <1>(Epoch {{epoch}})", "supportingLinks": "Supporting links", "threshold": "Ratification Threshold", - "title": "Governance Actions", - "navTitle": "Live Voting", + "categoryTitle": "Governance Actions", + "title": "Live Voting", "toVote": "To vote", "viewDetails": "View Details", "viewDetailsAndVote": "View Details and Vote", diff --git a/govtool/frontend/src/pages/Dashboard.tsx b/govtool/frontend/src/pages/Dashboard.tsx index 130e6b6fc..d34cbd877 100644 --- a/govtool/frontend/src/pages/Dashboard.tsx +++ b/govtool/frontend/src/pages/Dashboard.tsx @@ -53,6 +53,11 @@ export const Dashboard = () => { return proposalDiscussionNavItem ?? ""; } + + if (path.startsWith(PATHS.dashboardGovernanceActions)) { + return t("govActions.title"); + } + return findNavItem(CONNECTED_NAV_ITEMS, path) ?? ""; }; From c1796ec5947b3bf714319bbfc9b46de064f5d6cb Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 3 Jul 2025 08:51:18 +0000 Subject: [PATCH 16/17] chore: update @intersect.mbo/pdf-ui to 1.0.9-beta --- govtool/frontend/package-lock.json | 8 ++++---- govtool/frontend/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/govtool/frontend/package-lock.json b/govtool/frontend/package-lock.json index f50c9d0b7..612ed8faa 100644 --- a/govtool/frontend/package-lock.json +++ b/govtool/frontend/package-lock.json @@ -15,7 +15,7 @@ "@hookform/resolvers": "^3.3.1", "@intersect.mbo/govtool-outcomes-pillar-ui": "v1.5.1", "@intersect.mbo/intersectmbo.org-icons-set": "^1.0.8", - "@intersect.mbo/pdf-ui": "1.0.8-beta", + "@intersect.mbo/pdf-ui": "1.0.9-beta", "@mui/icons-material": "^5.14.3", "@mui/material": "^5.14.4", "@noble/ed25519": "^2.3.0", @@ -3426,9 +3426,9 @@ "license": "ISC" }, "node_modules/@intersect.mbo/pdf-ui": { - "version": "1.0.8-beta", - "resolved": "https://registry.npmjs.org/@intersect.mbo/pdf-ui/-/pdf-ui-1.0.8-beta.tgz", - "integrity": "sha512-RX4GVJM1vOeu7Vhf8Ivs/sohLSXxlN6Cm7ZdFmkAfLoBih4D5aebAemr/4rt4pG0DMi2Ft/98qQBB+ijAi24YQ==", + "version": "1.0.9-beta", + "resolved": "https://registry.npmjs.org/@intersect.mbo/pdf-ui/-/pdf-ui-1.0.9-beta.tgz", + "integrity": "sha512-rFWt8PrRt6ecbW0mN2p3HQVUGtJyYEmJSaaMYcN/XgwGfehmJ5CblP9S7/W5ZoDiQrFTaH3bBLl9Bu31mbcJpA==", "dependencies": { "@emurgo/cardano-serialization-lib-asmjs": "^12.0.0-beta.2", "@fontsource/poppins": "^5.0.14", diff --git a/govtool/frontend/package.json b/govtool/frontend/package.json index a7d32a750..5afca7323 100644 --- a/govtool/frontend/package.json +++ b/govtool/frontend/package.json @@ -29,7 +29,7 @@ "@hookform/resolvers": "^3.3.1", "@intersect.mbo/govtool-outcomes-pillar-ui": "v1.5.1", "@intersect.mbo/intersectmbo.org-icons-set": "^1.0.8", - "@intersect.mbo/pdf-ui": "1.0.8-beta", + "@intersect.mbo/pdf-ui": "1.0.9-beta", "@mui/icons-material": "^5.14.3", "@mui/material": "^5.14.4", "@noble/ed25519": "^2.3.0", From 4f431fd17471a412e7baf9f3173b4f36905c690d Mon Sep 17 00:00:00 2001 From: Ciabas Date: Fri, 27 Jun 2025 13:04:29 +0200 Subject: [PATCH 17/17] (fix#3842) Update Red Banner Copy on GovTool --- .../MaintenanceEndingBanner.tsx | 29 +++++-------------- govtool/frontend/src/i18n/locales/en.json | 7 ++--- 2 files changed, 9 insertions(+), 27 deletions(-) diff --git a/govtool/frontend/src/components/organisms/MaintenanceEndingBanner/MaintenanceEndingBanner.tsx b/govtool/frontend/src/components/organisms/MaintenanceEndingBanner/MaintenanceEndingBanner.tsx index 223839887..557839f93 100644 --- a/govtool/frontend/src/components/organisms/MaintenanceEndingBanner/MaintenanceEndingBanner.tsx +++ b/govtool/frontend/src/components/organisms/MaintenanceEndingBanner/MaintenanceEndingBanner.tsx @@ -61,7 +61,7 @@ export const MaintenanceEndingBanner = () => { {/* Expandable Content */} { color="common.white" mb={0.5} > - {t("system.maintenanceEnding.description1")} - - , ]} /> - - {t("system.maintenanceEnding.description3")}{" "} - - {t("system.maintenanceEnding.linkText")} - - diff --git a/govtool/frontend/src/i18n/locales/en.json b/govtool/frontend/src/i18n/locales/en.json index c8994b1f9..4ecbc2ea9 100644 --- a/govtool/frontend/src/i18n/locales/en.json +++ b/govtool/frontend/src/i18n/locales/en.json @@ -764,11 +764,8 @@ "title": "This tool is connected to {{networkName}}", "bootstrappingWarning": "Govtool is in the Bootstrapping phase. Some features are not available. Learn more", "maintenanceEnding": { - "title": "⚠️ GovTool needs your support", - "description1": "GovTool wasn’t included in the current Cardano budget.", - "description2": "A 100k ada maintenance grant will sustain essential infrastructure and bug fixes through 2025 — but future development depends on renewed community backing.", - "description3": "Find out what this means and how you can help:", - "linkText": "The future of GovTool" + "title": "🔥 GovTool needs your support - Info Action is submitted", + "description1": "This Info Action outlines the revised GovTool plan and <0>your vote is essential to continue active development and maintenance for the next 12 months, keeping community owned open governance tooling on Cardano." } }, "tooltips": {