Skip to content
Open
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
4 changes: 2 additions & 2 deletions apps/frontend/src/components/FormEndPage/EndPageBlock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ export const EndPageBlock = ({
const mdComponents = useMdComponents({
styles: {
text: {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the fix is here rather than in the shared useMdComponents hook: the reported "bolded bullets" were a symptom, not the bug. EndPageBlock styled its admin-authored paragraph with subhead-1 (weight 500, secondary.500), while every other renderer of primary admin-authored paragraph content — FormInstructions, SectionField, ParagraphField — uses body-1 (weight 400, secondary.700). A survey of all 15 useMdComponents consumers confirmed EndPageBlock was the sole outlier among primary-paragraph renderers (ImageField and FormLabel deviate deliberately, as smaller supporting text). Changing the end-page text style to the shared baseline fixes bullets and plain paragraphs in one move.

Alternatives tried and rejected:

  • A listStyles fallback in useMdComponents so ul picks up styles.text — only patched bullets, left plain paragraphs at weight 500, and added complexity to a shared hook to work around one caller. This was the first implementation attempt and was reverted.
  • Passing explicit list styles from EndPageBlock only — same partial-fix problem.

textStyle: 'subhead-1',
color: 'secondary.500',
textStyle: 'body-1',
color: 'secondary.700',
},
},
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,16 @@ Default.args = {
handleSubmitFeedback: (inputs) => console.log(inputs),
}

export const BulletedParagraph = Template.bind({})
BulletedParagraph.args = {
...Default.args,
endPage: {
...Default.args.endPage!,
paragraph:
'Thank you for registering. What happens next:\n\n* We will review your application\n* You will receive an email within 3 working days\n* Contact us at hello@example.gov.sg if you have questions',
},
}

export const ColorThemeGreen = Template.bind({})
ColorThemeGreen.args = {
...Default.args,
Expand Down
Loading