-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
feat(Composer): Add initial autocomplete support #137
Conversation
it's older than needed however
while account handles can't have characters that would need to be escaped, it doesn't hurt to be future-proof and support other server that might allow them
Looks great so far! I adapted it to libsoup3 & added Tag.search for hashtags - not sure if adding hashtag support in the same provider is the best idea so I left it at that |
Added emojiprovider (might be too strict, I made it check if it starts with but we can switch to contains) I think it can make it on 0.2.0!
Screencast.from.2023-03-31.21-16-02.webm |
I completely forgot that style schemes exist, but now it should respect the app color theme. As for the library version... well, I did manage to compile this PR with |
ah https://gitlab.gnome.org/GNOME/gtksourceview/-/issues/308 fixed in 5.7.1, edit: added a meson arg so we add them when the version is >= 5.7.1 |
Made completion provider use its own image_cache with 1min maintenance since the images have already been freed by the time the user scrolls back in all providers: before Screencast.from.2023-04-02.11-52-33.webmafter Screencast.from.2023-04-02.11-51-39.webm |
This PR enables account handle autocomplete for the Compose dialog.
The implementation depends on
gtksourceview-5
, the library that makes interactive text suggestions possible in other GNOME apps like Text Editor or Builder. I felt reluctant to introduce new dependencies, but I figured this one was probably already available on the host system since we target GNOME.In its current state, it's more of a proof-of-concept (although being a useful thing to have already). If viable, we could iterate on it further:
Gtk.Label
withTuba.LabelWithWidgets
once it's readySourceView
's syntax highlighting. Pleroma supports Markdown/HTML posts, so maybe we could support multiple content types too?Tested against GNOME 44 SDK with
gtksourceview-5
5.8.0.