Refactor maxHeight handling in messaging and editor components for consistency

This commit is contained in:
MartinBraquet
2026-05-18 18:43:21 +02:00
parent ccb5de6e95
commit 9262e4a2be
3 changed files with 14 additions and 5 deletions

View File

@@ -11,8 +11,8 @@ android {
applicationId "com.compassconnections.app"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 108
versionName "1.25.0"
versionCode 109
versionName "1.26.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
aaptOptions {
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.

View File

@@ -273,7 +273,7 @@ export const SendMessageButton = (props: {
isSubmitting={!editor || submitting}
isDisabled={charCount < MIN_CHARS}
submitOnEnter={false}
maxHeight={'25vh'} // otherwise send button gets hidden (need better fix)
maxHeight={'max-h-[25vh]'} // otherwise send button gets hidden (need better fix)
/>
<p className="text-ink-500 text-xs text-center leading-relaxed">

View File

@@ -223,7 +223,16 @@ export function TextEditor(props: {
onChange?: () => void
maxHeight?: string
}) {
const {editor, simple, hideEmbed, children, className, onBlur, onChange, maxHeight} = props
const {
editor,
simple,
hideEmbed,
children,
className,
onBlur,
onChange,
maxHeight = 'max-h-[69vh]',
} = props
return (
// matches input styling
@@ -234,7 +243,7 @@ export function TextEditor(props: {
)}
>
<FloatingFormatMenu editor={editor} advanced={!simple} />
<div className={clsx(`overflow-auto`, maxHeight ? `max-h-[${maxHeight}]` : 'max-h-[69vh]')}>
<div className={clsx(`overflow-auto`, maxHeight)}>
<EditorContent editor={editor} onBlur={onBlur} onChange={onChange} />
</div>