Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

questionnaire/newのText系の実装 #920

Merged
merged 50 commits into from
Jul 1, 2022
Merged

Conversation

wakashi1
Copy link
Contributor

No description provided.

@wakashi1
Copy link
Contributor Author

レビューお願いします

Copy link
Member

@ryoha000 ryoha000 left a comment

Choose a reason for hiding this comment

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

いい感じだと思います:+1:

src/components/NewQuestionnaire/Questions.vue Outdated Show resolved Hide resolved
@@ -0,0 +1,70 @@
<template>
Copy link
Member

Choose a reason for hiding this comment

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

これをUIいかに置いてくれてるのはいいですね:+1:

src/components/NewQuestionnaire/Forms/QuestionCopy.vue Outdated Show resolved Hide resolved
src/components/NewQuestionnaire/Forms/RequiredSwitch.vue Outdated Show resolved Hide resolved
src/components/UI/Select.vue Outdated Show resolved Hide resolved
src/components/UI/Select.vue Outdated Show resolved Hide resolved
src/components/UI/Select.vue Outdated Show resolved Hide resolved
src/components/UI/Select.vue Outdated Show resolved Hide resolved
src/components/UI/Select.vue Outdated Show resolved Hide resolved
@wakashi1
Copy link
Contributor Author

だいたいは直したんですけど、直してない点が二つくらいあります。
まず一つ目はUI/Select.vueのpointerevents:noneで、これがないと下やじるしみたいなやつの上でSelectの部分が選択できなくなるので残したままにしときました。
二つ目は、Questions.vueの切り出しでQuestionUpdownの部分をQuestion.vueに切り出しませんでした。これはQuestionupdownだけがiに依存していて他は依存していなかったので、Questionupdownとそれ以外で分けたほうがいいかな~と思って切り出しませんでした。
それ以外は直ってると思います。

Copy link
Member

@ryoha000 ryoha000 left a comment

Choose a reason for hiding this comment

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

通話で言ったこと

Comment on lines 13 to 18
<QuestionUpdown
:index="i"
:max="questions.length"
:class="$style.border"
@swap="swapQuestions"
/>
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<QuestionUpdown
:index="i"
:max="questions.length"
:class="$style.border"
@swap="swapQuestions"
/>
<QuestionUpdown
:class="$style.border"
:up-disable="i === 0"
:down-disable="i === questions.length - 1"
@up="() => swapQuestions(i, i - 1)"
@down="() => swapQuestions(i, i + 1)"
/>

こんな感じにしてほしい

@@ -0,0 +1,125 @@
<template>
Copy link
Member

Choose a reason for hiding this comment

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

QuestionContentにしてほしい

return false
}
})
const questionIsRequired = computed(() => props.isRequired)
Copy link
Member

Choose a reason for hiding this comment

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

これ自体なくてよくない?
updateQuestionIsRequiredはprops使えばいい気がする

@wakashi1
Copy link
Contributor Author

figmaをみて直してみました。前のレビューで言われたところでfigmaと違うところがあったので、figmaのほうに合わせたんですが直さないほうがよかったらすみません

import QuestionTypeSelect from './Forms/QuestionTypeSelect.vue'

export default defineComponent({
name: 'Question',
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
name: 'Question',
name: 'QuestionContent',

Comment on lines 19 to 22
index: {
type: Number,
required: true
}
Copy link
Member

Choose a reason for hiding this comment

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

これいらないよね?

questionarray: {
type: Array,
required: true
},
index: {
Copy link
Member

Choose a reason for hiding this comment

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

おなじくいらない?

Comment on lines 45 to 46
width: 28px;
height: 21px;
Copy link
Member

Choose a reason for hiding this comment

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

これは指定しなくていいかな(意図として指定したいのはfontsizeとline-heightなので)

color: $ui-secondary;
}
&:hover {
background-color: $bg-secondary-highlight;
Copy link
Member

Choose a reason for hiding this comment

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

アクションに対して色変えるときはtransitionほしいです

@@ -1,8 +1,13 @@
<template>
<div>
<div :class="[isNumber ? $style.spin : '']">
Copy link
Member

Choose a reason for hiding this comment

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

複雑になっちゃったんでInputTextBaseみたいなのをつくってNumberとTextでわけたいですね

Comment on lines +46 to +49
nonEvents: {
type: Boolean,
default: false
},
Copy link
Member

Choose a reason for hiding this comment

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

pointer-eventsがnoneかどうかっていうprops名じゃなくてどういう場合にこのpropsを渡すのかっていうprops名にしたいです

src/components/UI/ToggleSwitch.vue Outdated Show resolved Hide resolved
background-color: $ui-primary;
width: 34px;
height: 20px;
border-radius: 9999px;
Copy link
Member

Choose a reason for hiding this comment

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

意図が分かりづらいんでheight/2で指定してほしいです

border-radius: 50%;
background-color: $ui-white;
opacity: 1;
Copy link
Member

Choose a reason for hiding this comment

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

いらないかな?

@wakashi1
Copy link
Contributor Author

figmaみたら新規作成のところでInputTextいらなかったぽかったので、直しました。

@wakashi1
Copy link
Contributor Author

wakashi1 commented Jul 1, 2022

InputNumberとInputTextBaseを消しました

Comment on lines 33 to 36
nonEvents: {
type: Boolean,
default: false
},
Copy link
Member

Choose a reason for hiding this comment

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

ここ変えてほしいです

Comment on lines 37 to 40
modelValue: {
type: String,
required: true
}
Copy link
Member

Choose a reason for hiding this comment

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

numberで受け取りたいです

@@ -0,0 +1,139 @@
<template>
<div :class="$style.spin">
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
<div :class="$style.spin">
<div :class="$style.container">

かな

Comment on lines 37 to 40
isLong: {
type: Boolean,
default: false
},
Copy link
Member

Choose a reason for hiding this comment

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

いらない?

Comment on lines 59 to 83
.input {
padding: 4px 8px;
width: 100%;
height: 32px;
@include size-body;
color: $ui-primary;
box-sizing: border-box;
border: none;
border-bottom: $input-border solid $ui-secondary;
outline: none;
&::placeholder {
padding: 4px 8px;
width: 100%;
height: 24px;
@include size-body-small;
color: $ui-secondary;
}
&:hover {
background-color: $bg-secondary-highlight;
transition: 0.1s;
}
&:focus {
background-color: $bg-secondary-highlight;
}
}
Copy link
Member

Choose a reason for hiding this comment

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

ここが多分共通だと思うんでInputBaseでうまいこと共通化したいです

import InputText from './InputText.vue'

export default defineComponent({
name: 'InputTextBase',
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
name: 'InputTextBase',
name: 'InputBase',

@@ -0,0 +1,60 @@
<template>
Copy link
Member

Choose a reason for hiding this comment

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

<tempate>
  <input 共通のクラスを付ける />
</template>

で、InputBaseWithUnderline

<tempate>
  <div>
    <slot />
    <underline />
  </div>
</template>

で、InputTextとかで

<tempate>
  <input-base-with-underline>
    <input-base Text固有のクラスを付ける />
  </input-base-with-underline>
</template>

ですかね?
こっちのほうがスマートじゃね?って思ったら言ってください

@ryoha000
Copy link
Member

ryoha000 commented Jul 1, 2022

コミットされる前のやつを見てコメントしちゃった
まぁ回答画面作るときの参考にしてください

Copy link
Member

@ryoha000 ryoha000 left a comment

Choose a reason for hiding this comment

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

多分いいと思う:+1:

@ryoha000 ryoha000 merged commit 2893465 into master Jul 1, 2022
@ryoha000 ryoha000 deleted the new-question-Implementation branch July 1, 2022 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants