Add mfm autocomplete #183

Merged
floatingghost merged 2 commits from solidsanek/pleroma-fe:mfm-autocomplete into develop 2022-10-29 20:50:31 +00:00
Contributor

I thought it could be neat to have an autocomplete like Misskey has for MFM.

A condition was removed that prevented autocomplete to actually autocomplete stuff when only the first character was entered. It doesn't affect the other autocompletes since none of them display their elements if nothing was actually searched. (in that case MFM returns the full list of elements)

I thought it could be neat to have an autocomplete like Misskey has for MFM. A condition was removed that prevented autocomplete to actually autocomplete stuff when only the first character was entered. It doesn't affect the other autocompletes since none of them display their elements if nothing was actually searched. (in that case MFM returns the full list of elements)
solidsanek added 1 commit 2022-10-13 23:47:47 +00:00
ci/woodpecker/pr/woodpecker Pipeline was successful Details
b95bb64ecf
Add mfm autocomplete
floatingghost approved these changes 2022-10-17 16:29:23 +00:00
floatingghost left a comment
Owner

just a small thing, this would be a tad cleaner without the currying assignment (since the first call for emoji is just there to bake in some emoji data), but this works nicely!

approved in principle, but yea, remove the curry and i'll merge it in~

just a small thing, this would be a tad cleaner without the currying assignment (since the first call for emoji is just there to bake in some emoji data), but this works nicely! approved in principle, but yea, remove the curry and i'll merge it in~
@ -22,2 +26,4 @@
return usersCurry(input)
}
if (firstChar === '$' && mfmCurry) {
return mfmCurry(input)

since we don't actually need to curry anything into the function here, you could remove the mfmCurry assignment and return suggestMfm(input)

then change suggestMfm to just be a function input => {...} instead of a function returning a function

since we don't actually need to curry anything into the function here, you could remove the `mfmCurry` assignment and `return suggestMfm(input)` then change suggestMfm to just be a function `input => {...}` instead of a function returning a function
solidsanek marked this conversation as resolved

oh oh also! you might want to only activate these suggestions when the input mode is mfm, since they only make sense in that setting

oh oh also! you might want to only activate these suggestions when the input mode is `mfm`, since they only make sense in that setting
solidsanek added 1 commit 2022-10-22 22:36:17 +00:00
ci/woodpecker/pr/woodpecker Pipeline was successful Details
3c840d1805
Mfm autocomplete: remove unnecessary curry
Author
Contributor

I'm clueless when it comes to FE stuff, but I feel like tracking updates on this input mode is quite a bit of code just for this autocomplete, unless I'm thinking of this implementation the wrong way.
I can add it ofc, I just wanted to make sure I'm not overthinking its implementation when maybe this is already being tracked somewhere and I just overlooked it

I'm clueless when it comes to FE stuff, but I feel like tracking updates on this input mode is quite a bit of code just for this autocomplete, unless I'm thinking of this implementation the wrong way. I can add it ofc, I just wanted to make sure I'm not overthinking its implementation when maybe this is already being tracked somewhere and I just overlooked it

i might poke it later, but for now it's fine, thanks!

i might poke it later, but for now it's fine, thanks!
floatingghost merged commit bda433b006 into develop 2022-10-29 20:50:31 +00:00
floatingghost deleted branch mfm-autocomplete 2022-10-29 20:50:31 +00:00
Sign in to join this conversation.
No description provided.