Example of a simple list view


#1

Hi.
I’m new to Javascript/Coffeescript but fairly decent in other programming languages (python,c#).
I just can’t make a simple Popup/Treeview-like element. I read the documentation of Views, went trough several threads and read up here and here but couldn’t make it work. I usually never code anything with a GUI so I’m a bit lost here :). How would a complete minimum example of a package showing just a popup or a treeview-like element with a list of (clickable) strings look like? Thanks for any tips on this.


#2

remote-edit uses a dialog class that you can find here:


#3

Well thanks but that doesn’t help me at all.
I can’t even figure out how to draw a really simple view of just a tile like tree-view.
How would I even add something like this?

As I said - I have no clue about anything that has to do with GUI because I didn’t need it until now.


#4

Ah okay, well you would use the Workspace instance, the methods you need are documented here:

You can add Panels to the top, left, right, and bottom of the screen or a modal panel. The panels are just HTML that get inserted in a container. For views, you can use Atom’s deprecated space-pen-views since a lot of packages use this.


#5

Thanks a lot! I read up on some basic stuff and now have a much better understanding of how everything around views works.


#6

You can also use the Styleguide (Styleguide : Show in the command palette, or Ctrl+Shift+G on Windows) to get an overview of all the built-in UI elements and their HTML markup: