Skip to content

Commit 2ceb696

Browse files
authored
Merge pull request #2820 from IntersectMBO/staging
GovTool - v2.0.10
2 parents 8dab8e0 + 26eab47 commit 2ceb696

File tree

16 files changed

+97
-55
lines changed

16 files changed

+97
-55
lines changed

CHANGELOG.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,34 @@ changes.
1212

1313
### Added
1414

15+
-
16+
17+
### Fixed
18+
19+
-
20+
21+
### Changed
22+
23+
-
24+
25+
### Removed
26+
27+
-
28+
29+
## [v2.0.10](https://github.com/IntersectMBO/govtool/releases/tag/v2.0.10) 2025-01-29
30+
31+
### Added
32+
1533
- Add exception handler on stake key voting power query execution [Issue 2757](https://github.com/IntersectMBO/govtool/issues/2757)
34+
- Add script hash to new consitution governance action [Issue 2745](https://github.com/IntersectMBO/govtool/issues/2745)
1635

1736
### Fixed
1837

1938
-
2039

2140
### Changed
2241

23-
- Bump @intersect.mbo/pdf-ui to v0.5.10
42+
- Bump @intersect.mbo/pdf-ui to v0.5.11
2443

2544
### Removed
2645

govtool/backend/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ FROM $BASE_IMAGE_REPO:$BASE_IMAGE_TAG
44
WORKDIR /src
55
COPY . .
66
RUN cabal build
7-
RUN cp dist-newstyle/build/x86_64-linux/ghc-9.2.7/vva-be-2.0.9/x/vva-be/build/vva-be/vva-be /usr/local/bin
7+
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

govtool/backend/Dockerfile.qovery

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ FROM $BASE_IMAGE_REPO:$BASE_IMAGE_TAG
44
WORKDIR /src
55
COPY . .
66
RUN cabal build
7-
RUN cp dist-newstyle/build/x86_64-linux/ghc-9.2.7/vva-be-2.0.9/x/vva-be/build/vva-be/vva-be /usr/local/bin
7+
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
88

99
# Expose the necessary port
1010
EXPOSE 9876

govtool/backend/sql/list-proposals.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,8 @@ SELECT
175175

176176
WHEN gov_action_proposal.type::text = 'NewConstitution' THEN
177177
json_build_object(
178-
'anchor', gov_action_proposal.description->'contents'->1->'anchor'
178+
'anchor', gov_action_proposal.description->'contents'->1->'anchor',
179+
'script', gov_action_proposal.description->'contents'->1->'script'
179180
)
180181
WHEN gov_action_proposal.type::text = 'NewCommittee' THEN
181182
(

govtool/backend/vva-be.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cabal-version: 3.6
22
name: vva-be
3-
version: 2.0.9
3+
version: 2.0.10
44

55
-- A short (one-line) description of the package.
66
-- synopsis:

govtool/frontend/package-lock.json

Lines changed: 6 additions & 6 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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@govtool/frontend",
33
"private": true,
4-
"version": "2.0.9",
4+
"version": "2.0.10",
55
"type": "module",
66
"scripts": {
77
"build": "vite build",
@@ -29,7 +29,7 @@
2929
"@hookform/resolvers": "^3.3.1",
3030
"@intersect.mbo/govtool-outcomes-pillar-ui": "^1.0.0-beta.1",
3131
"@intersect.mbo/intersectmbo.org-icons-set": "^1.0.8",
32-
"@intersect.mbo/pdf-ui": "^0.5.10",
32+
"@intersect.mbo/pdf-ui": "^0.5.11",
3333
"@mui/icons-material": "^5.14.3",
3434
"@mui/material": "^5.14.4",
3535
"@rollup/plugin-babel": "^6.0.4",

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ type DataMissingHeaderProps = {
1616
titleStyle?: SxProps;
1717
isDRep?: boolean;
1818
image?: string | null;
19+
shareLink?: string;
1920
};
2021

2122
export const DataMissingHeader = ({
@@ -24,6 +25,7 @@ export const DataMissingHeader = ({
2425
titleStyle,
2526
isDRep,
2627
image,
28+
shareLink,
2729
}: DataMissingHeaderProps) => {
2830
const base64Image = getBase64ImageDetails(image ?? "");
2931
const { screenWidth } = useScreenDimension();
@@ -81,7 +83,9 @@ export const DataMissingHeader = ({
8183
title}
8284
</Typography>
8385
</Box>
84-
{screenWidth >= 1020 && <Share link={window.location.href} />}
86+
{screenWidth >= 1020 && (
87+
<Share link={shareLink || window.location.href} />
88+
)}
8589
</Box>
8690
);
8791
};
Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,38 @@
11
import { Box } from "@mui/material";
22

33
import { NewConstitutionAnchor, ProposalData } from "@/models";
4-
import { useScreenDimension } from "@/hooks";
4+
import { useScreenDimension, useTranslation } from "@/hooks";
55

66
import { GovernanceActionCardElement } from "./GovernanceActionCardElement";
77

88
export const GovernanceActionNewConstitutionDetailsTabContent = ({
99
details,
1010
}: Pick<ProposalData, "details">) => {
1111
const { screenWidth } = useScreenDimension();
12+
const { t } = useTranslation();
1213
return (
1314
<Box>
1415
<GovernanceActionCardElement
1516
isLinkButton
16-
label="New constitution link"
17+
label={t("govActions.newConstitution.url")}
1718
text={(details?.anchor as NewConstitutionAnchor)?.url as string}
1819
dataTestId="new-constitution-url"
1920
textVariant={screenWidth > 1600 ? "longText" : "oneLine"}
2021
/>
2122
<GovernanceActionCardElement
2223
isCopyButton
23-
label="New constitution hash"
24+
label={t("govActions.newConstitution.hash")}
2425
text={(details?.anchor as NewConstitutionAnchor)?.dataHash as string}
2526
dataTestId="new-constitution-data-hash"
2627
textVariant={screenWidth > 1600 ? "longText" : "oneLine"}
2728
/>
29+
<GovernanceActionCardElement
30+
isCopyButton
31+
label={t("govActions.newConstitution.scriptHash")}
32+
text={details?.script as string}
33+
dataTestId="new-constitution-script-hash"
34+
textVariant={screenWidth > 1600 ? "longText" : "oneLine"}
35+
/>
2836
</Box>
2937
);
3038
};

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

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@ import { useScreenDimension } from "@hooks";
55
import {
66
GovernanceActionCardStatePill,
77
GovernanceActionDetailsCardVotes,
8-
Share,
98
} from "@molecules";
109
import { GovernanceActionDetailsCardData } from "@organisms";
1110
import { MetadataValidationStatus, ProposalData, ProposalVote } from "@models";
12-
import { useLocation } from "react-router-dom";
1311

1412
type GovernanceActionDetailsCardProps = {
1513
isDashboard?: boolean;
@@ -32,13 +30,6 @@ export const GovernanceActionDetailsCard = ({
3230
const { screenWidth, isMobile } = useScreenDimension();
3331

3432
const isOneColumn = (isDashboard && screenWidth < 1036) ?? isMobile;
35-
const { pathname, hash } = useLocation();
36-
37-
const govActionLinkToShare = `${window.location.protocol}//${
38-
window.location.hostname
39-
}${window.location.port ? `:${window.location.port}` : ""}${pathname}${
40-
hash ?? ""
41-
}`;
4233

4334
return (
4435
<Box
@@ -82,9 +73,6 @@ export const GovernanceActionDetailsCard = ({
8273
isInProgress={isInProgress}
8374
proposal={proposal}
8475
/>
85-
<Box position="absolute" right={40} top={40}>
86-
<Share link={govActionLinkToShare} />
87-
</Box>
8876
</Box>
8977
);
9078
};

0 commit comments

Comments
 (0)