Compare commits

..

2 Commits

Author SHA1 Message Date
admin b5b4024aa4 chore(favicon): 使用预发布环境的图标
Docker Image / Quality and Bundle Budgets (push) Successful in 5s
Docker Image / Build and Push Docker Image (push) Successful in 2m16s
2026-07-18 15:53:34 +08:00
admin 11c1747a68 fix(feedback): show minimum content length 2026-07-18 15:52:19 +08:00
3 changed files with 21 additions and 0 deletions
@@ -59,6 +59,14 @@ describe("FeedbackScreen", () => {
container.querySelector<HTMLInputElement>('input[value="problem"]')
?.checked,
).toBe(true);
expect(container.textContent).toContain(
"Minimum 10 characters required.",
);
expect(
container
.querySelector("textarea")
?.getAttribute("aria-describedby"),
).toBe("feedback-content-hint");
});
it("submits valid text and renders the feedback id", async () => {
@@ -238,6 +238,14 @@ h2.fieldLabel {
font-weight: 570;
}
.contentHint {
margin: -6px 0 0;
color: #998b90;
font-size: 11px;
font-weight: 570;
line-height: 1.4;
}
.imageCount {
flex: 0 0 auto;
color: #8d7c82;
+5
View File
@@ -25,6 +25,7 @@ import {
FEEDBACK_IMAGE_LIMIT,
} from "./feedback-image";
import {
FEEDBACK_CONTENT_MIN_LENGTH,
FEEDBACK_CONTENT_MAX_LENGTH,
useFeedbackSubmission,
} from "./use-feedback-submission";
@@ -143,9 +144,13 @@ export function FeedbackScreen() {
<label className={styles.fieldLabel} htmlFor="feedback-content">
Describe your feedback
</label>
<p id="feedback-content-hint" className={styles.contentHint}>
Minimum {FEEDBACK_CONTENT_MIN_LENGTH} characters required.
</p>
<div className={styles.textareaFrame}>
<textarea
id="feedback-content"
aria-describedby="feedback-content-hint"
value={form.content}
maxLength={FEEDBACK_CONTENT_MAX_LENGTH}
disabled={form.isSubmitting}