Skip to content

Enhanced AutoComplete Hinter #3401

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

Conversation

Harshit-7373
Copy link
Contributor

Fixes #3078

Changes:

  1. In this PR, I have enhanced the autocomplete hinter feature. Previously, when no hints were available, it displayed an empty list. Now, I have ensured that the "No results found" message is displayed correctly when no hints are available.
Screenshot 2025-03-18 at 12 01 26 AM This image shows the Correct implementation of the "No Results Found".

I have verified that this pull request:

  • has no linting errors (npm run lint)
  • has no test errors (npm run test)
  • is from a uniquely-named feature branch and is up to date with the develop branch.
  • is descriptively named and links to an issue number, i.e. Fixes #123

@Harshit-7373
Copy link
Contributor Author

@raclim , I believe this step is a significant enhancement for the feature. I think the only remaining task in this pull request is to finalize the design for the "No Results Found" message.

@Harshit-7373 Harshit-7373 changed the title Enhanced AutoComplete Hinter #3078 Enhanced AutoComplete Hinter Mar 17, 2025
@Jatin24062005
Copy link
Contributor

Hey @Harshit-7373, this is a maybe nice enhancement & Implementation for now i didn't looked into the Code you have written, but I have some concerns.

User Experience: The "No results found" message might feel frustrating when users are actively writing, especially when defining their own class methods or writing comments. Constantly seeing this message could be distracting.

Handling User-Defined Suggestions: Does this implementation account for user-defined hints? From what I know, CodeMirror’s hinter doesn’t always detect custom methods properly. If this only works for built-in hints, it might not behave as expected in all scenarios.

f the "No results found" message updates frequently, it might add unnecessary re-renders or DOM updates.

Does this message appear and disappear smoothly without causing UI flickers?

Have you tested how this impacts performance when a user types quickly?

Would love to hear your thoughts on these points! Thanks again for the effort! @raclim @Harshit-7373

@raclim
Copy link
Collaborator

raclim commented Mar 28, 2025

Thanks so much for taking the time to look into this!

After reviewing this PR, it doesn't seem to align with the original goals outlined in the issue, which were:

  • Adding autocomplete hints for variables, functions, and classes
  • Providing an option to access documentation for interacting with p5.js code
  • Allowing users to jump to a variable, function, or class within the sketch itself

Additionally, the current implementation shows the autocomplete hinter persistently, which can sometimes get in the way—especially in cases where users aren't referencing the p5.js library, like when they're simply writing a string (as shown below). Ideally, we’d also like the hinter to appear more contextually, since having it always visible can feel a bit intrusive. We've also received feedback from users who prefer a subtler, less disruptive autocomplete experience.

Screenshot 2025-03-28 at 3 58 17 PM

Since these features are planned to be part of the GSoC project, we’d like to reserve this work for that initiative to ensure everything is addressed holistically.

For these reasons, we won’t be able to move forward with merging this PR.

@raclim raclim closed this Mar 28, 2025
@raclim
Copy link
Collaborator

raclim commented Mar 28, 2025

Sorry I didn't see your suggestions @Jatin24062005, but yes, I do agree with the points surrounding user experience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improved Autocomplete Hinter
3 participants