morphic icon indicating copy to clipboard operation
morphic copied to clipboard

Make the search box a textarea.

Open skyler14 opened this issue 1 year ago • 6 comments

This change would be relatively minor but fall in line with Google which ditched the input field for a text area a long time ago. It allows for longer inputs, multi-line, doesn't suppress certain characters and formatting, and makes typing a more detailed searrch easier on a phone keyboard. There are actually alot of other compelling reasons why they switched to a textarea, for example better accessibility option handling and being able build better interfaces on top of it.

skyler14 avatar Apr 22 '24 12:04 skyler14

I am new to open source, how can i pick up this issue. Willing to resolve this issue.

Techno-o76 avatar Apr 23 '24 19:04 Techno-o76

@Techno-o76

I appreciate your willingness to work on resolving this issue. You can use the following library for automatically resizing TextArea elements: https://github.com/Andarist/react-textarea-autosize

Please refer to it for your implementation.

miurla avatar Apr 23 '24 20:04 miurla

ThankYou @miurla, I have referred that repo and currently i'm working on it.

Techno-o76 avatar Apr 24 '24 01:04 Techno-o76

@miurla I have tried to add the TextareaAutosize component but its not props are not compatible and throwing multiple errors. Screenshot 2024-04-26 000958

I have tried https://mui.com/base-ui/react-textarea-autosize/components-api/ and it's working perfectly fine without any errors. image

Please review it.

Techno-o76 avatar Apr 25 '24 18:04 Techno-o76

@Techno-o76 Thank you for trying. ReactTextAreaAutosize has already become a convenient component, so there is no need to create a wrapped component. You can look at the implementation of the Vercel Chatbot.

https://github.com/vercel/ai-chatbot/blob/main/components/prompt-form.tsx#L86-L100

miurla avatar Apr 25 '24 21:04 miurla

@Techno-o76 There was a PR from another contributor. I apologize for the inconvenience as you were working on it. I hope you can contribute to another issue.

https://github.com/miurla/morphic/pull/86

miurla avatar Apr 26 '24 04:04 miurla

Btw, only the first text box is a textarea currently. All the same problems still pop up when you continue querying on a thread, so this needs to be copy pasted over that component

@Techno-o76 There was a PR from another contributor. I apologize for the inconvenience as you were working on it. I hope you can contribute to another issue.

#86

skyler14 avatar May 23 '24 20:05 skyler14