Skip to content
Merged

v2.0.28 #3869

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
b6deb69
fix: unnecessary character addition on wallet.json while write data
kneerose Jun 25, 2025
ae9ee39
(fix#3837): Images in Governance Action Details are displayed at full…
Ciabas Jun 27, 2025
3655f3e
changelog
Ciabas Jun 27, 2025
670fd4d
type-fix
Ciabas Jun 27, 2025
43bf54f
Merge pull request #3849 from IntersectMBO/3837-markdown-content-in-g…
bosko-m Jun 27, 2025
8eee37f
chore: update @intersect.mbo/pdf-ui to 1.0.4-alfa
github-actions[bot] Jun 27, 2025
ba2597b
Merge pull request #3850 from IntersectMBO/chore/@intersect.mbo/pdf-u…
bosko-m Jun 27, 2025
32e5d0a
chore: update @intersect.mbo/pdf-ui to 1.0.4-beta
github-actions[bot] Jun 30, 2025
c937b37
Merge pull request #3852 from IntersectMBO/chore/@intersect.mbo/pdf-u…
bosko-m Jun 30, 2025
c05eae7
chore: update @intersect.mbo/pdf-ui to 1.0.5-beta
github-actions[bot] Jun 30, 2025
55b9c9d
Merge pull request #3853 from IntersectMBO/chore/@intersect.mbo/pdf-u…
bosko-m Jun 30, 2025
7927a05
(fix#3326): Typo on Voting panel dates
Ciabas Jun 30, 2025
2c81d57
chore: update @intersect.mbo/pdf-ui to 1.0.6-beta
github-actions[bot] Jun 30, 2025
3c662b7
fix-utc
Ciabas Jun 30, 2025
dfa0194
Merge pull request #3856 from IntersectMBO/chore/@intersect.mbo/pdf-u…
bosko-m Jun 30, 2025
d7ccbb4
Merge pull request #3855 from IntersectMBO/3326-typo-on-voting-panel
Ciabas Jun 30, 2025
e264616
chore: update @intersect.mbo/pdf-ui to 1.0.7-beta
github-actions[bot] Jun 30, 2025
0413def
Merge pull request #3859 from IntersectMBO/chore/@intersect.mbo/pdf-u…
bosko-m Jun 30, 2025
f80b115
Merge pull request #3840 from IntersectMBO/fix/extra-characeter-appen…
kneerose Jul 1, 2025
ef4eb3c
(fix#3142): Fix missing page titles on subpages: DRep details and Go…
Ciabas Jul 1, 2025
9fe69c1
(fix#3615): Fix CSS for markdown tables
Ciabas Jul 1, 2025
a663c86
chore: update @intersect.mbo/pdf-ui to 1.0.8-beta
github-actions[bot] Jul 1, 2025
e46cfac
Merge pull request #3864 from IntersectMBO/chore/@intersect.mbo/pdf-u…
bosko-m Jul 1, 2025
f48643e
Merge pull request #3863 from IntersectMBO/fix/3615-fix-css
Ciabas Jul 1, 2025
783551c
Merge pull request #3861 from IntersectMBO/3142-missing-page-title-dr…
Ciabas Jul 1, 2025
c57ad9f
(fix#3132): change titles from Governance Actions to Live Voting
Ciabas Jul 1, 2025
8abf445
Merge pull request #3865 from IntersectMBO/3132-title-wrong-on-live-v…
Ciabas Jul 2, 2025
c1796ec
chore: update @intersect.mbo/pdf-ui to 1.0.9-beta
github-actions[bot] Jul 3, 2025
d411795
Merge pull request #3867 from IntersectMBO/chore/@intersect.mbo/pdf-u…
bosko-m Jul 3, 2025
4f431fd
(fix#3842) Update Red Banner Copy on GovTool
Ciabas Jun 27, 2025
8e2c3b1
Merge pull request #3848 from IntersectMBO/3842-update-red-banner-cop…
Ciabas Jul 3, 2025
4296a88
Merge pull request #3868 from IntersectMBO/develop
bosko-m Jul 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ 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)
- 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)
Expand Down
8 changes: 4 additions & 4 deletions govtool/frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion govtool/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.9-beta",
"@mui/icons-material": "^5.14.3",
"@mui/material": "^5.14.4",
"@noble/ed25519": "^2.3.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,21 @@ export const GovernanceActionCardElement = ({
p: ({ children: markdownChildren }: PropsWithChildren) =>
renderMarkdownText({ children: markdownChildren }),
br: () => <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<HTMLImageElement> & { node?: unknown }) => (
<img
{...rest}
src={src ?? ""}
alt={alt ?? ""}
style={{ maxWidth: "100%", height: "auto", display: "block" }}
loading="lazy"
/>
),
};

const renderMarkdown = (markdownText: string | number) => {
Expand Down
5 changes: 4 additions & 1 deletion govtool/frontend/src/components/molecules/VoteActionForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
})}
</Typography>
Expand Down
44 changes: 21 additions & 23 deletions govtool/frontend/src/components/molecules/tableMarkdown.css
Original file line number Diff line number Diff line change
@@ -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;
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const MaintenanceEndingBanner = () => {
{/* Expandable Content */}
<Box
sx={{
maxHeight: isExpanded ? '300px' : "0px", // 300px is a safe value for transition effect
maxHeight: isExpanded ? "300px" : "0px", // 300px is a safe value for transition effect
transition: "max-height 0.4s ease-in-out",
overflow: "hidden",
}}
Expand All @@ -81,36 +81,21 @@ export const MaintenanceEndingBanner = () => {
color="common.white"
mb={0.5}
>
{t("system.maintenanceEnding.description1")}
</Typography>
<Typography variant="caption" color="common.white" mb={0.5}>
<Trans
i18nKey="system.maintenanceEnding.description2"
i18nKey="system.maintenanceEnding.description1"
components={[
<Typography
key="1"
<Link
variant="caption"
fontWeight={600}
color="common.white"
component="span"
href="https://gov.tools/outcomes/governance_actions/9d213a57684d7ddf6f3350c80d042639ecbed5ccccc4a05bf54959a086593e7b#0"
data-testid="govtool-info-link"
target="_blank"
rel="noopener noreferrer"
/>,
]}
/>
</Typography>
<Typography variant="caption" color="common.white">
{t("system.maintenanceEnding.description3")}{" "}
<Link
variant="caption"
fontWeight={600}
color="common.white"
href="https://docs.gov.tools/overview/important-updates/the-future-of-govtool-why-it-matters-and-what-comes-next"
target="_blank"
rel="noopener noreferrer"
data-testid="govtool-future-link"
>
{t("system.maintenanceEnding.linkText")}
</Link>
</Typography>
</Box>
</Box>
</Box>
Expand Down
8 changes: 4 additions & 4 deletions govtool/frontend/src/consts/navItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const NAV_ITEMS: Array<NavItem | NavMenuItem> = [
},
{
dataTestId: "governance-actions",
label: i18n.t("govActions.title"),
label: i18n.t("govActions.categoryTitle"),
childNavItems: [
{
dataTestId: "proposed-governance-actions-link",
Expand All @@ -56,7 +56,7 @@ export const NAV_ITEMS: Array<NavItem | NavMenuItem> = [
{
dataTestId: "governance-actions-link",
navTo: PATHS.governanceActions,
label: i18n.t("govActions.navTitle"),
label: i18n.t("govActions.title"),
newTabLink: null,
},
{
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion govtool/frontend/src/consts/paths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,4 @@ export const USER_PATHS = {
export const OUTCOMES_PATHS = {
governanceActionsOutcomes: "/outcomes",
governanceActionOutcomes: "/outcomes/governance_actions/:id",
governanceActionsLiveVoting: "/connected/governance_actions",
};
13 changes: 5 additions & 8 deletions govtool/frontend/src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@
},
"backToGovActions": "Back to Governance Actions",
"castVote": "<0>You voted {{vote}} on this proposal</0>\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:",
Expand Down Expand Up @@ -489,8 +489,8 @@
"submittedDateWithEpoch": "Submitted: <0>{{date}}</0> <1>(Epoch {{epoch}})</1>",
"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",
Expand Down Expand Up @@ -764,11 +764,8 @@
"title": "This tool is connected to {{networkName}}",
"bootstrappingWarning": "Govtool is in the Bootstrapping phase. Some features are not available. <docs>Learn more</docs>",
"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</0> is essential to continue active development and maintenance for the next 12 months, keeping community owned open governance tooling on Cardano."
}
},
"tooltips": {
Expand Down
7 changes: 6 additions & 1 deletion govtool/frontend/src/pages/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,19 @@ export const Dashboard = () => {

return proposalDiscussionNavItem ?? "";
}

if (path.startsWith(PATHS.dashboardGovernanceActions)) {
return t("govActions.title");
}

return findNavItem(CONNECTED_NAV_ITEMS, path) ?? "";
};

const findNavItem = (items: NavItem[], targetPath: string): string | null =>
items.reduce<string | null>(
(result, item) =>
result ??
(targetPath === item.navTo
(targetPath === item.navTo || targetPath.startsWith(`${item.navTo}/`)
? item.label
: item.childNavItems
? findNavItem(item.childNavItems, targetPath)
Expand Down
24 changes: 23 additions & 1 deletion tests/govtool-frontend/playwright/lib/helpers/file.ts
Original file line number Diff line number Diff line change
@@ -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");
Expand All @@ -20,6 +21,27 @@ export async function createFile(fileName: string, data?: any) {
);
}

export async function renameFile(currentPath: string, newPath: string) {
await new Promise<void>((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<any> {
const data: string = await new Promise((resolve, reject) =>
readFile(`${mockFolderPath}/${fileName}`, "utf8", (err, data) => {
Expand Down
4 changes: 2 additions & 2 deletions tests/govtool-frontend/playwright/lib/walletManager.ts
Original file line number Diff line number Diff line change
@@ -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");
Expand Down Expand Up @@ -73,7 +73,7 @@ class WalletManager {
wallet.givenName = givenName;
}
});
await createFile("wallets.json", wallets);
await atomicWriteFile("wallets.json", wallets);
}
}
export default WalletManager.getInstance();
Loading