Skip to content

Commit 6a9ebf9

Browse files
authored
Merge pull request #3870 from IntersectMBO/staging
v2.0.28
2 parents ecee341 + 90cc2d3 commit 6a9ebf9

File tree

13 files changed

+94
-68
lines changed

13 files changed

+94
-68
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ changes.
2222
- Fix missing off chain references in DRep details [Issue 3490](https://github.com/IntersectMBO/govtool/issues/3490)
2323
- 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)
2424
- 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)
25+
- 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)
26+
- Fix missing page titles on subpages: DRep details and Gov Actions details [Issue 3142](https://github.com/IntersectMBO/govtool/issues/3142)
2527

2628
### Changed
2729
- Adjust top menu (navbar) layout when wallet is not connected [Issue-3682](https://github.com/IntersectMBO/govtool/issues/3682)

govtool/frontend/package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

govtool/frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"@hookform/resolvers": "^3.3.1",
3030
"@intersect.mbo/govtool-outcomes-pillar-ui": "v1.5.1",
3131
"@intersect.mbo/intersectmbo.org-icons-set": "^1.0.8",
32-
"@intersect.mbo/pdf-ui": "1.0.3-beta",
32+
"@intersect.mbo/pdf-ui": "1.0.9-beta",
3333
"@mui/icons-material": "^5.14.3",
3434
"@mui/material": "^5.14.4",
3535
"@noble/ed25519": "^2.3.0",

govtool/frontend/src/components/molecules/GovernanceActionCardElement.tsx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,21 @@ export const GovernanceActionCardElement = ({
133133
p: ({ children: markdownChildren }: PropsWithChildren) =>
134134
renderMarkdownText({ children: markdownChildren }),
135135
br: () => <br />,
136+
img: ({
137+
src,
138+
alt,
139+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
140+
node, // node is passed by react-markdown but we should not use it
141+
...rest
142+
}: React.ImgHTMLAttributes<HTMLImageElement> & { node?: unknown }) => (
143+
<img
144+
{...rest}
145+
src={src ?? ""}
146+
alt={alt ?? ""}
147+
style={{ maxWidth: "100%", height: "auto", display: "block" }}
148+
loading="lazy"
149+
/>
150+
),
136151
};
137152

138153
const renderMarkdown = (markdownText: string | number) => {

govtool/frontend/src/components/molecules/VoteActionForm.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,10 @@ export const VoteActionForm = ({
144144
sx={{ lineHeight: "18px", alignSelf: "start" }}
145145
>
146146
{t("govActions.castVoteDeadline", {
147-
date: expiryDate,
147+
date: formatDisplayDate(
148+
expiryDate ?? "",
149+
"yyyy-MM-dd HH:mm:ss",
150+
),
148151
epoch: expiryEpochNo,
149152
})}
150153
</Typography>
Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,26 @@
1-
.markdown {
2-
& table {
3-
display: block;
4-
overflow-x: auto;
5-
margin: 32px 0;
6-
border-spacing: 0;
7-
border-collapse: collapse;
8-
max-width: 100%;
1+
.markdown table {
2+
display: block;
3+
overflow-x: auto;
4+
margin: 32px 0;
5+
border-spacing: 0;
6+
border-collapse: collapse;
7+
max-width: 100%;
8+
}
99

10-
& thead {
11-
background-color: #d6e2ff80;
12-
}
10+
.markdown thead {
11+
background-color: #d6e2ff80;
12+
}
1313

14-
& th,
15-
& td {
16-
padding: 6px 13px;
17-
border: 1px solid #d6e2ff;
18-
}
14+
.markdown th,
15+
.markdown td {
16+
padding: 6px 13px;
17+
border: 1px solid #d6e2ff;
18+
}
1919

20-
& td > :last-child {
21-
margin-bottom: 0;
22-
}
20+
.markdown td > :last-child {
21+
margin-bottom: 0;
22+
}
2323

24-
& tr:nth-child(2n) {
25-
background-color: #d6e2ff80;
26-
}
27-
}
24+
.markdown tr:nth-child(2n) {
25+
background-color: #d6e2ff80;
2826
}

govtool/frontend/src/components/organisms/MaintenanceEndingBanner/MaintenanceEndingBanner.tsx

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export const MaintenanceEndingBanner = () => {
6161
{/* Expandable Content */}
6262
<Box
6363
sx={{
64-
maxHeight: isExpanded ? '300px' : "0px", // 300px is a safe value for transition effect
64+
maxHeight: isExpanded ? "300px" : "0px", // 300px is a safe value for transition effect
6565
transition: "max-height 0.4s ease-in-out",
6666
overflow: "hidden",
6767
}}
@@ -81,36 +81,21 @@ export const MaintenanceEndingBanner = () => {
8181
color="common.white"
8282
mb={0.5}
8383
>
84-
{t("system.maintenanceEnding.description1")}
85-
</Typography>
86-
<Typography variant="caption" color="common.white" mb={0.5}>
8784
<Trans
88-
i18nKey="system.maintenanceEnding.description2"
85+
i18nKey="system.maintenanceEnding.description1"
8986
components={[
90-
<Typography
91-
key="1"
87+
<Link
9288
variant="caption"
9389
fontWeight={600}
9490
color="common.white"
95-
component="span"
91+
href="https://gov.tools/outcomes/governance_actions/9d213a57684d7ddf6f3350c80d042639ecbed5ccccc4a05bf54959a086593e7b#0"
92+
data-testid="govtool-info-link"
93+
target="_blank"
94+
rel="noopener noreferrer"
9695
/>,
9796
]}
9897
/>
9998
</Typography>
100-
<Typography variant="caption" color="common.white">
101-
{t("system.maintenanceEnding.description3")}{" "}
102-
<Link
103-
variant="caption"
104-
fontWeight={600}
105-
color="common.white"
106-
href="https://docs.gov.tools/overview/important-updates/the-future-of-govtool-why-it-matters-and-what-comes-next"
107-
target="_blank"
108-
rel="noopener noreferrer"
109-
data-testid="govtool-future-link"
110-
>
111-
{t("system.maintenanceEnding.linkText")}
112-
</Link>
113-
</Typography>
11499
</Box>
115100
</Box>
116101
</Box>

govtool/frontend/src/consts/navItems.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export const NAV_ITEMS: Array<NavItem | NavMenuItem> = [
4545
},
4646
{
4747
dataTestId: "governance-actions",
48-
label: i18n.t("govActions.title"),
48+
label: i18n.t("govActions.categoryTitle"),
4949
childNavItems: [
5050
{
5151
dataTestId: "proposed-governance-actions-link",
@@ -56,7 +56,7 @@ export const NAV_ITEMS: Array<NavItem | NavMenuItem> = [
5656
{
5757
dataTestId: "governance-actions-link",
5858
navTo: PATHS.governanceActions,
59-
label: i18n.t("govActions.navTitle"),
59+
label: i18n.t("govActions.title"),
6060
newTabLink: null,
6161
},
6262
{
@@ -108,7 +108,7 @@ export const CONNECTED_NAV_ITEMS = [
108108
},
109109
{
110110
dataTestId: "governance-actions-link",
111-
label: i18n.t("govActions.title"),
111+
label: i18n.t("govActions.categoryTitle"),
112112
navTo: PATHS.dashboardGovernanceActions,
113113
activeIcon: ICONS.governanceActionsActiveIcon,
114114
icon: ICONS.governanceActionsIcon,
@@ -139,7 +139,7 @@ export const CONNECTED_NAV_ITEMS = [
139139
{
140140
dataTestId: "governance-actions-live-voting-link",
141141
label: i18n.t("govActions.liveVoting.title"),
142-
navTo: OUTCOMES_PATHS.governanceActionsLiveVoting,
142+
navTo: PATHS.dashboardGovernanceActions,
143143
activeIcon: ICONS.governanceActionsActiveIcon,
144144
icon: ICONS.governanceActionsIcon,
145145
newTabLink: null,

govtool/frontend/src/consts/paths.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,4 @@ export const USER_PATHS = {
4949
export const OUTCOMES_PATHS = {
5050
governanceActionsOutcomes: "/outcomes",
5151
governanceActionOutcomes: "/outcomes/governance_actions/:id",
52-
governanceActionsLiveVoting: "/connected/governance_actions",
5352
};

govtool/frontend/src/i18n/locales/en.json

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@
432432
},
433433
"backToGovActions": "Back to Governance Actions",
434434
"castVote": "<0>You voted {{vote}} on this proposal</0>\non {{date}} (Epoch {{epoch}})",
435-
"castVoteDeadline": "You can change your vote up to {{date}} (Epoch {{epoch}})",
435+
"castVoteDeadline": "You can change your vote up to {{date}} UTC (Epoch {{epoch}})",
436436
"changeVote": "Change vote",
437437
"changeYourVote": "Change your vote",
438438
"chooseHowToVote": "Choose how you want to vote:",
@@ -489,8 +489,8 @@
489489
"submittedDateWithEpoch": "Submitted: <0>{{date}}</0> <1>(Epoch {{epoch}})</1>",
490490
"supportingLinks": "Supporting links",
491491
"threshold": "Ratification Threshold",
492-
"title": "Governance Actions",
493-
"navTitle": "Live Voting",
492+
"categoryTitle": "Governance Actions",
493+
"title": "Live Voting",
494494
"toVote": "To vote",
495495
"viewDetails": "View Details",
496496
"viewDetailsAndVote": "View Details and Vote",
@@ -764,11 +764,8 @@
764764
"title": "This tool is connected to {{networkName}}",
765765
"bootstrappingWarning": "Govtool is in the Bootstrapping phase. Some features are not available. <docs>Learn more</docs>",
766766
"maintenanceEnding": {
767-
"title": "⚠️ GovTool needs your support",
768-
"description1": "GovTool wasn’t included in the current Cardano budget.",
769-
"description2": "A 100k ada maintenance grant will sustain essential infrastructure and bug fixes through 2025 — but future development depends on renewed community backing.",
770-
"description3": "Find out what this means and how you can help:",
771-
"linkText": "The future of GovTool"
767+
"title": "🔥 GovTool needs your support - Info Action is submitted",
768+
"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."
772769
}
773770
},
774771
"tooltips": {

0 commit comments

Comments
 (0)