-
Posts
6,671 -
Joined
-
Last visited
-
Days Won
366
Everything posted by bernhard
-
It does not work in general or when using SSH FS? I guess it is not possible to work via SSH FS at all, because the extension indexes all LOCAL workspace files on startup and then creates the intellisense. Thats the same with things like the "find in folder" feature. That's why I prefer to develop locally and not remotely over FTP/SSH like I did some months ago. Combining it with all the great git support of VSCode it's a great environment ?
- 246 replies
-
- visual studio code
- vsc
-
(and 2 more)
Tagged with:
-
Everything works great here so far. I'm doing authentication with ssh keyfiles generated via git bash: https://git-scm.com/book/en/v2/Git-on-the-Server-Generating-Your-SSH-Public-Key These are my settings: The extensions do different things (as far as I understood)! FFHFS includes the file system of the remote server into your workspace. This is great to edit remote files on the fly. I just open the connection to my remote server, browse the tree down from the initial start at /var/www/vhosts, edit the file and save it. Perfect! The other extension is nice to connect to the server in the terminal. That can be handy to do a htop or to watch logfiles (tail -f /your/file): Left = vscode connected to my server, right = tracy console on a remote website using the file log function l(). That is great for monitoring resource intensive tasks like huge imports.
- 246 replies
-
- 1
-
-
- visual studio code
- vsc
-
(and 2 more)
Tagged with:
-
Same here!! Awesome!! This makes vscode even more brilliant ??? Let's continue to discuss this in the vscode thread:
-
Yeah, I actually think that is probably cleanest - thanks! awesome! thx ? Also, your Tracy Debugger module is an all-in-one Swiss Army Knife module to support development in general, so this feature would also be welcome. While I agree that it would be welcome I have to say that I haven't had a need for this module yet and will probably not have in the near future. I agree that it makes sense to integrate some modules into tracy, but I don't think it's a good idea to leave adrian alone with that effort. Even though he seems to be similar to ryan from a productivity point of view (do those two ever sleep? ?? ). I've done a little contribution once (field code) and it was not that hard. But maybe @adrian you could write up a little tutorial to show us how we can contribute to tracy. How everything plays together, what helpers are there, what css classes you use in general (or how we can inspect all that). Something like a quickstart of tracy extension building. Maybe this could make tracy more of a teamwork than an (absolutely awesome) one-man-show? Maybe tracy could even be built a little differently to support 3rd party modules. Just like you did recently with the admin actions module (https://processwire.com/talk/topic/14921-admin-actions/?do=findComment&comment=173496). I'm not requesting this, I'm just thinking out loud here. Maybe I should - I have on occasion, but maybe I should more often! It would then also make sense to streamline the way of collaboration and have a standard workflow centralized on git.
-
Sure! I think we just have to start with one. All the others will come up automatically while we are developing. At least it is like this for me while working with vscode ? Knowing about the snippets I just create one whenever I come over something that I need over and over again. --- Back to VSCode --- Thx to @elabx I installed https://marketplace.visualstudio.com/items?itemName=Kelvin.vscode-sshfs#overview and it's absolutely brilliant. Just configure your remote servers and login easily from the command panel: Or via the GUI: I also installed this extension to open the terminal of my remote servers directly in vscode: https://marketplace.visualstudio.com/items?itemName=seanchann.sshlogin All those little tweaks of the last days makes me a lot more productive. And it's a lot more fun. Thx to everybody for the fruitful discussion! ?
- 246 replies
-
- 1
-
-
- visual studio code
- vsc
-
(and 2 more)
Tagged with:
-
Not sure. Didn't know ACE even supports snippets! Crazy ? Personally I don't use the file editor at all (yet?). I use the console a lot, but would have never needed one of those snippets inside the console (for example the module snippet here https://processwire.com/talk/topic/17550-visual-studio-code-for-processwire-developers/?do=findComment&comment=173964 is mainly because of the intellisense hint, but we don't have that in ace, do we?). What I do a lot in the console is looping over pagearrays, so that could be a nice first testsnippet ?
- 246 replies
-
- 1
-
-
- visual studio code
- vsc
-
(and 2 more)
Tagged with:
-
Yes, that's handy ? If you add the "HookEvent" type definition to the parameter you even get intellisense:
- 246 replies
-
- visual studio code
- vsc
-
(and 2 more)
Tagged with:
-
snippet mania continues ? "Add hook with separate method": { "prefix": "hook", "body": [ "\\$this->wire->addHook$1('$2', \\$this, '$3');$0", "/**", " * $4", " */", "public function $3(HookEvent \\$event) {", " $5", "}", ], "description": "Add hook with separate method" }, "Add hook with closure": { "prefix": "hook", "body": [ "\\$this->wire->addHook$1('$2', function(HookEvent \\$event) {", " $0", "});", ], "description": "Add hook with closure" },
- 246 replies
-
- 3
-
-
-
- visual studio code
- vsc
-
(and 2 more)
Tagged with:
-
Do you have the wire folder in your project?
- 246 replies
-
- visual studio code
- vsc
-
(and 2 more)
Tagged with:
-
I vote for striped rows, no red, no green, just set the X to invisible or light grey. Checkmark means access, empty cell means no access. No warning colour but still easy to distinguish (better than without any colouring). @adrian why don't you create a temporary branch for such updates? We could then play around and give feedback or prs. Why sending zip files around?
-
I recently tend to do this, don't know about any best practises, though: That's the only thing where I'm not 100% happy so far. The available plugins that I tried are all somewhat clumsy/bloated/complicated. When I need to edit files directly I browse my server with WinSCP and then I can just double-click the file and it opens in VSCode. I can then edit and save this file from inside VScode and it gets uploaded automatically. For all other edits I switched to a git-setup, so I don't need direct edit via FTP any more. Meanwhile we also have Tracy+File Editor Panel for quick on-demand server edits.
-
I think it's good to have some color. What about the colors of the console - active = white, inactive = light blue: Understand. Thx ?
-
snippets are awesome! thx @kongondo, 2 more ? "Input get Variable": { "prefix": "get", "body": "\\$this->wire->input->get->$0", "description": "Input get Variable" }, "Input post Variable": { "prefix": "post", "body": "\\$this->wire->input->post->$0", "description": "Input post Variable" },
- 246 replies
-
- 2
-
-
- visual studio code
- vsc
-
(and 2 more)
Tagged with:
-
I strongly vote against using the red color at all. IMHO having "no access" colored red is wrong, if you want the role not to have access! So it would be indicating a problem where everything is actually fine.
-
Better imho! I think it could even be grey instead of orange. I'll play around with it one day, but atm I'm busy with other stuff and don't need to care about permissions a lot ? Maybe @tpr comes up with a good suggestion... This isn't about permissions in the sense you are talking about. It's just for these page permissions: https://github.com/processwire/processwire/blob/341342dc5b1c58012ae7cb26cffe2c57cd915552/wire/core/Page.php#L88-L107 Maybe it needs to be reimagined, but that was my initial goal for this. What does everyone think? Oh. I also thought it would list all available permissions. Didn't know about that one. You are absolutely right. Anyhow, it was just an idea. Personally I don't have a need at all for such a panel, but I'm quite sure it can be very handy to have one day...
-
VSCode in my home.php template file (note the marked php start and end tag because I had my cursor there which is not visible in the pic): That's ok because the green parts are just strings for your IDE! Same with VSCode: I think you should have a look at https://processwire.com/api/ref/files/render/g/ Take this example: And in your invoicetemplates.php file you could have clean code just like this: Why not give VSCode a try? ?
-
Maybe you want to paste code snippets and a screenshot to help us understand your problem better? I'm using VSCode and it looks like this: Another example with a multiline concatenated string: And another one appending some infos to a rendered field value:
-
Are you talking about a link to the docs or about shortcut links to the settings page of the template where the admin can adjust those permissions? The latter would be great! Maybe there could also be a section where it shows which template setting is responsible, eg: path | template | active -----------------|--------------|-------------------------------- / | home | yes /foo | basic-page | yes /foo/bar | whatsoever | no (inherited from basic-page) The template strings could be linked to the access tab of the template settings. Not sure how complicated that would be to implement, but I think it could be helpful ? +1 for some more thoughts on the colors! I think the red is too loud. It's not a warning imho - it's just telling there is no permission. I think the red could be removed completely. I'm fine with the green - although I think it could also be more quiet...
-
Hi, seems you need something VERY similar to one of my projects: https://www.grafikgesellen.at/textilien/gwaund-fuer-oesterreicha/landkarten-shirt/ Is it a commercial project? If you are interested in a siteprofile just send me a pm.
-
That's because of the way markup regions work: See the link to the github issue and ryans explanation. +1 for using Tracy, like Robin mentions in the post.
-
created another useful snippet to reset the admin password: "Reset Admin Password": { "prefix": "reset", "body": [ "\\$admin = \\$users->get(41);", "\\$admin->setAndSave('pass', '$1');", "die(\"admin url = {\\$pages->get(2)->httpUrl}, admin username = {\\$admin->name}\");", ], "description": "Reset Admin Password" },
- 246 replies
-
- 2
-
-
- visual studio code
- vsc
-
(and 2 more)
Tagged with:
-
hi @kongondo sorry for being unclear. I played around a little and came up with this solution: I think that's a quite good solution. It's easy to type, easy to read and it is efficient, multi-instance ready and supports code completion (and is always in sync with your current pw version)... What do you think? // php.json "Import PW Module": { "prefix": "mod", "body": [ "$$1 = \\$this->wire->modules('$2'); /** @var $2 $$1 */", "$$1$0" ], "description": "Import PW Module" }, "Get Wire Instance": { "prefix": "wire", "body": "$$this->wire->$0", "description": "Get Wire Instance" },
- 246 replies
-
- 3
-
-
- visual studio code
- vsc
-
(and 2 more)
Tagged with:
-
Thx again! For proper code completion I'd prefer $this->wire->scripts instead of $this->wire('scripts') - would that also be ok?
-
I did some more testing and got one step further. You might also be interested in this thread regarding intellisense: I can now answer my question of the day before yesterday: The correct syntax is this: /** @var InputfieldButton $button */ This way you get proper code completion even for your very own variables. @kongondo do you think you could do (or guide me how to do it) a snippet that adds the IDE variable type hints automatically? This could improve the workflow and code completion even more. For example here I define a RockGrid as variable $f and with the /** @var ... */ comment I get the suggestion of "setData()" method for my grid:
- 246 replies
-
- 2
-
-
- visual studio code
- vsc
-
(and 2 more)
Tagged with: