Skip to content
This repository has been archived by the owner on Sep 7, 2018. It is now read-only.

Improve buttons layout in notifications #193

Closed
abe33 opened this issue Jan 19, 2017 · 1 comment · Fixed by atom/notifications#145
Closed

Improve buttons layout in notifications #193

abe33 opened this issue Jan 19, 2017 · 1 comment · Fixed by atom/notifications#145
Assignees
Labels

Comments

@abe33
Copy link

abe33 commented Jan 19, 2017

Currently, when creating a notification with many buttons that force them to be wrapped at the end of the line, it looks like this:

ready_js_ ___github_kite

Playing around with the CSS the rules below would enable to get the following render:

ready_js_ ___github_kite

atom-notification .btn-toolbar {
  margin-top: 10px;
  margin-bottom: -5px;
}

atom-notification .btn-toolbar > .btn{
  margin-left: 0;
  margin-bottom: 5px;
}

Of course, when there's only one button or when the buttons all fit on one line it still render as expected:

ready_js_ ___github_kite

Sample code used in the test:

atom.notifications.addInfo('This is an info notification', {
  description: 'With some description', 
  dismissable: true, 
  buttons: [
    {text: 'Button with very long text'}, 
    {text: 'Another button with very long text'}, 
    {text: 'Button'}
  ]
})```

@simurai
Copy link
Contributor

simurai commented Jan 20, 2017

It appears that all themes are affected, so the fix is added directly in the notification package: atom/notifications#145

Thanks.. @abe33 ❤️

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants