What's the best practice to create Wizards in VSCode - visual-studio-code

VSCode's official documentation of Extension Guidelines for WebViews currently discourages the use of WebViews for Wizards, as quoted here below:
Don't
Use for promotions (upgrades, sponsors, etc.)
Use for wizards
Open on every window
Open on extension updates (ask via a Notification instead)
Add functionality that is unrelated to the editor or workspace
Repeat existing functionality (Welcome page, Settings, configuration, etc.)
With the release of VSCode's Webview UI Toolkit I was looking into using them for WebView based Wizards, but because the documentation doesn't recommend this, I'd like to know if there's an official correct approach for wizards. I could not find anything in the official APIs and docs (hopefully I didn't missed it).
My current plan is to go against the recommendation if there's nothing else available.
Thanks!

Related

vscode.dev with a web extension selected via URL

Is there a way to start a vscode.dev session with a extensions pre-selected via URL?
The official Blogpost just states this possibility for color themes and specific extensions. See here https://code.visualstudio.com/blogs/2021/10/20/vscode-dev#_speaking-of-urls
Is it possible to do this with any extension or combination of extensions?
I also didn't find anything in the Backlog for that.
AFAIK, in the announcement video on YouTube, I haven't seen anything about it.
But is it a hidden thing then?
No. I see (at least) when using https://vscode.dev/?extensions=esbenp.prettier-vscode (using Prettier as an example) it will not install Prettier.

Custom VSCode extension: embed native editor in webview

Goal
I want to have a webview, that embeds the native editor (see image).
The embedded part does not need to have a tabbing-feature. It would be enough to have the editor object, that I fill and update manually per Javascript.
Question
Is that possible? How would I do that?
Background
I want to show various file contents within my own webview. These contents should be editable and have all functionality, that the vscode editor has (e.g. syntax highlighting, multiple cursors, intellisense,...). At best, also 3rd party extensions should work within them.
I don't want to start implementing the whole editor again, so I'm searching for a way to embed the editor.
It is not possible to embed the native editor that comes with VS Code. The extension API simply does not support it.
The closest you can get is to import the code of the editor into your webview. The editor is called Monaco and is available via the npm package monaco-editor. It supports most (or all?) of the features offered by VS Code editor, such as IntelliSense.
However, since this editor would be unaware of the installed VS Code extensions, themes and configuration options, it will behave differently than native editors. You might be able to improve the user experience by manually propagating configuration options and themes, but this would require a significant amount of work and might not be possible for other things, such as support for language servers or third party extensions.

TYPO3 – TypoScript auto-complete in backend

It's just a simple question but couldn't find any helpful solution or hints...I have the current TYPO3 version and watched some videos on YouTube about it and wondered why I have no autocomplete when writing some TypoScript.
I saw it in this video: https://www.youtube.com/watch?v=ZCSIK3lFfwM&list=PL1D69sw7eWECaiqIOLhcSnjgTTjLJdd4I&index=5 at 03:45
Is it possible to do it in the newest version or do I have to use an IDE?
First install the extension ts3editor.
Then you can "activate" auto complete just by pressing CTRL+SPACE. For example, write:
->config.
then press
->"CTRL+SPACE"
then the autocomplete advice/suggestion will pop-up.
I use version 9 and it works fine.
The TYPO3 core offers the extension "t3editor", which is based on CodeMirror and provides syntax highlighting and codecompletion.
I suspect it just isn't activated in your TYPO3 instance. You can check this in the Extension Manager in your TYPO3 backend.
1st edit: As the extension seems to be working in general – please try writing config. on a new line in your editor. The Top Level Objects (e.g. config) aren't auto-completed in the backend, but it should open a box with suggested configurations after you wrote the dot.
t3editor has some restrictions: Nesting isn't supported (see example below). I read it can have problems inside conditions, too.
// This is auto-completed:
config.no_cache = 1
// This isn't:
config {
no_cache = 1
}
In short: t3editor can only help you to a certain degree. It is considered best practice to save all TypoScript (and everything else related to templating) in files into a dedicated templating extension (or sitepackage) and use an IDE. There are TypoScript auto-complete plugins for several editors and IDEs, for example PhpStorm.
If you want more information about using sitepackages, see this video series on YouTube by the offical TYPO3 account, or take a look at my personal templating extension which I use for new websites.
2nd edit: After you wrote you're using the Sprint Release 9.1.0, I was able to test the behaviour in this version and can confirm that code completion won't work in it.
Actually, that seems to be the intended future behaviour of t3editor for the TYPO3 core team. They want to remove this extension in TYPO3 v10 altogether (it's planned to be available on GitHub then). The reason is that they don't recommend to use/save TypoScript directly in the database, but in a separate template extension (see explanation above).
Sources:
TYPO3 Bug tracker, issue #81885
Communication platform TYPO3 Slack, Channel #typo3-cms-coredev, Nov 19th, 2017
So again, I recommend to use an API instead.

What tool can be used to create plugin/addon for bookmark requirement

I've to create plugin or add-on for my official community site.
Requirement
There should be a button at browser, which should extend a form, which can add the current url as a bookmark with interaction from user with some more inputs, in turn that should be recorded into excel sheet in local drive. I've VBA code to extract data from the community url to excel sheet. Now, I've to create browser control to enable user direct url to fetch the data.
My control should be activated (i.e. toolbar button) based on url, so what should i create, a plugin or add-on ? i want my control not to affect browser performance or user experience.
Based on reply for 2, what tool should i use to create plugin/add-on which should be compatible across browsers ?
I've gone thro' Fire-breath demo, code capability with Visual studio, which was nice, but still missing some knowledge about visual studio, what to package of visual studio install and what language to use, it would be better if it is Visual basic ?
At last, is it possible to place control (i.e. button) inside the webpage to activate my code, if so, which one is capable of doing it, add-on or plugin ? workflow in nutshell to achieve that...
Thanks a lot
First, a few things to understand:
A browser plugin is something that is instantiated in one of two ways:
Injected into the DOM in an object or embed tag
Instantiated by the browser to open a page with a specific mimetype
Browser plugins don't know anything about the browser, the URL bar, the bookmarks, the context menus, browser dialogs, browser chrome, browser events, etc. Browser plugins only know anything about the current page. Browser plugins cannot change browser settings
Browser plugins are DLLs; they can't easily be written in Visual Basic. While it might be possible, I've never seen one, and you'd have to learn a lot about NPAPI plugins before you could do that. You'd also probably have to write one for IE, one for IE, etc.
In other words, what you need is not a plugin. Firebreath is not going to help you much, if at all. Some extensions (also called add-ons) use a npapi plugin to provide functionality that they cannot do on their own. For more information see http://npapi.com/extensions
With that information, I recommend you think about it and create a new, more specific question for what you need to know next. I don't know extensions, I do plugins. Actually, once you break down what you need to do into some smaller questions you'll probably find others who have ask most of them and you can find the answers with simple searches. Your main problem is that you don't yet understand the technologies you need to use. Hopefully this has helped.

How to disable a plugin in joomla

I would like to disable a read more plugin ( cutof content) in all pages except my main menu pages in joomla
How do I do this
Thanks in advance
I'm not aware of any method that allows for the actual disabling of a plugin for certain pages. Plugins are either on or off, site-wide. This can be seen from the Extensions | Plugin Manager, as well as the SQL database: jos_plugins. With that said, what would be the purpose in disabling a plugin for certain pages? Most plugins, especially those like a "readmore" are typically setup to be activated by a simple code sequence, such as {readmore}path/file.htm{/readmore} and consequently, you can turn the plugin "off" by simply choosing to not use it. Most plugins of that nature provide very little more than essentially "coded access to a CSS class". If you could be more specific on why you need to actually disable the plugin for certain pages, perhaps we'd be better equipped to answer properly.
Depending on the plugin, you could feasibly remove the event trigger that would set the plugin to run, thought it would not be advisable since it would stop that trigger for all plugins and could cause unintended effects.
I am not sure what you mean by "Read more" plugin. You can turn the read more text on and off as a setting in the menu item parameters or in the article itself. Have you tied that?