Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useFormResponses } from "@/features/form/hooks/useFormResponses";
import { useArchiveForm, useDeleteForm, useUpdateForm } from "@/features/form/hooks/useOrgForms";
import { useSections } from "@/features/form/hooks/useSections";
import * as api from "@/features/form/services/api";
import { Button, Input, LoadingSpinner, Switch, Tooltip, useToast } from "@/shared/components";
import { Button, Input, LoadingSpinner, Switch, TextArea, Tooltip, useToast } from "@/shared/components";
import type { FormsForm } from "@nycu-sdc/core-system-sdk";
import { Archive, Trash2 } from "lucide-react";
import { useEffect, useMemo, useState } from "react";
Expand Down Expand Up @@ -156,7 +156,7 @@ export const AdminFormInfoPage = ({ formData }: AdminFormInfoPageProps) => {
</section>
<h3>表單設定</h3>
<Input label="表單標題" placeholder="輸入表單標題" value={title} onChange={e => setTitle(e.target.value)} />
<Input label="表單描述" placeholder="輸入表單描述" value={description} onChange={e => setDescription(e.target.value)} />
<TextArea label="表單描述" placeholder="輸入表單描述" value={description} onChange={e => setDescription(e.target.value)} />
<Input label="確認訊息" placeholder="輸入表單提交後顯示的訊息" value={confirmMsg} onChange={e => setConfirmMsg(e.target.value)} />
<Input label="開始日期" type="date" value={publishTime} onChange={e => setPublishTime(e.target.value)} />
<Input label="結束日期" type="date" value={deadline} onChange={e => setDeadline(e.target.value)} />
Expand Down
1 change: 1 addition & 0 deletions src/features/form/components/FormDetailPage.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -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.
white-space: pre-wrap;
}

.sectionHeader {
Expand Down
2 changes: 1 addition & 1 deletion src/features/form/components/FormDetailPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ export const FormDetailPage = () => {
)}
</div>
<h1 className={styles.title}>{form.title}</h1>
{currentStep === 0 && form.description && <div className={styles.description} dangerouslySetInnerHTML={{ __html: form.description }} />}
{currentStep === 0 && form.description && <p className={styles.description}>{form.description}</p>}
<h2 className={styles.sectionHeader}>{currentSection.title}</h2>
{currentSection.description && <div className={styles.sectionDescription} dangerouslySetInnerHTML={{ __html: currentSection.description }} />}
</div>
Expand Down