Add mfm autocomplete #183
No reviewers
Labels
No labels
a11y
Bug
Bug fix
Critical Priority
Documentation
Feature
Feature request
Held for next release cycle
High Priority
Low Priority
Medium Priority
Minor change
Translation/Locale
WIP
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: AkkomaGang/akkoma-fe#183
Loading…
Reference in a new issue
No description provided.
Delete branch "solidsanek/pleroma-fe:mfm-autocomplete"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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)
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 andreturn suggestMfm(input)
then change suggestMfm to just be a function
input => {...}
instead of a function returning a functionoh oh also! you might want to only activate these suggestions when the input mode is
mfm
, since they only make sense in that settingI'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!