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
vscode: Add a simple Welcome page #3124
Conversation
Do I understand correctly that the Welcome page will be shown on every time vscode is open on a rust or C++ workspace until the user opt out with the combobox. It feels like a bit much to me. IMHO we should just open it the first time after installation or so. Regarding the assets in the repository i think we need them because we can't rely on our website. But we might not need to bring all the big fonts maybe. But it's true that the page indeed looks good. This is not the first time we have this problem of assets (demos index.html, docs html and so) and we should find a solution for it. |
I agree. I think we should implement the same behavior as in the espressif-idf extension: Show on first install, otherwise on demand per command palette. I think this should just be a welcome page, not a replacement for documentation browsing. That is functionality that is not typical for vs code. While I hope it will one day become a first class "citizen" of vs code, at the moment docs integration is not really a thing (beyond tooltips).
What about including the assets from the website repo at GitHub build time? So local builds may not use the correct images/fonts/stylesheets, but GH builds will include them in the bundle. And it's still easy to test as any of us can trigger a GH extension build (one that doesn't upload to the market place) and install the .vsix locally. |
@ogoffart: The asset handling is not as easy as I hoped: You really have to convert any URL in the HTML to for use in the webview. I had hoped relative URLs would just work, but they did no. That's why I needed to embed the CSS into the HTML as I needed to replace the links in the CSS as well :-/ So much for the idea to embed the documentation into the extension. |
I think that's not a direction we should go to anyway (and I don't see any precedence). |
@tronical: When the page will show should be easy to change. I went for "always" as "add slint dependency into project" and "docs" and "create a .slint file" all seem like things I would want to do for many projects and not just the first. This is no "set up Slint once" kind of thing that downloads extra tools or something. |
We are talking about a "Welcome" page, which shows when we first install the extension so that would help people who install the extension with "what do i do next?".
But you don't want ti do it for all project or project that already have a dependency. Don't overdo it. |
80533bd
to
2f39fe6
Compare
Great. Please rebase so that the font are not in the git history. Also we really should make it so that it only shows up automatically after installation. |
@ogoffart: I did change it to default to "never" (after the first run). |
c01b43b
to
7e8d476
Compare
I squashed the commits to remove the (now unused) assets. |
This implements a custom web view as the VSCode welcome view is put over an empty TreeView (we have none of those) and the walkthroughs (a list of things you need to step through one after the other) do not fit our needs.
The plugin gets activated on any folder that contains a CMakeLists.txt, a Cargo.toml or a .slint file and checks whether to bring up the Welcome page. So that should work nicely :-)
There is a command in the palate to bring up the Welcome page, too, plus settings to configure whether the Welcome page comes up always whenever a new project is opened or never (with an option to change that on page as well).
The page itself is minimal.
I'll extend esbuild next so that we can actually package extra files along with our plugin. Then I can copy some logos and css from the website and try to prettify things a bit.
Addresses parts of #3083