-
Notifications
You must be signed in to change notification settings - Fork 8.6k
DEV: floatkit autocomplete for d-editor #33513
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0604b4d
to
13a55b6
Compare
tyb-talks
commented
Jul 16, 2025
15ffca8
to
bfadc9c
Compare
f3b4984
to
05e2571
Compare
46e8049
to
03b9759
Compare
app/assets/javascripts/discourse/app/lib/textarea-text-manipulation.js
Outdated
Show resolved
Hide resolved
app/assets/javascripts/discourse/app/static/prosemirror/lib/text-manipulation.js
Outdated
Show resolved
Hide resolved
… better logging of errors
…e function declarations
…ement end position is recalculated at completion time and does not delete based on a cached value that may result in deletion of whole text
… directly into functions
…ender logic to DAutocompleteResults component
…ling to selected result, call onRender on insert, and maintain selected styles between searches that return the same results
… whether to allow the autocomplete menu to trigger
2b58dfc
to
c6e05bc
Compare
davidtaylorhq
approved these changes
Jul 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great to me! 🚀
For anyone following along, we have plans to make further improvements here after this PR is merged. For example: the results themselves will eventually be rendered using an Ember template instead of building raw HTML strings.
renato
approved these changes
Jul 29, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces a modern floatkit-based autocomplete system for the core composer (both rich text / markdown modes), intended to replace the legacy jQuery-based implementation. This will be enabled via a site setting for now. All tests that cover the legacy implementation are duplicated with the site setting enabled to ensure they keep functional parity.
What's changed:
position: absolute
CSS was removed - this didn't seem to affect the old autocomplete during testing, and keeping it broke positioning for the Floatkit-based autocompleteWhat's the same: