Skip to content

Conversation

@icoxfog417
Copy link
Contributor

変更内容の説明

ユースケースビルダーで入力項目を定義する際、ラベルやオプションに空白が含まれていた場合バリデーションエラーを出すように修正しました。

  • 例えば {{text: 入力}} という定義の場合、"入力"の前に空白があるためエラーが出力されます
  • {{select:選択項目:1, 2, 3, 4}} という場合、オプションの各数字の前に空白があるためエラーが出力されます

画面イメージ
image

背景
特にselectの入力例を設定する際、意図せず空白が含まれていると入力例と空白が含まれたoptionがマッチせず、値が設定されない事態が起こる (#958)。ユースケースの作成者からすると非常に気づきにくいので、ユースケースを定義する段階でバリデーションエラーを表示することで速やかに修正できるようにする

チェック項目

  • npm run lint を実行した
  • 関連するドキュメントを修正した
  • 手元の環境で動作確認済み
  • npm run cdk:test を実行しスナップショット差分がある場合は npm run cdk:test:update-snapshot を実行してスナップショットを更新した

関連する Issue

#958

@icoxfog417
Copy link
Contributor Author

エラーメッセージを i18n 対応
image

@icoxfog417 icoxfog417 force-pushed the feature/check_item_spaces branch from d4e6641 to 4437262 Compare April 8, 2025 13:04
@kazuhitogo kazuhitogo self-requested a review April 14, 2025 01:51
@kazuhitogo
Copy link
Collaborator

再現確認

プロンプトテンプレート側がプルダウンであっても、入力例がフリーフォーマットのため、一致させないことが出来てしまう
image

image image

@kazuhitogo
Copy link
Collaborator

メモ:
あるべき姿は、プロンプトテンプレート側がプルダウンなら入力例もプルダウンにするべきだとは思うが、プロンプトテンプレート側を変更した場合に入力例のチェックも煩雑になりそう

@github-actions
Copy link
Contributor

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Issues or Pull Requests with no updates label May 15, 2025
@github-actions
Copy link
Contributor

This PR was closed because it has been inactive for 14 days since being marked as stale.

@github-actions github-actions bot closed this May 29, 2025
@icoxfog417 icoxfog417 deleted the feature/check_item_spaces branch November 25, 2025 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale Issues or Pull Requests with no updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants