webscopeio / react-textarea-autocomplete

📝 React component implements configurable GitHub's like textarea autocomplete.
MIT License
454 stars 80 forks source link

Keep the position of the popup at the beginning of the phrase #53

Closed jvorcak closed 6 years ago

jvorcak commented 6 years ago

I'm trying to create a markdown editor around this tool and I want to replicate the one Github has. I'm trying to focus on detail and UX and one of the things that bothers me that popup moves as I type. I find it quite distracting.

If you notice, the one on Github stays positioned at the place where I started typing triggerChar

Don't you think it would be nicer / more user friendly?

PS: API is pretty low level, but well-structured. I got basically everything I needed for the wrapper. 🥇

jukben commented 6 years ago

That's definitely a great idea! I'm going to introduce this as a feature. 💪

I'm probably going to release this as a default behavior (and new control prop movePopupAsYouType to enforce the current one behavior) along with caretPosition: "next" (currently "start") as a default in the next major release 2.0.

Thanks for the idea I totally agree that it would be better for the UX.

jukben commented 6 years ago

Closed by https://github.com/webscopeio/react-textarea-autocomplete/commit/bff575a1b9e66bd69a21fa1671433480e5afb3f7

jukben commented 6 years ago

Check out the 2.0.0 version! 🚀 Hope you like it