Sidebar Views are a means of displaying custom HTML content in the HipChat sidebar. It is typically used to:
View layout displays list of cards that:
UI Controls
Actions
Full views are a means of displaying content comprised of different elements that would otherwise be in a card but need to display more than 2 lines of text or a title.
When to use
Use a full view layout when displaying cards that:
or
Use a full view layout when displaying complex data sets that:
API Reference
API reference for web panels: API Reference
To declare a Sidebar View, your add-on must first declare a web panel in its descriptor:
1 2"capabilities": { ..., "webPanel": [ { "key": "myaddon-sidebar", "name": { "value": "My Add-on Sidebar" }, "location": "hipchat.sidebar.right", "url": "{{localBaseUrl}}/sidebar" } ] }
See Dialog and Sidebar Views - Archived
A Sidebar View can be opened from multiple locations:
When a user clicks on a HipChat Glance, HipChat opens a Sidebar View. Your add-on declares the target Sidebar in the Glance descriptor entry:
1 2"capabilities": { ..., "glance": [ { ... "key": "myaddon-glance", "target": "myaddon-sidebar", --> Sidebar View Key ... } ] }
You can open a sidebar view from a message action or input action:
1 2"capabilities": { ..., "action": [ { "key": "myaddon-action-opendialog", "name": { "value": "Open dialog" }, "target": "myaddon-sidebar", --> must match the key from the Sidebar View web panel "location": "hipchat.message.action" --> Or hipchat.input.action } ] }
You can open a sidebar from JavaScript (e.g. from another sidebar)
1 2AP.require('sidebar', function(sidebar) { sidebar.openView({ key: 'myaddon-sidebar-key', // references the key of the webPanel in the descriptor parameters: { greetings: 'from somewhere else' // parameters to be passed to the sidebar view } }); }
Rate this page: