Skip to content

Commit

Permalink
feat(issue summary): Remove impact from issue summary, support bullets (
Browse files Browse the repository at this point in the history
#79689)

Removes the impact section and tweaks the formatting to let a bulleted
summary render nicely.
<img width="772" alt="Screenshot 2024-10-24 at 10 12 35 AM"
src="https://github.com/user-attachments/assets/f09dcfac-1037-4c02-9b59-ed4a2573d935">
  • Loading branch information
roaga authored Oct 24, 2024
1 parent 8a4dfe6 commit c8064d2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
4 changes: 1 addition & 3 deletions static/app/components/group/groupSummary.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ describe('GroupSummary', function () {
expect(await screen.findByText('Test headline')).toBeInTheDocument();

await userEvent.click(screen.getByText('Test headline'));
expect(screen.getByText('Test impact')).toBeInTheDocument();
expect(screen.getByText('Test summary')).toBeInTheDocument();
});

it('does not render the summary if no consent', async function () {
Expand Down Expand Up @@ -136,7 +136,6 @@ describe('GroupSummary', function () {

expect(screen.queryByText('Test headline')).not.toBeInTheDocument();
expect(screen.queryByText('Test summary')).not.toBeInTheDocument();
expect(screen.queryByText('Impact: Test impact')).not.toBeInTheDocument();
});

it('does not render the summary if the issue is not in the error category', function () {
Expand Down Expand Up @@ -177,6 +176,5 @@ describe('GroupSummary', function () {

expect(screen.queryByText('Test headline')).not.toBeInTheDocument();
expect(screen.queryByText('Test summary')).not.toBeInTheDocument();
expect(screen.queryByText('Impact: Test impact')).not.toBeInTheDocument();
});
});
19 changes: 4 additions & 15 deletions static/app/components/group/groupSummary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ export function GroupSummary({groupId, groupCategory}: GroupSummaryProps) {
<HeadlinePreview>{data.headline}</HeadlinePreview>
<SummaryPreview
dangerouslySetInnerHTML={{
__html: singleLineRenderer(`Details: ${data.summary}`),
__html: singleLineRenderer(
`Details: ${data.summary.replaceAll('\n', ' ').replaceAll('-', '')}`
),
}}
/>
</Fragment>
Expand All @@ -126,16 +128,9 @@ export function GroupSummary({groupId, groupCategory}: GroupSummaryProps) {
<Content>
<SummaryContent
dangerouslySetInnerHTML={{
__html: marked(`**Details:** ${data.summary}`),
__html: marked(data.summary),
}}
/>
<ImpactContent>
<SummaryContent
dangerouslySetInnerHTML={{
__html: marked(`**Impact:** ${data.impact}`),
}}
/>
</ImpactContent>
</Content>
)}
{openForm && !isPending && (
Expand Down Expand Up @@ -234,19 +229,13 @@ const SummaryContent = styled('div')`
}
`;

const ImpactContent = styled('div')`
display: flex;
flex-direction: column;
`;

const Content = styled('div')`
display: flex;
flex-direction: column;
gap: ${space(1)};
`;

const ButtonContainer = styled('div')`
margin-top: ${space(1.5)};
align-items: center;
display: flex;
`;
Expand Down

0 comments on commit c8064d2

Please sign in to comment.