Skip to content

Commit

Permalink
QuickFix Proposal rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
nebojsajsimic committed Jan 29, 2025
1 parent 32f65cc commit 8cd2980
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 47 deletions.
4 changes: 4 additions & 0 deletions pdf-ui/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ 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.5.10](https://www.npmjs.com/package/@intersect.mbo/pdf-ui/v/0.5.11) 2025-01-29
### Fixed
- Proposal rendering fix

## [v0.5.10](https://www.npmjs.com/package/@intersect.mbo/pdf-ui/v/0.5.10) 2025-01-29
### Fixed
- Some typo fixes.
Expand Down
2 changes: 1 addition & 1 deletion pdf-ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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.5.10",
"version": "0.5.11",
"description": "Proposal discussion ui",
"main": "./src/index.js",
"exports": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1049,8 +1049,6 @@ const SingleGovernanceAction = ({ id }) => {
</Typography>
<ReactMarkdown>
{showFullText || !maxLength ? AbstractMarkdownText : truncatedText}


</ReactMarkdown>
{!showFullText && maxLength && totalCharLength > maxLength && (
<Button
Expand All @@ -1071,69 +1069,37 @@ const SingleGovernanceAction = ({ id }) => {
</Button>)}
</Box>
{showFullText && (
<>

<Box mt={4}>
<Typography
variant='caption'
sx={{
color: (theme) => theme?.palette?.text?.grey,
}}
>
Motivation
Motivation
</Typography>
<ReactMarkdown
components={{
p(props) {
const { children } = props;
return (
<Typography
variant='body2'
data-testid='motivation-content'
style={{
wordWrap: 'break-word',
}}
>
{children}
</Typography>
);
},
}}
>
<ReactMarkdown>
{proposal?.attributes?.content
?.attributes?.prop_motivation || ''}
</ReactMarkdown>
</Box>
</Box>)}
{showFullText && (
<Box mt={4}>
<Typography
variant='caption'
sx={{
color: (theme) => theme?.palette?.text?.grey,
}}
>
Rationale
Rationale
</Typography>
<ReactMarkdown
components={{
p(props) {
const { children } = props;
return (
<Typography
variant='body2'
data-testid='rationale-content'
style={{
wordWrap: 'break-word',
}}
>
{children}
</Typography>
);
},
}}
>
<ReactMarkdown>
{proposal?.attributes?.content
?.attributes?.prop_rationale || ''}
</ReactMarkdown>
</Box>
</Box>)}
{showFullText && (
<Button
variant="text"
onClick={() => setShowFullText(!showFullText)}
Expand All @@ -1149,8 +1115,7 @@ const SingleGovernanceAction = ({ id }) => {
}}
>
{showFullText ? 'Show less' : 'Read more'}
</Button>
</>
</Button>
)}
{proposal?.attributes?.content?.attributes
?.proposal_links?.length > 0 && (
Expand Down

0 comments on commit 8cd2980

Please sign in to comment.