Skip to content

Commit b29d7d0

Browse files
authored
Merge pull request #262 from IntersectMBO/dev
from Dev to QA
2 parents 117a98f + 0830ebc commit b29d7d0

File tree

5 files changed

+175
-97
lines changed

5 files changed

+175
-97
lines changed

pdf-ui/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
As a minor extension, we also keep a semantic version for the `UNRELEASED`
99
changes.
1010

11+
## [v0.7.0-beta-28](https://www.npmjs.com/package/@intersect.mbo/pdf-ui/v/0.7.0-beta-29) 2025-05-15
12+
13+
### Fixed
14+
- fix: display message when bd is submited for vote and hidden the poll
15+
- fix: Missing Character Limit Validation for Link Text in Proposal Submission
1116

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

pdf-ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@intersect.mbo/pdf-ui",
3-
"version": "0.7.0-beta-28",
3+
"version": "0.7.0-beta-29",
44
"description": "Proposal discussion ui",
55
"main": "./src/index.js",
66
"exports": {

pdf-ui/src/components/CreationGoveranceAction/LinkManager.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useTheme } from '@emotion/react';
22
import { IconPlus, IconX } from '@intersect.mbo/intersectmbo.org-icons-set';
3-
import { Box, Button, TextField,IconButton } from '@mui/material';
3+
import { Box, Button, TextField, IconButton } from '@mui/material';
44

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

@@ -124,6 +124,8 @@ const LinkManager = ({
124124
}}
125125
inputProps={{
126126
'data-testid': `link-${index}-url-input`,
127+
//link length limited to 255 characters
128+
maxLength: 255,
127129
}}
128130
error={!!linksErrors[index]?.url}
129131
helperText={linksErrors[index]?.url}

pdf-ui/src/components/CreationGoveranceAction/Step3.jsx

Lines changed: 80 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -184,101 +184,105 @@ const Step3 = ({
184184
{proposalData?.prop_rationale || ''}
185185
</ReactMarkdown>
186186
</Box>
187-
{selectedGATypeId == 2 ?
188-
proposalData?.proposal_withdrawals?.map(
189-
(withdrawal, index) => (
190-
<Box>
191-
<Box>
192-
<Typography
193-
variant='body1'
194-
color={theme.palette.text.grey}
195-
gutterBottom
196-
>
197-
Receiving address
198-
</Typography>
199-
<Typography
200-
variant='body1'
201-
gutterBottom
202-
data-testid={`receiving-address-${index}-content`}
203-
>
204-
{withdrawal.prop_receiving_address}
205-
</Typography>
206-
</Box>
187+
{selectedGATypeId == 2
188+
? proposalData?.proposal_withdrawals?.map(
189+
(withdrawal, index) => (
190+
<Box>
191+
<Box>
192+
<Typography
193+
variant='body1'
194+
color={theme.palette.text.grey}
195+
gutterBottom
196+
>
197+
Receiving address
198+
</Typography>
199+
<Typography
200+
variant='body1'
201+
gutterBottom
202+
data-testid={`receiving-address-${index}-content`}
203+
>
204+
{
205+
withdrawal.prop_receiving_address
206+
}
207+
</Typography>
208+
</Box>
209+
<Box>
210+
<Typography
211+
variant='body1'
212+
color={theme.palette.text.grey}
213+
gutterBottom
214+
>
215+
Amount
216+
</Typography>
217+
<Typography
218+
variant='body1'
219+
gutterBottom
220+
data-testid={`amount-${index}-content`}
221+
>
222+
{withdrawal.prop_amount}
223+
</Typography>
224+
</Box>
225+
</Box>
226+
)
227+
)
228+
: null}
229+
{selectedGATypeId == 3 && pc ? (
230+
<Box>
231+
<Box>
232+
<Typography
233+
variant='body1'
234+
color={theme.palette.text.grey}
235+
gutterBottom
236+
>
237+
New constitution URL
238+
</Typography>
239+
<Typography
240+
variant='body1'
241+
gutterBottom
242+
data-testid='new-constitution-url-content'
243+
>
244+
{pc.prop_constitution_url}
245+
</Typography>
246+
</Box>
247+
248+
{pc.prop_have_guardrails_script && (
249+
<>
207250
<Box>
208251
<Typography
209252
variant='body1'
210253
color={theme.palette.text.grey}
211254
gutterBottom
212255
>
213-
Amount
256+
Guardrails script URL
214257
</Typography>
215258
<Typography
216259
variant='body1'
217260
gutterBottom
218-
data-testid={`amount-${index}-content`}
261+
data-testid='guardrails-script-url-content'
219262
>
220-
{withdrawal.prop_amount}
263+
{pc.prop_guardrails_script_url}
221264
</Typography>
222265
</Box>
223-
</Box>
224-
)): null }
225-
{selectedGATypeId == 3 && pc ? (
226-
<Box>
227266
<Box>
228267
<Typography
229268
variant='body1'
230269
color={theme.palette.text.grey}
231270
gutterBottom
232271
>
233-
New constitution URL
272+
Guardrails script hash
234273
</Typography>
235274
<Typography
236275
variant='body1'
237276
gutterBottom
238-
data-testid="new-constitution-url-content"
277+
data-testid='guardrails-script-hash-content'
239278
>
240-
{pc.prop_constitution_url}
279+
{pc.prop_guardrails_script_hash}
241280
</Typography>
242281
</Box>
243-
244-
{pc.prop_have_guardrails_script && (
245-
<>
246-
<Box>
247-
<Typography
248-
variant='body1'
249-
color={theme.palette.text.grey}
250-
gutterBottom
251-
>
252-
Guardrails script URL
253-
</Typography>
254-
<Typography
255-
variant='body1'
256-
gutterBottom
257-
data-testid="guardrails-script-url-content"
258-
>
259-
{pc.prop_guardrails_script_url}
260-
</Typography>
261-
</Box>
262-
<Box>
263-
<Typography
264-
variant='body1'
265-
color={theme.palette.text.grey}
266-
gutterBottom
267-
>
268-
Guardrails script hash
269-
</Typography>
270-
<Typography
271-
variant='body1'
272-
gutterBottom
273-
data-testid="guardrails-script-hash-content"
274-
>
275-
{pc.prop_guardrails_script_hash}
276-
</Typography>
277-
</Box>
278-
</>
279-
)}
280-
</Box>
281-
) : null}
282+
</>
283+
)}
284+
</Box>
285+
) : null}
282286
{proposalData?.proposal_links?.length > 0 && (
283287
<Box>
284288
<Typography
@@ -324,6 +328,13 @@ const Step3 = ({
324328
<Typography
325329
variant='body1'
326330
component='span'
331+
sx={{
332+
textOverflow: 'ellipsis',
333+
overflow: 'hidden',
334+
maxWidth: isSmallScreen
335+
? '100%'
336+
: '800px',
337+
}}
327338
data-testid={`link-${index}-text-content`}
328339
>
329340
{link?.prop_link_text}

0 commit comments

Comments
 (0)