Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
18 changes: 18 additions & 0 deletions src/components/information/QuestionEditField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const requiredRule = (v: unknown) => (v === undefined || v === null ? '必須項
:rules="[requiredRule]"
:disabled="!question.isOpen"
variant="underlined"
class="multi-line-select"
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

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

The class name "multi-line-select" is misleading when applied to a v-text-field component. This is a text input field, not a select element. Consider using a more accurate name like "multi-line-input" or "wrap-text" that better describes its purpose of allowing text wrapping.

Copilot uses AI. Check for mistakes.
></v-text-field>
<v-number-input
v-if="question.type === 'free_number'"
Expand All @@ -30,6 +31,7 @@ const requiredRule = (v: unknown) => (v === undefined || v === null ? '必須項
:disabled="!question.isOpen"
variant="underlined"
control-variant="hidden"
class="multi-line-select"
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

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

The class name "multi-line-select" is misleading when applied to a v-number-input component. This is a number input field, not a select element. Consider using a more accurate name like "multi-line-input" or "wrap-text" that better describes its purpose of allowing text wrapping.

Copilot uses AI. Check for mistakes.
></v-number-input>
<v-select
v-if="question.type === 'single'"
Expand All @@ -42,6 +44,7 @@ const requiredRule = (v: unknown) => (v === undefined || v === null ? '必須項
:items="question.options"
:item-value="(option) => option.id"
:item-title="(option) => option.content"
class="multi-line-select"
></v-select>
<v-select
v-if="question.type === 'multiple'"
Expand All @@ -55,5 +58,20 @@ const requiredRule = (v: unknown) => (v === undefined || v === null ? '必須項
:items="question.options"
:item-value="(option) => option.id"
:item-title="(option) => option.content"
class="multi-line-select"
></v-select>
</template>

<style scoped>
.multi-line-select :deep(.v-select__selection-text) {
white-space: normal;
overflow: visible;
text-overflow: clip;
}

:global(.v-list-item-title) {
white-space: normal;
overflow: visible;
text-overflow: clip;
}
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

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

Using :global(.v-list-item-title) without a parent scoping class will affect all v-list-item-title elements across the entire application, which may cause unintended side effects in other components. Following the pattern used in other components like EventEditorSettings.vue and QuestionShowField.vue, this should be scoped to a parent class, such as .multi-line-select :global(.v-list-item-title) to limit its impact to only the dropdown lists within this component.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator

@kitsne241 kitsne241 Dec 11, 2025

Choose a reason for hiding this comment

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

Copilot による Review でも触れられていますが、CSS セレクタで :global とか :deep を使う場合は頭にクラスをつけると影響範囲が限定されて安心できそうです

</style>
Copy link

Copilot AI Dec 11, 2025

Choose a reason for hiding this comment

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

The component uses <style scoped> but other similar components in the codebase (EventEditorSettings.vue, QuestionShowField.vue) use <style module> with $style references in the template. Consider following the existing pattern by using CSS modules for consistency with the codebase conventions.

Copilot uses AI. Check for mistakes.
4 changes: 2 additions & 2 deletions src/mocks/handlers/questions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ export const questionsHandlers = [
},
{
id: 4,
title: 'スキーセット',
title: 'スキーセットを借りるか借りないかを教えてください',
type: 'single',
options: [
{ id: 7, content: '借りる' },
{ id: 7, content: '借りるかもしれないしかりないかもしれない、この文章は長いので折り返される。スキー好き' },
{ id: 8, content: '借りない' },
],
isPublic: false,
Expand Down