Skip to content
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
5 changes: 5 additions & 0 deletions pdf-ui/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
As a minor extension, we also keep a semantic version for the `UNRELEASED`
changes.

## [v0.7.0-beta-28](https://www.npmjs.com/package/@intersect.mbo/pdf-ui/v/0.7.0-beta-29) 2025-05-15

### Fixed
- fix: display message when bd is submited for vote and hidden the poll
- fix: Missing Character Limit Validation for Link Text in Proposal Submission

## [v0.7.0-beta-28](https://www.npmjs.com/package/@intersect.mbo/pdf-ui/v/0.7.0-beta-28) 2025-05-15

Expand Down
2 changes: 1 addition & 1 deletion pdf-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@intersect.mbo/pdf-ui",
"version": "0.7.0-beta-28",
"version": "0.7.0-beta-29",
"description": "Proposal discussion ui",
"main": "./src/index.js",
"exports": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useTheme } from '@emotion/react';
import { IconPlus, IconX } from '@intersect.mbo/intersectmbo.org-icons-set';
import { Box, Button, TextField,IconButton } from '@mui/material';
import { Box, Button, TextField, IconButton } from '@mui/material';

import { isValidURLFormat } from '../../lib/utils';

Expand Down Expand Up @@ -124,6 +124,8 @@ const LinkManager = ({
}}
inputProps={{
'data-testid': `link-${index}-url-input`,
//link length limited to 255 characters
maxLength: 255,
}}
error={!!linksErrors[index]?.url}
helperText={linksErrors[index]?.url}
Expand Down
149 changes: 80 additions & 69 deletions pdf-ui/src/components/CreationGoveranceAction/Step3.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,101 +184,105 @@ const Step3 = ({
{proposalData?.prop_rationale || ''}
</ReactMarkdown>
</Box>
{selectedGATypeId == 2 ?
proposalData?.proposal_withdrawals?.map(
(withdrawal, index) => (
<Box>
<Box>
<Typography
variant='body1'
color={theme.palette.text.grey}
gutterBottom
>
Receiving address
</Typography>
<Typography
variant='body1'
gutterBottom
data-testid={`receiving-address-${index}-content`}
>
{withdrawal.prop_receiving_address}
</Typography>
</Box>
{selectedGATypeId == 2
? proposalData?.proposal_withdrawals?.map(
(withdrawal, index) => (
<Box>
<Box>
<Typography
variant='body1'
color={theme.palette.text.grey}
gutterBottom
>
Receiving address
</Typography>
<Typography
variant='body1'
gutterBottom
data-testid={`receiving-address-${index}-content`}
>
{
withdrawal.prop_receiving_address
}
</Typography>
</Box>
<Box>
<Typography
variant='body1'
color={theme.palette.text.grey}
gutterBottom
>
Amount
</Typography>
<Typography
variant='body1'
gutterBottom
data-testid={`amount-${index}-content`}
>
{withdrawal.prop_amount}
</Typography>
</Box>
</Box>
)
)
: null}
{selectedGATypeId == 3 && pc ? (
<Box>
<Box>
<Typography
variant='body1'
color={theme.palette.text.grey}
gutterBottom
>
New constitution URL
</Typography>
<Typography
variant='body1'
gutterBottom
data-testid='new-constitution-url-content'
>
{pc.prop_constitution_url}
</Typography>
</Box>

{pc.prop_have_guardrails_script && (
<>
<Box>
<Typography
variant='body1'
color={theme.palette.text.grey}
gutterBottom
>
Amount
Guardrails script URL
</Typography>
<Typography
variant='body1'
gutterBottom
data-testid={`amount-${index}-content`}
data-testid='guardrails-script-url-content'
>
{withdrawal.prop_amount}
{pc.prop_guardrails_script_url}
</Typography>
</Box>
</Box>
)): null }
{selectedGATypeId == 3 && pc ? (
<Box>
<Box>
<Typography
variant='body1'
color={theme.palette.text.grey}
gutterBottom
>
New constitution URL
Guardrails script hash
</Typography>
<Typography
variant='body1'
gutterBottom
data-testid="new-constitution-url-content"
data-testid='guardrails-script-hash-content'
>
{pc.prop_constitution_url}
{pc.prop_guardrails_script_hash}
</Typography>
</Box>

{pc.prop_have_guardrails_script && (
<>
<Box>
<Typography
variant='body1'
color={theme.palette.text.grey}
gutterBottom
>
Guardrails script URL
</Typography>
<Typography
variant='body1'
gutterBottom
data-testid="guardrails-script-url-content"
>
{pc.prop_guardrails_script_url}
</Typography>
</Box>
<Box>
<Typography
variant='body1'
color={theme.palette.text.grey}
gutterBottom
>
Guardrails script hash
</Typography>
<Typography
variant='body1'
gutterBottom
data-testid="guardrails-script-hash-content"
>
{pc.prop_guardrails_script_hash}
</Typography>
</Box>
</>
)}
</Box>
) : null}
</>
)}
</Box>
) : null}
{proposalData?.proposal_links?.length > 0 && (
<Box>
<Typography
Expand Down Expand Up @@ -324,6 +328,13 @@ const Step3 = ({
<Typography
variant='body1'
component='span'
sx={{
textOverflow: 'ellipsis',
overflow: 'hidden',
maxWidth: isSmallScreen
? '100%'
: '800px',
}}
data-testid={`link-${index}-text-content`}
>
{link?.prop_link_text}
Expand Down
Loading
Loading