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

Connection browser enhancements #1845

Merged

Conversation

chrjorgensen
Copy link
Collaborator

Changes

This PR adds some enhancements to the server browser:

  • add a sort connection option

image

  • add Rename Connection menu item

image

  • remove most connection commands from command palette
  • only show Connection Settings in command palette when connected
  • remove cached server settings when option is changed to disable

Checklist

  • have tested my change
  • Remove any/all console.logs I added
  • eslint is not complaining

@chrjorgensen chrjorgensen self-assigned this Feb 14, 2024
@chrjorgensen chrjorgensen added the enhancement New feature or request label Feb 14, 2024
@@ -45,6 +45,9 @@ export const fr: Locale = {
'connectionBrowser.connectTo.lastUsed': `Dernière utilisation: {0}`,
'connectionBrowser.connectTo.title': `Dernières connexions IBM i`,
'connectionBrowser.connectTo.error': `Utilisez l'Explorateur de Serveur pour sélectionner le serveur auquel se connecter.`,
'connectionBrowser.renameConnection.prompt': `Rename connection {0}`,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@sebjulliand Could I ask you to translate these three new texts into French? 🙏

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sure thing buddy!

@worksofliam
Copy link
Contributor

Not part of my review but an issue nonetheless:

If I rename a connection, enter a new name, and get this error:

image

But then if I refresh the view, the name is updated correctly.

@chrjorgensen
Copy link
Collaborator Author

@worksofliam Could your error be caused by some "molested" configuration settings in VS Code, where the name attribute is not there as expected?

I've seen many examples of this in my own settings - like the "button" = "save"example, which is also seen in other users settings in some of the issues...

A connection has values in up to four different places in the settings / storage, and currently there is a danger in the code, that only part of them gets the new name for the connection. So be careful when testing - do not test on important connections!

I will add a try-catch block to catch any errors and not update anything if errors occurred - stay tuned...

@chrjorgensen
Copy link
Collaborator Author

@worksofliam Error handling has been added and you should get more error information - and not get any connection changed if error occurred. (Tested this with settings.json opened - cool to see the file being updated by the rename command!)

@sebjulliand Now even more messages to translate to French... 😉

Copy link
Collaborator

@sebjulliand sebjulliand left a comment

Choose a reason for hiding this comment

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

Looks good and works fine so far! Thank you!
Just some very minor style change were requested, but that's just me being me.

@@ -45,6 +45,9 @@ export const fr: Locale = {
'connectionBrowser.connectTo.lastUsed': `Dernière utilisation: {0}`,
'connectionBrowser.connectTo.title': `Dernières connexions IBM i`,
'connectionBrowser.connectTo.error': `Utilisez l'Explorateur de Serveur pour sélectionner le serveur auquel se connecter.`,
'connectionBrowser.renameConnection.prompt': `Rename connection {0}`,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Sure thing buddy!

chrjorgensen and others added 3 commits February 17, 2024 16:52
Co-authored-by: Sébastien Julliand <[email protected]>
Co-authored-by: Sébastien Julliand <[email protected]>
Co-authored-by: Sébastien Julliand <[email protected]>
Copy link
Collaborator

@sebjulliand sebjulliand left a comment

Choose a reason for hiding this comment

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

Brilliant! Let's merge!

@sebjulliand sebjulliand merged commit 7c12bc2 into codefori:master Feb 17, 2024
1 check passed
@chrjorgensen chrjorgensen deleted the feature/connection-browser-enhancements branch February 17, 2024 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants