Skip to content

Commit bf53ba6

Browse files
authored
Merge pull request #3639 from IntersectMBO/test
GovTool - v2.0.22
2 parents db47884 + 4b1ac25 commit bf53ba6

36 files changed

+386
-15487
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
if [ -d "gh-pages/$REPORT_NAME" ]; then
4+
cd gh-pages/$REPORT_NAME
5+
# Find the oldest numerical directory
6+
oldest_dir=$(find . -maxdepth 1 -type d -regex './[0-9]+' | sort -n | head -1)
7+
if [ -n "$oldest_dir" ]; then
8+
echo "Removing oldest report directory: $oldest_dir"
9+
rm -rf "$oldest_dir"
10+
else
11+
echo "No report directories found to remove"
12+
fi
13+
cd ../../
14+
else
15+
echo "Report directory does not exist yet"
16+
fi

.github/workflows/test_backend.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,12 @@ jobs:
115115
path: gh-pages
116116
repository: ${{vars.GH_PAGES}}
117117
ssh-key: ${{ secrets.DEPLOY_KEY }}
118+
119+
- name: Remove oldest report to save space
120+
if: ${{success()}}
121+
run: |
122+
chmod +x .github/scripts/remove_oldest_report.sh
123+
.github/scripts/remove_oldest_report.sh
118124
119125
- name: Register report
120126
id: register-project

.github/workflows/test_integration_playwright.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ on:
3333
workflow_run:
3434
workflows: ["Build and deploy GovTool test stack"]
3535
types: [completed]
36-
branches:
36+
branches:
3737
- test
3838
- infra/test-chores
3939

@@ -153,12 +153,19 @@ jobs:
153153
repository: ${{vars.GH_PAGES}}
154154
ssh-key: ${{ secrets.DEPLOY_KEY }}
155155

156+
- name: Remove oldest report to save space
157+
if: ${{success()}}
158+
run: |
159+
chmod +x .github/scripts/remove_oldest_report.sh
160+
.github/scripts/remove_oldest_report.sh
161+
156162
- name: Register report
157163
id: register-project
158164
if: ${{success()}}
159165
run: |
160166
chmod +x .github/scripts/register_report.sh
161167
.github/scripts/register_report.sh
168+
162169
- if: steps.register-project.outputs.project_exists != 'true'
163170
uses: JamesIves/github-pages-deploy-action@v4
164171
with:

CHANGELOG.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,23 @@ changes.
1818

1919
### Removed
2020

21-
## [v2.0.21](https://github.com/IntersectMBO/govtool/releases/tag/v2.0.21) 2025-05-09
21+
## [v2.0.22](https://github.com/IntersectMBO/govtool/releases/tag/v2.0.22) 2025-05-15
22+
23+
24+
### Added
25+
26+
### Fixed
2227

28+
- Fix an issue where the submit button remained disabled after removing an invalid value from the IMAGE input field on DRrep form [Issue 3560](https://github.com/IntersectMBO/govtool/issues/3560)
29+
- Fix app crash on unhandled wallet error [Issue 3123](https://github.com/IntersectMBO/govtool/issues/3123)
30+
- Preserve new lines in markdown text [Issue 2712](https://github.com/IntersectMBO/govtool/issues/2712)
31+
- Add scroll to markdown tables [Issue 3615](https://github.com/IntersectMBO/govtool/issues/3615)
32+
33+
### Changed
34+
35+
### Removed
36+
37+
## [v2.0.21](https://github.com/IntersectMBO/govtool/releases/tag/v2.0.21) 2025-05-09
2338

2439
### Added
2540

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.21/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.22/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.21/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.22/x/vva-be/build/vva-be/vva-be /usr/local/bin
88

99
# Expose the necessary port
1010
EXPOSE 9876

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.21
3+
version: 2.0.22
44

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

govtool/frontend/package-lock.json

Lines changed: 10 additions & 11 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: 3 additions & 4 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.21",
4+
"version": "2.0.22",
55
"type": "module",
66
"scripts": {
77
"build": "vite build",
@@ -27,9 +27,9 @@
2727
"@emotion/styled": "^11.11.0",
2828
"@emurgo/cardano-serialization-lib-asmjs": "^14.1.1",
2929
"@hookform/resolvers": "^3.3.1",
30-
"@intersect.mbo/govtool-outcomes-pillar-ui": "1.4.1",
30+
"@intersect.mbo/govtool-outcomes-pillar-ui": "v1.4.2",
3131
"@intersect.mbo/intersectmbo.org-icons-set": "^1.0.8",
32-
"@intersect.mbo/pdf-ui": "0.7.0-beta-26",
32+
"@intersect.mbo/pdf-ui": "0.7.0-beta-29",
3333
"@mui/icons-material": "^5.14.3",
3434
"@mui/material": "^5.14.4",
3535
"@rollup/plugin-babel": "^6.0.4",
@@ -57,7 +57,6 @@
5757
"react-query": "^3.39.3",
5858
"react-router-dom": "^6.13.0",
5959
"rehype-katex": "^7.0.1",
60-
"remark-breaks": "^4.0.0",
6160
"remark-gfm": "^4.0.1",
6261
"remark-math": "^6.0.0",
6362
"storybook-addon-manual-mocks": "^1.0.3",

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

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import Markdown from "react-markdown";
55
import remarkMath from "remark-math";
66
import remarkGfm from "remark-gfm";
77
import rehypeKatex from "rehype-katex";
8-
import remarkBreaks from "remark-breaks";
98
import "katex/dist/katex.min.css";
109
import "./tableMarkdown.css";
1110

@@ -120,29 +119,43 @@ export const GovernanceActionCardElement = ({
120119
fontWeight: 400,
121120
lineHeight: "24px",
122121
maxWidth: "auto",
123-
whiteSpace: "pre-wrap",
124122
}}
125123
>
126124
{children}
127125
</Typography>
128126
);
129127

130128
const markdownComponents = {
131-
p: (props: PropsWithChildren) => {
132-
const { children } = props;
133-
return renderMarkdownText({ children });
134-
},
129+
p: ({ children }: PropsWithChildren) => renderMarkdownText({ children }),
130+
br: () => <br />,
135131
};
136132

137-
const renderMarkdown = () => (
138-
<Markdown
139-
components={markdownComponents}
140-
remarkPlugins={[remarkMath, remarkBreaks, remarkGfm]}
141-
rehypePlugins={[rehypeKatex]}
142-
>
143-
{text.toString()}
144-
</Markdown>
145-
);
133+
const renderMarkdown = () => {
134+
const formattedText = text
135+
.toString()
136+
.replace(/\r\n|\r/g, "\n")
137+
.replace(
138+
/\n\n+/g,
139+
(match) =>
140+
`\n\n${Array(match.length - 1)
141+
.fill("&nbsp; \n")
142+
.join("")}\n`,
143+
)
144+
.split("\n")
145+
.map((line) => `${line} `)
146+
.join("\n");
147+
148+
return (
149+
<Markdown
150+
className="markdown"
151+
components={markdownComponents}
152+
remarkPlugins={[remarkMath, remarkGfm]}
153+
rehypePlugins={[rehypeKatex]}
154+
>
155+
{formattedText}
156+
</Markdown>
157+
);
158+
};
146159

147160
const renderCopyButton = () =>
148161
isCopyButton && (

0 commit comments

Comments
 (0)