PromucFlow_constructor/app
ashit-rath 1e8a962b8b
chore: Modify logic to detect and hide deep paths in autocomplete suggestions (#33966)
## Description
This PR modifies how the AutocompleteSortRules suppresses paths with
more than 2 level of nesting.

Example: `Table1.selectedRow.address`
A path like the above should be suppressed from autocomplete suggestion
but it should not suppress `.run` of a module instance with autocomplete
params

Example `QueryModule1.run({ limit: 10, user: appsmith.user.name })`
With the above completion, the AutocompleteSortRules's
NoDeepNestedSuggestionsRule check for the `text` property of the
completion and checked agains the value shared in the above example.
This resulted in suppression of the `QueryModule.run` for the
autocomplete list. Therefore the logic now shift from check the `text`
property which is what gets replaced on selection to `displayText` which
is what we see in the autocomplete suggestion.

Fixes https://github.com/appsmithorg/appsmith/issues/33959

## Automation

/ok-to-test tags="@tag.All"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/9378147789>
> Commit: 62c4d96c18b2ed931dbe9d671f1eeaaa5c989059
> Cypress dashboard url: <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=9378147789&attempt=3"
target="_blank">Click here!</a>

<!-- end of auto-generated comment: Cypress test results  -->













## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [x] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Enhanced autocomplete functionality by considering `displayText` for
more accurate suggestions.
- Improved code completion in the test suite by adding a new parameter
`name` with a default value referencing `appsmith.user.name`.

- **Tests**
- Updated test cases to reflect new autocomplete and code completion
features, including new declarations for `fieldEntityInformation`.

- **Refactor**
- Updated internal logic to handle new properties and ensure consistency
across the application.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-06-06 17:38:40 +05:30
..
client chore: Modify logic to detect and hide deep paths in autocomplete suggestions (#33966) 2024-06-06 17:38:40 +05:30
server ci: Disable another hung test (#34023) 2024-06-06 15:29:27 +05:30
util chore: Delete unused app/util/plugin-generation directory (#26966) 2023-09-05 14:48:55 +05:30