I am trying to start Gnome extension development. I created a new project using the default template which has a
PanelMenu.Button, but where can I get the documentation for its methods and properties?
I opened https://gjs-docs.gnome.org/ , but it seems there are numerous categories and they are all disabled by default. So, I don’t what to enable to look up
PanelMenu.Button. Shouldn’t all categories be all enabled by default for search?
Also, is there any way to get auto-completion and method descriptions for Gnome extension development in VS Code or in any other IDE/code editor? I thought that auto-completion might work out-of-the-box in Gnome Builder, but it did not. Is there currently no way, and all Gnome extension developers are developing without auto-completion or IDE’s help?
gjs-docs contains documentation for public library APIs, but PanelMenu is an internal implementation detail of GNOME Shell. There is not going to be any documentation. When you’re writing shell extensions, you are going to be working both with public documented APIs (which are stable), and with undocumented shell internals (which will change regularly and break your extension when they do). The way to figure out how those work is to read the code. That’s the deal with extensions: you can change anything you want because you have access to everything, at the cost that it’s going to be fragile.
I don’t know about autocompletion, sorry.
I was about to add: “gnome-shell is not a library and you won’t find any docs for it on gjs-docs.gnome.org” but in fact it does provide some docs for a small public API here. I didn’t know about that. It’s not a lot, though, and doesn’t contain PanelMenu.
I don’t have a strong opinion on this, but normally you know what library you are using when searching for documentation so it usually won’t be a problem.
Right, that’s for a small introspected C-library, so gjs-docs.gnome.org can handle it.
Some other encouraging thoughts:
…is there any way to get auto-completion and method descriptions for Gnome extension development in VS Code or in any other IDE/code editor?
Shouldn’t all categories be all enabled by default for search?
Changing the default docs have been a bit of a problem, but that’s a bug we want to fix. Enabling all of them would probably download them though, so we’ll probably pick a few.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.