cds-snc / cds-snc/platform-forms-client

When rendering richText component on frontend, titleEn/Fr should not be rendered

Open
#6,563 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
46
Forks
16
Avg merge
1d 10h
Merged PRs (30d)
82

Description

## Description
Had a template that somehow had text in a titleFr property of a richText element. RichText elements only use the descriptionEn/Fr properties for content. Not sure how the text got there, but one problem is that when rendering the frontend form, the text in titleFr was being rendered to screen. We should not render titleEn/Fr on richText elements.

## Steps to reproduce
See attached form file. There is one richText element with some text in the titleEn/Fr properties. Load the form, see the text that should not be displayed.

[test-2025-12-12.json](https://github.com/user-attachments/files/24134327/test-2025-12-12.json)

Contributor guide

Open the contributing guide

Research direction

Start with the attached test-2025-12-12.json and load it in the frontend to reproduce the richText rendering issue. Trace the richText component or rendering entry point, then verify that titleEn/titleFr are not displayed while descriptionEn/descriptionFr remain visible.

Written by the indexing model from the issue text.

Assessment

Tech stack
nextjs, typescript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.