Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix/1243-bug-incorrect-labelling-of-governance-action-metadata-field-about-abstract #1258

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export const DashboardGovernanceActionDetails = () => {
url={state ? state.url : data.proposal.url}
title={title}
links={state ? state?.references : data.proposal?.references}
about={state ? state?.abstract : data.proposal?.abstract}
abstract={state ? state?.abstract : data.proposal?.abstract}
motivation={state ? state?.motivation : data.proposal?.motivation}
rationale={state ? state?.rationale : data.proposal?.rationale}
yesVotes={state ? state.yesVotes : data.proposal.yesVotes}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type GovernanceActionDetailsCardProps = {
details?: ActionDetailsType;
url: string;
title?: string;
about?: string;
abstract?: string;
motivation?: string;
rationale?: string;
yesVotes: number;
Expand Down Expand Up @@ -48,7 +48,7 @@ export const GovernanceActionDetailsCard = ({
url,
title,
links,
about,
abstract,
motivation,
rationale,
yesVotes,
Expand Down Expand Up @@ -93,7 +93,7 @@ export const GovernanceActionDetailsCard = ({
/>
)}
<GovernanceActionDetailsCardData
about={about}
abstract={abstract}
createdDate={createdDate}
createdEpochNo={createdEpochNo}
details={details}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { MetadataValidationStatus } from "@models";
import { useLocation } from "react-router-dom";

type GovernanceActionDetailsCardDataProps = {
about?: string;
abstract?: string;
createdDate: string;
createdEpochNo: number;
details?: ActionDetailsType;
Expand All @@ -35,7 +35,7 @@ type GovernanceActionDetailsCardDataProps = {
};

export const GovernanceActionDetailsCardData = ({
about,
abstract,
createdDate,
createdEpochNo,
details,
Expand Down Expand Up @@ -110,10 +110,10 @@ export const GovernanceActionDetailsCardData = ({
dataTestId={`${govActionId}-id`}
/>
<GovernanceActionCardElement
label={t("govActions.about")}
text={about}
label={t("govActions.abstract")}
text={abstract}
textVariant="longText"
dataTestId="about"
dataTestId="abstract"
/>
<GovernanceActionCardElement
label={t("govActions.motivation")}
Expand Down
2 changes: 1 addition & 1 deletion govtool/frontend/src/i18n/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ export const en = {
},
govActions: {
about: "About",
abstract: "Abstract:",
abstract: "Abstract",
backToGovActions: "Back to Governance Actions",
castVote:
"<0>You voted {{vote}} on this proposal</0>\non {{date}} (Epoch {{epoch}})",
Expand Down
2 changes: 1 addition & 1 deletion govtool/frontend/src/pages/GovernanceActionDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export const GovernanceActionDetails = () => {
details={state ? state.details : data.proposal.details}
url={state ? state.url : data.proposal.url}
title={title}
about={state ? state?.abstract : data.proposal?.abstract}
abstract={state ? state?.abstract : data.proposal?.abstract}
motivation={
state ? state?.motivation : data.proposal?.motivation
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ async function assertGovActionDetails(
export const GovernanceActionDetailsCardComponent: Story = {
args: {
...commonArgs,
about: "Example about section",
abstract: "Example about section",
rationale: "Example rationale section",
motivation: "Example motivation section",
},
Expand All @@ -86,7 +86,7 @@ export const GovernanceActionDetailsDrep: Story = {
...commonArgs,
isDashboard: true,
isVoter: true,
about: "Example about section",
abstract: "Example about section",
rationale: "Example rationale section",
motivation: "Example motivation section",
},
Expand Down
Loading