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

Add isfs support for seeing everything in a namespace #1161

Open
isc-tleavitt opened this issue Jun 2, 2023 · 11 comments
Open

Add isfs support for seeing everything in a namespace #1161

isc-tleavitt opened this issue Jun 2, 2023 · 11 comments

Comments

@isc-tleavitt
Copy link

To aid in migration from Studio, it would be great to be able to have an isfs folder containing a single view with everything in a namespace, ideally broken down into Classes / Routines / Other / Web Applications as it is in Studio. It would be much cleaner to have a single isfs folder with everything rather than needing to fight with filters to get "Other" (I know ?filter=* will do the trick) or define two folders, one for web application files and one for everything else. (This complicates opening files and working seamlessly between e.g. CSP files and classes.)

(I've had conversations with @isc-bsaviano about feasibility of this and it sounds tricky but maybe possible.)

@isc-bsaviano isc-bsaviano added the enhancement New feature or request label Jun 2, 2023
@isc-bsaviano isc-bsaviano added this to the Backlog Candidates milestone Jun 2, 2023
@isc-bspead
Copy link

Two Thumbs WAY UP for this enhancement request ... this is probably the number one blocker for being able to quickly and easily connect to any server in our organization like we can easily do with Studio

@isc-bsaviano
Copy link
Contributor

For transparency, this is what I communicated to Tim and Ben internally:

That's something I can look into. Using the existing ObjectScript Explorer to get that Studio-style tree may be possible, but getting the UX right is going to be difficult.

The problem with having everything in one ISFS folder is that I can't tell from the URI if the slashes need to be converted to dots when talking to the server about that document. The Abstract Document interface means I can't have a static list of extensions that use dots.

I'm considering this a "backlog candidate" rather than immediately looking into it because it would be a big change and getting the UX right is of utmost importance. I welcome feedback from all users. Note that we did make some improvements to the ISFS folder creation UI recently so users don't have to open the JSON to set a filter. The documentation has been updated to show the new UI.

@isc-jsmith
Copy link

This would be super useful to me - I don't usually need to look at routines, but sometimes I do have to, and with server side editing, I can either have all the code in a single "folder" of an isfs workspace which is cluttered with items I mostly don't need to see, or I can have a multi-root workspace with folders for classes, routines, and includes which seems to slow down VSCode quite a bit.

@gjsjohnmurray
Copy link
Contributor

gjsjohnmurray commented Sep 7, 2023

A .code-workspace file like this seems to do a pretty good job of emulating Studio's Namespace tree:

{
	"folders": [
		{
			"name": "iris:HSCUSTOM Classes",
			"uri": "isfs://iris:hscustom/?filter=*.cls"
		},
		{
			"name": "iris:HSCUSTOM Routines",
			"uri": "isfs://iris:hscustom/?filter=*.mac,*.inc,*.int"
		},
		{
			"name": "iris:HSCUSTOM CSP Files",
			"uri": "isfs://iris:hscustom/?csp=1"
		},
		{
			"name": "iris:HSCUSTOM Other",
			"uri": "isfs://iris:hscustom/?filter=*,'*.cls,'*.mac,'*.inc,'*.int"
		}
	],
	"settings": {}
}

And by appending &mapped=0 to the first two URIs you can eliminate stuff mapped into the namespace from elsewhere (not sure if Studio has an equivalent capability).

The only difference I've spotted so far is that the order of entries in The Other folder differs between Studio and VS Code.

@isc-jsmith can you provide more information about the slowdowns you've seen when doing this sort of thing?

It shouldn't be hard to add an extra button to the Server Manager tree alongside the pencil and eye ones, to add the above 4 roots to the workspace in one click. If there's a concern about this cluttering the UI it could be done by a separate extension, or made configurable by a Server Manager setting.

@isc-jsmith
Copy link

A .code-workspace file like this seems to do a pretty good job of emulating Studio's Namespace tree:

{
	"folders": [
		{
			"name": "iris:HSCUSTOM Classes",
			"uri": "isfs://iris:hscustom/?filter=*.cls"
		},
		{
			"name": "iris:HSCUSTOM Routines",
			"uri": "isfs://iris:hscustom/?filter=*.mac,*.inc,*.int"
		},
		{
			"name": "iris:HSCUSTOM CSP Files",
			"uri": "isfs://iris:hscustom/?csp=1"
		},
		{
			"name": "iris:HSCUSTOM Other",
			"uri": "isfs://iris:hscustom/?filter=*,'*.cls,'*.mac,'*.inc,'*.int"
		}
	],
	"settings": {}
}

And by appending &mapped=0 to the first two URIs you can eliminate stuff mapped into the namespace from elsewhere (not sure if Studio has an equivalent capability).

The only difference I've spotted so far is that the order of entries in The Other folder differs between Studio and VS Code.

This is what I ended up doing. The main issue with this is I can't easily change the filtering using a context menu. Most of the time I don't care about generated code and don't want to see it but some times I do (at least a couple of times a week).

@isc-jsmith can you provide more information about the slowdowns you've seen when doing this sort of thing?

I see slow downs fairly regularly but I haven't been able to pin down the cause. I'm not 100% convinced it's the extension itself, but it did seem worse after switching to multi-root server side workspaces, but in hindsight that could have been partially down to an old computer. It's been fine for a while now.

It shouldn't be hard to add an extra button to the Server Manager tree alongside the pencil and eye ones, to add the above 4 roots to the workspace in one click. If there's a concern about this cluttering the UI it could be done by a separate extension, or made configurable by a Server Manager setting.

@isc-bsaviano
Copy link
Contributor

@isc-jsmith You can change the filter by right-clicking on the workspace folder in the Explorer, then selecting the Modify Server-side Workspace Folder... option:

Screenshot 2023-11-02 at 7 34 04 AM

@isc-jsmith
Copy link

Yeah, but that sends me through the whole "wizard" again and I have to click through and make sure I don't muck up the existing settings. It's replacing 1 click with several.

@isc-bsaviano
Copy link
Contributor

The absolute fastest way to change that is using the Open Workspace Settings (JSON) command from the command palette and modifying the URI yourself. I assume that's what you're already doing.

@gjsjohnmurray
Copy link
Contributor

As part of my entry to the current Developer Tools contest I have published an extension that makes it easy to set up a 4-folder workspace equivalent to Studio's tree.

https://openexchange.intersystems.com/package/DX-Jetpack-for-VS-Code

If you like it please vote for it when voting opens.

@gjsjohnmurray
Copy link
Contributor

Another extension in that pack also adds an easy way to toggle visibility of mapped, generated and system items. One more reason to vote for my entry, or perhaps even sponsor me on GH.

@isc-jsmith
Copy link

As part of my entry to the current Developer Tools contest I have published an extension that makes it easy to set up a 4-folder workspace equivalent to Studio's tree.

https://openexchange.intersystems.com/package/DX-Jetpack-for-VS-Code

If you like it please vote for it when voting opens.

Nice! I've just installed it and it looks great!

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

6 participants
@gjsjohnmurray @isc-bspead @isc-bsaviano @isc-tleavitt @isc-jsmith and others