From 614522f4d0cffa5ed1eced2da480dca7acff260e Mon Sep 17 00:00:00 2001 From: Miro Date: Fri, 12 Sep 2025 14:41:55 +0200 Subject: [PATCH 1/6] Update the footer issue 4075 --- .../src/app/[locale]/page.js | 158 ++++++++++++++---- govtool/frontend/src/i18n/locales/en.json | 2 +- .../frontend/src/stories/Footer.stories.ts | 2 +- 3 files changed, 125 insertions(+), 37 deletions(-) diff --git a/govtool/analytics-dashboard/src/app/[locale]/page.js b/govtool/analytics-dashboard/src/app/[locale]/page.js index c714503fd..b4ec565f4 100644 --- a/govtool/analytics-dashboard/src/app/[locale]/page.js +++ b/govtool/analytics-dashboard/src/app/[locale]/page.js @@ -1,27 +1,36 @@ 'use client'; import { Grid, Card, CardContent, Typography, Box } from '@mui/material'; -import { PeopleAltOutlined, ArticleOutlined, AccountBalanceWalletOutlined, HowToVoteOutlined, PersonOutline, BalanceOutlined } from '@mui/icons-material'; +import { + PeopleAltOutlined, + ArticleOutlined, + AccountBalanceWalletOutlined, + HowToVoteOutlined, + PersonOutline, + BalanceOutlined, +} from '@mui/icons-material'; import { useTheme } from '@mui/material/styles'; import getGoogleData from '@/lib/api'; import { useEffect, useState } from 'react'; import { Link } from '@/navigation'; function Dashboard() { - const [stats, setStats] = useState([ // { title: 'Total users', value: 0, Icon: PeopleAltOutlined }, { title: 'Unique users', value: 0, Icon: PeopleAltOutlined }, - { title: 'Wallet connections', value: 0, Icon: AccountBalanceWalletOutlined }, + { + title: 'Wallet connections', + value: 0, + Icon: AccountBalanceWalletOutlined, + }, { title: 'Proposal views', value: 0, Icon: ArticleOutlined }, { title: 'DRep Registrations', value: 0, Icon: PersonOutline }, { title: 'Votes submitted', value: 0, Icon: HowToVoteOutlined }, - { title: 'Delegations', value: 0, Icon: BalanceOutlined } - ]) - + { title: 'Delegations', value: 0, Icon: BalanceOutlined }, + ]); const fetchData = async () => { - const resp = await getGoogleData() + const resp = await getGoogleData(); const statMap = resp.reduce((acc, event) => { acc[event.eventName] = event.eventCount; return acc; @@ -29,50 +38,119 @@ function Dashboard() { let statsTemplate = [ // { title: 'Total users', value: statMap['user_engagement'], Icon: PeopleAltOutlined }, - { title: 'Unique users', value: statMap['first_visit'], Icon: PeopleAltOutlined }, - { title: 'Wallet connections', value: +statMap['Connect wallet'] + +statMap['Connect your wallet'], Icon: AccountBalanceWalletOutlined }, - { title: 'Proposal views', value: statMap['View proposal details'], Icon: ArticleOutlined }, - { title: 'DRep Registrations', value: statMap['Register'], Icon: PersonOutline }, - { title: 'Votes submitted', value: statMap['Vote'], Icon: HowToVoteOutlined }, - { title: 'Delegations', value: statMap['Delegate'], Icon: BalanceOutlined }, + { + title: 'Unique users', + value: statMap['first_visit'], + Icon: PeopleAltOutlined, + }, + { + title: 'Wallet connections', + value: + +statMap['Connect wallet'] + + +statMap['Connect your wallet'], + Icon: AccountBalanceWalletOutlined, + }, + { + title: 'Proposal views', + value: statMap['View proposal details'], + Icon: ArticleOutlined, + }, + { + title: 'DRep Registrations', + value: statMap['Register'], + Icon: PersonOutline, + }, + { + title: 'Votes submitted', + value: statMap['Vote'], + Icon: HowToVoteOutlined, + }, + { + title: 'Delegations', + value: statMap['Delegate'], + Icon: BalanceOutlined, + }, ]; - setStats(statsTemplate) - } + setStats(statsTemplate); + }; useEffect(() => { - fetchData() - }, []) - - + fetchData(); + }, []); const theme = useTheme(); return ( - theme?.palette?.text?.black }}> - - + theme?.palette?.text?.black }} + > + + SanchoNet Govtool Participation Dashboard - theme?.palette?.text?.gray }}> - This dashboard shows the overall participation and usage of SanchoNet Govtool from 1st of December 2023 + theme?.palette?.text?.gray }} + > + This dashboard shows the overall participation and usage + of SanchoNet Govtool from 1st of December 2023 - {stats.map((stat, index) => ( theme?.palette?.background?.info, width: '100%' }} + sx={{ + background: (theme) => + theme?.palette?.background?.info, + width: '100%', + }} > - - - - theme?.palette?.text?.gray }}> + + + + + theme?.palette?.text?.gray, + }} + > {stat.title} @@ -85,18 +163,28 @@ function Dashboard() { - + - © {new Date().getFullYear()} Intersect MBO + © {new Date().getFullYear()} Intersect - theme?.palette?.text?.primaryBlue }}> + theme?.palette?.text?.primaryBlue, + }} + > Sancho Govtool - - + ); } diff --git a/govtool/frontend/src/i18n/locales/en.json b/govtool/frontend/src/i18n/locales/en.json index c4b054471..2efe8cba7 100644 --- a/govtool/frontend/src/i18n/locales/en.json +++ b/govtool/frontend/src/i18n/locales/en.json @@ -377,7 +377,7 @@ } }, "footer": { - "copyright": "© {{year}} Intersect MBO", + "copyright": "© {{year}} Intersect", "privacyPolicy": "Privacy policy", "termOfService": "Terms of Use" }, diff --git a/govtool/frontend/src/stories/Footer.stories.ts b/govtool/frontend/src/stories/Footer.stories.ts index fb40c74f9..37ec951cd 100644 --- a/govtool/frontend/src/stories/Footer.stories.ts +++ b/govtool/frontend/src/stories/Footer.stories.ts @@ -21,7 +21,7 @@ export const FooterComponent: Story = { const nowDate = new Date(); await expect( - canvas.getByText(`© ${nowDate.getFullYear()} Intersect MBO`), + canvas.getByText(`© ${nowDate.getFullYear()} Intersect`), ).toBeInTheDocument(); await userEvent.click(canvas.getByTestId("privacy-policy-footer-link")); await expect(window.open).toHaveBeenCalledTimes(1); From 1c43647e50777ab6608dd9ad877721062f4c2d4d Mon Sep 17 00:00:00 2001 From: Miro Date: Fri, 12 Sep 2025 15:15:53 +0200 Subject: [PATCH 2/6] Update the footer for GovTool issue 4075 --- govtool/analytics-dashboard/src/app/[locale]/page.js | 2 +- govtool/frontend/src/i18n/locales/en.json | 2 +- govtool/frontend/src/stories/Footer.stories.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/govtool/analytics-dashboard/src/app/[locale]/page.js b/govtool/analytics-dashboard/src/app/[locale]/page.js index b4ec565f4..68100c295 100644 --- a/govtool/analytics-dashboard/src/app/[locale]/page.js +++ b/govtool/analytics-dashboard/src/app/[locale]/page.js @@ -170,7 +170,7 @@ function Dashboard() { padding={2} > - © {new Date().getFullYear()} Intersect + © {new Date().getFullYear()} GovTool Date: Mon, 15 Sep 2025 10:05:06 +0200 Subject: [PATCH 3/6] Rename Sorting Criteria in DRep Directory from Activity to Voting Activity issue 4072 --- .../frontend/src/components/molecules/DataActionsBar.tsx | 7 ++++++- govtool/frontend/src/consts/dRepDirectory/sorting.ts | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/govtool/frontend/src/components/molecules/DataActionsBar.tsx b/govtool/frontend/src/components/molecules/DataActionsBar.tsx index 1ff86d706..b6672a968 100644 --- a/govtool/frontend/src/components/molecules/DataActionsBar.tsx +++ b/govtool/frontend/src/components/molecules/DataActionsBar.tsx @@ -65,6 +65,11 @@ export const DataActionsBar: FC = ({ [chosenFilters, filterOptions], ); + const chosenSortingLabel = useMemo(() => { + const opt = (sortOptions ?? []).find((o) => o.key === chosenSorting); + return opt?.label ?? chosenSorting; + }, [sortOptions, chosenSorting]); + const handleRemoveFilter = (key: string) => setChosenFilters?.((prev) => (prev ?? []).filter((k) => k !== key)); @@ -135,7 +140,7 @@ export const DataActionsBar: FC = ({ filtersOpen={effectiveFiltersOpen} isFiltering={isFiltering} setFiltersOpen={setEffectiveFiltersOpen} - chosenSorting={chosenSorting} + chosenSorting={chosenSortingLabel} setSortOpen={setEffectiveSortOpen} sortOpen={effectiveSortOpen} > diff --git a/govtool/frontend/src/consts/dRepDirectory/sorting.ts b/govtool/frontend/src/consts/dRepDirectory/sorting.ts index 2ae238b15..85c964b77 100644 --- a/govtool/frontend/src/consts/dRepDirectory/sorting.ts +++ b/govtool/frontend/src/consts/dRepDirectory/sorting.ts @@ -1,7 +1,7 @@ export const DREP_DIRECTORY_SORTING = [ { key: "Activity", - label: "Activity", + label: "Activity Voting", }, { key: "RegistrationDate", From a0fc95bf4818d1ae932750cd3aa202743d8acd68 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 15 Sep 2025 09:21:48 +0000 Subject: [PATCH 4/6] chore: update @intersect.mbo/govtool-outcomes-pillar-ui to v1.5.9 --- 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 fa16b20ad..aa7470bca 100644 --- a/govtool/frontend/package-lock.json +++ b/govtool/frontend/package-lock.json @@ -13,7 +13,7 @@ "@emotion/styled": "^11.11.0", "@emurgo/cardano-serialization-lib-asmjs": "^14.1.1", "@hookform/resolvers": "^3.3.1", - "@intersect.mbo/govtool-outcomes-pillar-ui": "v1.5.8", + "@intersect.mbo/govtool-outcomes-pillar-ui": "v1.5.9", "@intersect.mbo/intersectmbo.org-icons-set": "^1.0.8", "@intersect.mbo/pdf-ui": "1.0.14-beta", "@mui/icons-material": "^5.14.3", @@ -3392,9 +3392,9 @@ } }, "node_modules/@intersect.mbo/govtool-outcomes-pillar-ui": { - "version": "1.5.8", - "resolved": "https://registry.npmjs.org/@intersect.mbo/govtool-outcomes-pillar-ui/-/govtool-outcomes-pillar-ui-1.5.8.tgz", - "integrity": "sha512-uRLY+tvuV/lWxZCLpMKa72fcYKYAvE9FdfYn7s1KeLcbw8rpezFPu6dHlqVaF6zPngBu2UFwJqrB3FL6iSEs7Q==", + "version": "1.5.9", + "resolved": "https://registry.npmjs.org/@intersect.mbo/govtool-outcomes-pillar-ui/-/govtool-outcomes-pillar-ui-1.5.9.tgz", + "integrity": "sha512-Lq0ILRbUrFSqT8QK6meXud7S45uEwvABmSIIXhm+4fgLm7iPtKpr0ctu9++M7EsYJxPsUFHpa/4sM4zhmVB46w==", "license": "ISC", "dependencies": { "@fontsource/poppins": "^5.0.14", diff --git a/govtool/frontend/package.json b/govtool/frontend/package.json index 233ca770d..578e6c801 100644 --- a/govtool/frontend/package.json +++ b/govtool/frontend/package.json @@ -27,7 +27,7 @@ "@emotion/styled": "^11.11.0", "@emurgo/cardano-serialization-lib-asmjs": "^14.1.1", "@hookform/resolvers": "^3.3.1", - "@intersect.mbo/govtool-outcomes-pillar-ui": "v1.5.8", + "@intersect.mbo/govtool-outcomes-pillar-ui": "v1.5.9", "@intersect.mbo/intersectmbo.org-icons-set": "^1.0.8", "@intersect.mbo/pdf-ui": "1.0.14-beta", "@mui/icons-material": "^5.14.3", From 4345e89274bd8dbb91f73042ba6fbfaff98a96c2 Mon Sep 17 00:00:00 2001 From: Miro Date: Mon, 15 Sep 2025 12:51:16 +0200 Subject: [PATCH 5/6] fix Activity Voting instead of Voting Activity --- govtool/frontend/src/consts/dRepDirectory/sorting.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/govtool/frontend/src/consts/dRepDirectory/sorting.ts b/govtool/frontend/src/consts/dRepDirectory/sorting.ts index 85c964b77..339f708ae 100644 --- a/govtool/frontend/src/consts/dRepDirectory/sorting.ts +++ b/govtool/frontend/src/consts/dRepDirectory/sorting.ts @@ -1,7 +1,7 @@ export const DREP_DIRECTORY_SORTING = [ { key: "Activity", - label: "Activity Voting", + label: "Voting Activity", }, { key: "RegistrationDate", From ecb4901d0a4fd8d42509933389aa32fcf083144a Mon Sep 17 00:00:00 2001 From: Adam Tomaszczyk Date: Tue, 16 Sep 2025 14:41:53 +0200 Subject: [PATCH 6/6] GA spacing fix --- .../components/organisms/DashboardGovernanceActionsVotedOn.tsx | 2 +- .../src/components/organisms/GovernanceActionsToVote.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/govtool/frontend/src/components/organisms/DashboardGovernanceActionsVotedOn.tsx b/govtool/frontend/src/components/organisms/DashboardGovernanceActionsVotedOn.tsx index 670d50498..3c145d98d 100644 --- a/govtool/frontend/src/components/organisms/DashboardGovernanceActionsVotedOn.tsx +++ b/govtool/frontend/src/components/organisms/DashboardGovernanceActionsVotedOn.tsx @@ -77,7 +77,7 @@ export const DashboardGovernanceActionsVotedOn = ({ diff --git a/govtool/frontend/src/components/organisms/GovernanceActionsToVote.tsx b/govtool/frontend/src/components/organisms/GovernanceActionsToVote.tsx index 4154474cb..7d04f3fdf 100644 --- a/govtool/frontend/src/components/organisms/GovernanceActionsToVote.tsx +++ b/govtool/frontend/src/components/organisms/GovernanceActionsToVote.tsx @@ -121,7 +121,7 @@ export const GovernanceActionsToVote = ({