-
Notifications
You must be signed in to change notification settings - Fork 126
Actions/Custom Variables/Profiles overhaul #2942
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
Signed-off-by: Seb Julliand <sjulliand@arcadsoftware.com>
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
Signed-off-by: Seb Julliand <sjulliand@arcadsoftware.com>
Signed-off-by: Seb Julliand <sjulliand@arcadsoftware.com>
Signed-off-by: Seb Julliand <sjulliand@arcadsoftware.com>
|
👋 A new build is available for this PR based on 47af944. |
worksofliam
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Initial review :)
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
|
👋 A new build is available for this PR based on f995092. |
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
|
👋 A new build is available for this PR based on 744abdd. |
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
|
Found the issue...creating a variable and escaping the value prompt would create a variable with undefined value. I fixed that and also prevented loading undefined variable values, just to be safe.
I couldn't reproduce this one. Since it pass the library list onto
I don't think so. |
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
|
Thanks again for your review and your suggestions @SanjulaGanepola 😄 Here goes:
Back at you for a (hopefully) final review 😅 Thanks! |
SanjulaGanepola
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't reproduce this one. Since it pass the library list onto content.validateLibraryList, could you check your Code for i output after you see that dialog with the wrong library being reported? Since the name is valid, I assume that liblist is reporting something weird.
Found the problem with the library list -> In the screenshot below, SANJULA exists and SANJULA1 doesn't, but SANJULA is still found in the string so it complains about it:

Found another issue -> If you make some changes to a profile (ie. add/delete variables, change library list, add/delete filters) and then go to edit the profile, the contents displayed is outdated since it wasn't saved back to the profile yet. For example, the mis-matching variables below. Similar to 4bff5c3, maybe we need to apply changes back to the active profile directly?

Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
…e methods Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
|
Thanks @SanjulaGanepola ; I sorted it out.
Back to you 🙏🏻 |
SanjulaGanepola
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sebjulliand Awesome! Everything is working as expected now and code changes look good. I just suggested below some minor tweaks to casing for some strings.
Co-authored-by: Sanjula Ganepola <32170854+SanjulaGanepola@users.noreply.github.com>
Signed-off-by: Seb Julliand <sebjulliand@gmail.com>
|
Thanks you @SanjulaGanepola , your suggestions are now commited. |
SanjulaGanepola
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!!
|
Thank you @SanjulaGanepola, for your review and advices. |



Fixes #2618
Fixes #1451
Changes
This PR introduce a new

Contextview as a replacement to theConnection Profilesview.It is intended to enhance the user experience regarding the management of Actions, Custom Variables and Profiles.
It also introduces a new
CustomEditorclass that works likeCustomUIbut allows to open custom editors instead of custom panels.Actions
Actions are regrouped in three local categories, always displayed:
Optionally, there will be additional categories for each workspace declaring local actions (in a local
.vscode/actions.jsonfile). These categories are named after the workspace they come from.The actions available at the

Actionsnode level are:Create a new action
Setup local actions
Search actions
search match.Go to next search result
Clear search results
Creating a new action is also available on each

Action Typenode.Clicking on an action opens the action editor. Making a change to the action will make the editor dirty and saving the action is done like in any editor, using

Save(ctrl+s). The action panel was simply turned into an editor.Right-clicking on an action gives access to these options:

Standard actions and local actions are managed the same way in the UI; they are saved in the connection settings or in the local workspace file depending on their nature.
When an editor is open, an inline action is available on each action to run it on the active editor:

Checking of the action can run on the active editor is done when the action is executed.
Custom Variables
Each variable declared in the current connection settings are listed here and can be created/changed/deleted from this view.


Clicking on variable lets you change its value.
Profiles
Command profiles and Connection profiles have been merged - a process will run when the extension starts to create profiles out of existing Command profiles and show a dialog to warn the user the Command profiles have been migrated.
Profiles can be created from the

Profilesnode using one of these inline actions:Clicking on a profile opens the Profile editor that lets the user change some of the profile settings - object filters, IFS shortcuts and Custom variables are simply listed:


Right-clicking on a profile gives access to these options:

Activating a profile is done using the related inline action on the profile:

Activating a profile will replace the current settings with the profile's. Before the settings are replaced, they are saved back into the profile they belong to, or into the default profile if no profile was active (default profile is a unique profile with no name). This allows to automatically save the profile state before it gets erased.
The active profile is shown in green in the list, and it can't be deleted:

Its name is shown in the context description as well:

Switching back to the default profile is done using the action that appears on the Profiles node inline actions:

When a profile has a Library List Command (formerly a

Command Profile), that command is ran and the library list is computed from it when the profile is activated. That operation can be re-run after the profile is made active by clicking the inline action on the profile item (the action only shows up if that profile has a library list command):How to test this PR
a. Try generating local actions and make sure they are managed correctly in the local file
a. Make sure custom variables are saved on the profile
b. Make sure settings are correctly saved into the profile so they don't get lost when re-activating it
c. Make sure the UI is consistent with the profile's content (views must be refreshed, etc)
Checklist