Skip to content
Open
Show file tree
Hide file tree
Changes from 3 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="wrap-text"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

<style module> 式に

Suggested change
class="wrap-text"
:class="$style.wrapText"

と書いて欲しいかも。他の部分をふくむ

></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="wrap-text"
></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="wrap-text"
></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="wrap-text"
></v-select>
</template>

<style scoped>
.wrap-text :deep(.v-select__selection-text) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
<style scoped>
.wrap-text :deep(.v-select__selection-text) {
<style module>
.wrapText :deep(.v-select__selection-text) {

CSS Modules への変更をお願いしたいです!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

moduleにするんだった。忘れてた。ありがとう!!

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>
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