# atom-message-panel

> An easy way to display your messages in Atom

Latest version **1.3.1** (published 2019-11-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install atom-message-panel
pnpm add atom-message-panel
yarn add atom-message-panel
bun add atom-message-panel
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.1 |
| Published | 2019-11-18 |
| First published | 2014-03-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 19.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 60 |
| Author | tcarlsen |
| Maintainers | tcarlsen |
| Keywords | atom, helper, handler, error, message |

## Links

- npm: https://www.npmjs.com/package/atom-message-panel
- Repository: https://github.com/tcarlsen/atom-message-panel
- Issues: https://github.com/tcarlsen/atom-message-panel/issues
- npm.io page: https://npm.io/package/atom-message-panel

## Dependencies (1)

- [atom-space-pen-views](https://npm.io/package/atom-space-pen-views.md) ^2.2.0

## Alternatives

- [@sentry/react-native](https://npm.io/package/@sentry/react-native.md) — 2.6M weekly downloads
- [@ardatan/aggregate-error](https://npm.io/package/@ardatan/aggregate-error.md) — 708.1K weekly downloads
- [custom-error-generator](https://npm.io/package/custom-error-generator.md) — 2.0K weekly downloads
- [@technik-sde/prosemirror-recreate-transform](https://npm.io/package/@technik-sde/prosemirror-recreate-transform.md) — 1.5K weekly downloads
- [@suchipi/error-utils](https://npm.io/package/@suchipi/error-utils.md) — 78 weekly downloads

## Recent versions

- 1.3.1 (latest) — 2019-11-18
- 1.3.0 — 2017-01-24
- 1.2.7 — 2016-06-13
- 1.2.6 — 2016-06-13
- 1.2.5 — 2016-06-13
- 1.2.4 — 2015-05-13
- 1.2.3 — 2015-05-04
- 1.2.2 — 2015-02-19
- 1.2.1 — 2015-02-16
- 1.2.0 — 2015-02-10
- 1.1.4 — 2014-12-18
- 1.1.3 — 2014-12-16
- 1.1.2 — 2014-10-09
- 1.1.1 — 2014-06-19
- 1.1.0 — 2014-06-16
- … 7 more at https://npm.io/package/atom-message-panel/versions

## README

# The Atom Message Panel <a href="http://packagequality.com/#?package=atom-message-panel" target="_blank"><img src="http://npm.packagequality.com/badge/atom-message-panel.png" align="right" height="45px"></a>

![npm version](https://img.shields.io/npm/v/atom-message-panel.svg)
![npm license](https://img.shields.io/npm/l/atom-message-panel.svg)
![npm downloads](https://img.shields.io/npm/dm/atom-message-panel.svg)
[![Gitter chat](https://img.shields.io/badge/gitter-join_chat-brightgreen.svg)](https://gitter.im/tcarlsen/atom-message-panel)

> The easy way to display your messages in [Atom](http://atom.io).

![preview](https://cloud.githubusercontent.com/assets/145288/2628677/25f9ba7a-be2b-11e3-9780-8172cf7ea292.png)

## Why!?

To streamline how plugin messages are displayed in Atom! :fist:

[Checkout this list of packages already using Atom Message Panel.](https://github.com/tcarlsen/atom-message-panel/wiki/They-use-it!)

## Usage

**JavaScript:**

```javascript
var MessagePanelView = require('atom-message-panel').MessagePanelView,
    PlainMessageView = require('atom-message-panel').PlainMessageView;

var messages = new MessagePanelView({
  title: 'It\'s alive..... IT\'S ALIIIIIVE!!!!'
});

messages.attach();

messages.add(new PlainMessageView({
  message: 'I did it mommy, I made my first Atom Message Panel!',
  className: 'text-success'
}));
```

**CoffeeScript:**

```coffeescript
{MessagePanelView, LineMessageView} = require 'atom-message-panel'

messages = new MessagePanelView
    title: 'Remember your Coffee!'

messages.attach()

messages.add new LineMessageView
    line: 1
    character: 4
    message: 'You haven\'t had a single drop of coffee since this character'
```

## API

**MessagePanelView:**

*It all depends on this guy, this is your init function and you will need it :sunglasses:*

 * `new MessagePanelView(params)`:
  - `title`: the title of your panel
  - `rawTitle`: sat to `true` will allow the title to contains HTML *(default is false)*
  - `closeMethod`: What should the close button do? `hide` *(default)* or `destroy`.
  - `speed`: how fast you what the fold/unfold function to run *(default is fast)*
  - `recentMessagesAtTop`: should new messages be added at the top? *(default is false)*
  - `position`: should the panel attach to the "top", "bottom", "left" or "right" *(default is bottom)*
  - `maxHeight`: set a max-height of the panel body *(default is 170px)*
 * `attach()`: append the panel to the Atom view
 * `close()`: closes the panel
 * `setTitle(title:string,raw?:boolean)`: change the panel title
 * `toggle()`: fold/unfold the panel
 * `unfold()`: unfold the panel
 * `clear()`: clear the body
 * `add()`: add a view to the panel
 * `remove(index)`: remove a view from the panel
 * `state()`: get current state informations about your panel

**PlainMessageView:**

*Lets you add a simple message :speech_balloon:*

 * `PlainMessageView(params)`:
  - `message`: your message to the people
  - `raw`: sat to `true` will allow the mesage to contains HTML *(default is false)*
  - `className`: adding css classes to your message *(this is optional)*

**LineMessageView:**

*Lets you add messages for a specific line and character, and it will even navigate the user to that position with a single click :boom:*

  * `LineMessageView(params)`:
   - `message`: your message to the people
   - `line`: what line are we talking about?
   - `file`: so, was that in some other file? *(this is optional)*
   - `character`: lets be more specific of what we are talking about *(this is optional)*
   - `preview`: lets you display a code snippet inside a `pre` tag *(this is optional)*
   - `className`: adding css classes to your message *(this is optional)*

## License

[MIT](LICENSE.md) © tcarlsen

---
_Source: https://npm.io/package/atom-message-panel · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
