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

💄 feat: MessageInputTextAreaに縦の伸長を追加 #4375

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
:class="$style.inputTextArea"
:is-posting="isPostingAttachment"
simple-padding
disable-height-limit
@add-attachments="onAddAttachments"
@modifier-key-down="onModifierKeyDown"
@modifier-key-up="onModifierKeyUp"
Expand Down
20 changes: 15 additions & 5 deletions src/components/Main/MainView/MessageInput/MessageInputTextArea.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
rows="1"
:data-simple-padding="simplePadding"
:data-shrink-to-one-line="shrinkToOneLine"
:data-disable-height-limit="disableHeightLimit"
:data-is-mobile="isMobile"
:data-is-firefox="firefoxFlag"
data-testid="message-input-textarea"
Expand Down Expand Up @@ -53,13 +54,15 @@ const props = withDefaults(
isPosting?: boolean
simplePadding?: boolean
shrinkToOneLine?: boolean
disableHeightLimit?: boolean
}>(),
{
modelValue: '',
channelId: '',
isPosting: false,
simplePadding: false,
shrinkToOneLine: false
shrinkToOneLine: false,
disableHeightLimit: false
}
)

Expand Down Expand Up @@ -162,14 +165,21 @@ $vertical-padding: 8px;
padding: $vertical-padding 16px;
// 左から、余白、スタンプパレットボタン、余白、送信ボタン、スクロールバー
padding-right: calc(8px + 24px + 8px + 24px + var(--input-scrollbar-width));
max-height: 160px;
&[data-disable-height-limit='false'] {
&[data-is-mobile='true'] {
max-height: 70px;
}
&[data-is-mobile='false'] {
max-height: 160px;
}
}
&[data-disable-height-limit='true'] {
max-height: none;
}
&[readonly] {
@include color-ui-secondary-inactive;
cursor: wait;
}
&[data-is-mobile='true'] {
max-height: 70px;
}
&[data-simple-padding='true'] {
padding-right: 16px;
}
Expand Down
Loading