Skip to content

Enable multi-line form descriptions#27

Closed
burnedinthesky wants to merge 1 commit intomainfrom
feat/enable-multi-line-form-desc
Closed

Enable multi-line form descriptions#27
burnedinthesky wants to merge 1 commit intomainfrom
feat/enable-multi-line-form-desc

Conversation

@burnedinthesky
Copy link
Member

@burnedinthesky burnedinthesky commented Feb 24, 2026

Type of changes

  • Feat

Purpose

  • Enable form description support for multi-line form descriptions

Copilot AI review requested due to automatic review settings February 24, 2026 19:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.description as 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;
Copy link

Copilot AI Feb 24, 2026

Choose a reason for hiding this comment

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

.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;

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants