Closed
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates form description editing and rendering to support multi-line text, aligning the public form page behavior with the admin preview behavior.
Changes:
- Render
form.descriptionas plain text (instead of HTML) on the public form detail page. - Preserve line breaks in the form description via
white-space: pre-wrap. - Update the admin “form description” field to use a
<TextArea>for multi-line input.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/features/form/components/FormDetailPage.tsx |
Switches form description rendering from dangerouslySetInnerHTML to a plain-text paragraph. |
src/features/form/components/FormDetailPage.module.css |
Preserves newline formatting for the description using white-space: pre-wrap. |
src/features/form/components/AdminFormDetailPages/InfoPage.tsx |
Replaces single-line Input with TextArea for editing the form description. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| @@ -70,6 +70,7 @@ | |||
| color: var(--color-caption); | |||
| font-size: 1rem; | |||
| margin-bottom: 1rem; | |||
There was a problem hiding this comment.
.description is now used on a <p> (FormDetailPage.tsx), but the CSS only sets margin-bottom. Because <p> has user-agent default margins, the top spacing becomes browser-default and differs from the old <div> layout. Consider explicitly setting the margin (e.g., margin: 0 0 1rem 0 or at least margin-top: 0) so spacing is predictable.
Suggested change
| margin-bottom: 1rem; | |
| margin: 0 0 1rem 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of changes
Purpose