Skip to content
Merged
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 @@ -95,6 +95,7 @@ interface BellInputConfig {
count: number;
}

const MAX_SPEAKER_LEN = 5;
export default function TimerCreationContent({
beforeData,
initData,
Expand Down Expand Up @@ -307,14 +308,15 @@ export default function TimerCreationContent({
// SpeechType에 맞게 문자열 매핑
let speechTypeToSend: string;
let stanceToSend: Stance;
if (speaker.trim().length > MAX_SPEAKER_LEN) {
errors.push(`발언자는 최대 ${MAX_SPEAKER_LEN}자까지 입력할 수 있습니다.`);
}

if (currentSpeechType === 'CUSTOM') {
// 텍스트 길이 유효성 검사
if (speechTypeTextValue.length > 10) {
errors.push('발언 유형은 최대 10자까지 입력할 수 있습니다.');
}
if (speaker.length > 5) {
errors.push('발언자는 최대 5자까지 입력할 수 있습니다.');
}

// 발언시간 유효성 검사
if (
Expand Down Expand Up @@ -596,9 +598,12 @@ export default function TimerCreationContent({
<ClearableInput
id="speaker"
value={speaker}
onChange={(e) => setSpeaker(e.target.value)}
onChange={(e) =>
setSpeaker(e.target.value.slice(0, MAX_SPEAKER_LEN))
}
onClear={() => setSpeaker('')}
placeholder="N번 토론자"
maxLength={MAX_SPEAKER_LEN}
placeholder="N번"
Copy link
Contributor

Choose a reason for hiding this comment

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

대안: 발언자 이름 예시 구체화

발언자 이름 예시로 'N번'은 (사람마다 다를 수 있기는 한데) 다소 모호한 느낌을 유발할 수 있을 것 같아요. 아래 2가지 후보 중 하나는 어떠신가요?

  • '1번' | 1번, 2번, 3번 등으로 설정 가능함을 암시
  • '1번, 홍길동 등' | 반드시 번호로만 설정해야 될 필요는 없음을 암시

근데 이 부분 사람에 따라 굉장히 주관적으로 받아들일 것 같기도 해요. 그러니 의견 수렴이나 참고 정도로만 인식하고 읽어 주시면 될 것 같아요.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

이 부분은 오늘 회의에서 이야기 해보는 것도 좋을 것 같습니다.

disabled={
stance === 'NEUTRAL' || currentSpeechType === 'TIMEOUT'
}
Expand Down