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

Improve connector names returned by connector search #648

Merged
merged 6 commits into from
Mar 5, 2025

Conversation

nipunayf
Copy link
Contributor

@nipunayf nipunayf commented Mar 5, 2025

Purpose

This is done by:

  1. Applying predefined rules for specific packages
  2. Otherwise concatenating the last prefix of the package name with the client name

@nipunayf nipunayf added the Area/FlowModel Related to the flow model generation LS extension label Mar 5, 2025
@nipunayf nipunayf requested a review from KavinduZoysa as a code owner March 5, 2025 08:22
@nipunayf nipunayf force-pushed the fix-connector-names branch from d0d0b0e to 8172296 Compare March 5, 2025 08:29
@@ -168,7 +168,7 @@
},
{
"metadata": {
"label": "Persist.redis RedisClient",
"label": "Redis RedisClient",
Copy link
Contributor

@NipunaRanasinghe NipunaRanasinghe Mar 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this correct? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we need to keep "persist" in the name. However, also thought of removing "persist" from the search since we're not supporting persistence in the GA.

Copy link
Contributor

@NipunaRanasinghe NipunaRanasinghe Mar 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But in that case we'll end up displaying similar names for 2 modules right? (ballerinax/persist.redis and ballerinax/redis).

if we're not supporting persistence in the GA, one option would be to remove all the persist related modules from the palette and the search itself (and add after the GA)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@@ -264,7 +264,7 @@
},
{
"metadata": {
"label": "Zoho.crm.rest Client",
"label": "Rest Client",
Copy link
Contributor

@NipunaRanasinghe NipunaRanasinghe Mar 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO having only the last part of the package name hierarchy may look ambiguous in many cases.
As an example, something like Zoho CRM Rest Client would be a better option for the above scenario.

Can't we improve our name generation logic accordingly (probably will have to extend the CONNECTOR_NAME_MAP)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hasithaa thoughts?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we make only the common one for now? Ideally this info should come from the library (or from the library team).

Copy link
Contributor Author

@nipunayf nipunayf Mar 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, the package name appears under the label, so the information is still presented (not the best way tho).

Copy link
Contributor

@NipunaRanasinghe NipunaRanasinghe Mar 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we make only the common one for now? Ideally this info should come from the library (or from the library team).

Yes, getting display names from the packages themselves would be ideal.
Until we get there, wouldn’t it be better to add custom mappings for other modules too? (+1 to doing it in a separate PR).

The main reason is that while pro-code users understand package names better, low-code users may find them (especially hierarchical ones) hard to grasp

@nipunayf nipunayf merged commit 11f2e55 into ballerina-platform:main Mar 5, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/FlowModel Related to the flow model generation LS extension
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants