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

Mobile UI Improvements #1567

Merged
merged 1 commit into from
Mar 23, 2024
Merged

Conversation

chatgpt-ai-user
Copy link
Contributor

Fix parts that degrade mobile experience (only on small screens)

  • Margin adjustment
  • Remove bottom margin that appears when toggling the sidebar
    (Fixed an issue where the chat on the right was not properly focused after clicking the sidebar chat list)
  • Remove horizontal scrolling that occurs even when the sidebar is hidden (ios safari)
  • etc

Please understand the awkwardness caused by the translator :)

@chatgpt-ai-user
Copy link
Contributor Author

chatgpt-ai-user commented Mar 15, 2024

Fixed / ios safari issue: Problem with not focusing after chat loading in production build. It works normally in dev mode :(

@haydenkong
Copy link

This is great!

@ivanfioravanti
Copy link
Contributor

Great one!

@mckaywrigley
Copy link
Owner

Great work!!!

@mckaywrigley mckaywrigley merged commit 063001c into mckaywrigley:main Mar 23, 2024
@secondtruth
Copy link

@chatgpt-ai-user @mckaywrigley Now the prompt input always shows this shortened text:

image

I think, it would be better to keep the longer text for the desktop version...

image

... and use the shorter one only for mobile, and switch between them conditionally.

@chatgpt-ai-user
Copy link
Contributor Author

chatgpt-ai-user commented Mar 23, 2024

PR is closed so I wrote the code :)

components\chat\chat-input.tsx

<TextareaAutosize
  textareaRef={chatInputRef}
  className="ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring text-md flex w-full resize-none rounded-md border-none bg-transparent px-14 py-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50"
  placeholder={t(
    window.innerWidth < 768
      ? `Ask anything. Type @  /  #  !`
      : window.innerWidth < 1280
        ? `Ask anything. Type " @ "(assistants), " / "(prompts), " # "(files), " ! "(tools)`
        : `Ask anything. Type "@" for assistants, "/" for prompts, "#" for files, and "!" for tools.`
  )}
  onValueChange={handleInputChange}
  value={userInput}
  minRows={1}
  maxRows={18}
  onKeyDown={handleKeyDown}
  onPaste={handlePaste}
  onCompositionStart={() => setIsTyping(true)}
  onCompositionEnd={() => setIsTyping(false)}
/>

Chr96er pushed a commit to Chr96er/chatbot-ui that referenced this pull request May 26, 2024
Co-authored-by: chatgpt-ai-user <chatgpt-ai-user>
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.

5 participants