Skip to content
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

Apex Code suggestions works unexpected when suggestion contains number in the name #5966

Open
Paul-Kalynyn opened this issue Dec 4, 2024 · 3 comments

Comments

@Paul-Kalynyn
Copy link

Paul-Kalynyn commented Dec 4, 2024

Summary

Suggestions do not work as expected in Apex(maybe in js/html/css as well) when metadata has prefixes with number. For example we are using "TEST1_" prefixes in all our metadata (Classes/Objects/LWCs and etc.) to represent that it is metadata of the "TEST1" project.

Steps To Reproduce:

  1. Create Apex Class/SObject/(Anything what can be suggested as auto-complete in Apex) and name it with number in the middle (for example "prefix1TestclassName").
  2. Start typing begining of the created Metadata name, stop when number is typed and wait for suggestions. Suggestions is showing this metadata for autocomplete. (for example "prefix1TestclassName" exists, typing "prefix1" will show "prefix1TestclassName" as suggestion.)
  3. Add next symbol of created Metadata name. (for example "prefix1TestclassName" exists, you will type "prefix1T")
  4. Delete this symbol. (for example "prefix1TestclassName" exists, you will type "prefix1T" and then after deleting last symbol it will be "prefix1").

Expected result

Suggestions is showing this metadata for autocomplete.

Actual result

Suggestions is not showing this metadata for autocomplete

Additional information

It doesn't recognize begining of the typed text if there is number in metadata name it tries to suggest and then you delete symbols after number. So, it means not only that it doesn't show suggestions after deleting of those symbols, but it also means that if after that you try to type middle of the metadata name, then It will suggest to insert its full name without replacing previously typed begining of the name:
Start typing
image
Delete last symbol and type it back. In this case "T" have been deleted and typed back.
image
Continue typing of required class until expected suggestion appears again
image
Apply suggestion. Expected "pref1TestClassWithoutUnderscore", but get "pref1pref1TestClassWithoutUnderscore"
image

Salesforce Extension Version in VS Code: v62.5.1

Salesforce CLI Version: 2.67.7

OS and version: Windows 11 Enterprise 10.0.26100

VS Code version: 1.95.3

Most recent version of the extensions where this was working: It has never worked.

@Paul-Kalynyn Paul-Kalynyn changed the title Apex Code suggestions works unexpected when suggestion contains number in the sf name Apex Code suggestions works unexpected when suggestion contains number in the name Dec 4, 2024
@svc-idee-bot
Copy link
Collaborator

Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.

Copy link

git2gus bot commented Dec 5, 2024

This issue has been linked to a new work item: W-17379061

@CristiCanizales
Copy link
Contributor

Hi @Paul-Kalynyn! Thank you for creating this issue and sorry for the inconveniences. I was able to reproduce this and created a bug to address it.

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

No branches or pull requests

3 participants