Comments (12)
- Loading AKA "Beautification in progress..."
- Errors
- Unsupported language
from atom-beautify.
I was quickly looking into this.
Two options that I've found (many possibilities) and tested:
https://github.com/CodeSeven/toastr
Include toastr.js in the lib directory and toastr.css in the stylesheets directory. Add jquery as an npm dependency:
toastr = require "./toastr"
toastr.error "There was an error beautifying <b>/tmp/test/fixtures.sql</b>. The command <b>sqlformat</b> was not found.", "Atom beautifer"
Result:
Another more atom-integrated solution is to use: https://github.com/tcarlsen/atom-message-panel
messages.add new PlainMessageView(
message: "There was an error beautifying <b>/tmp/test/fixtures.sql</b>. The command <b>sqlformat</b> was not found."
className: "text-error"
raw: true
)
Result:
Personally, I prefer the second solution; especially for error messages. I also don't think it's a nice idea to include jquery as a dependency (unnecessary bloat)
Anyway, some food for thought :-)
from atom-beautify.
Thanks for doing some research, @Flukey.
I have not seen the Toastr before. Looks nice! How did you include a Bower dependencies? Normally Atom restricts access to client-side libraries.
I have used Atom Message Panel before and I'd prefer to have something a little nicer and more customizable for this.
Using SpacePen you can easily build nice panels, such as and append them to the top of the
workspaceView
, and for easier developing Atom Preview
now supports SpacePen previewing.
Personally, I prefer the second solution; especially for error messages. I also don't think it's a nice idea to include jquery as a dependency (unnecessary bloat)
jQuery is at the core of Atom's SpacePen, so you should not have to include it. You should be able to use {$} = require 'atom'
.
I will be throw some screenshots here when they're ready to get some feedback :).
from atom-beautify.
I think you have a good idea with those because you could list off multiple errors and other messages, versus only one at a time. I'll keep that in mind when designing the Atom Beautify interface.
- Support listing multiple messages
- Clear messages on
close
view - if the messages list is empty, view should be closed
-
addMessage
andclearMessages
API
from atom-beautify.
How about something like these?
from atom-beautify.
- Change
close
button toclear
, which will executeclearMessages
and consequently close the view
from atom-beautify.
I think I will go with Atom Message Panel for now, until we've fleshed out what features we want in the Message View. It can always be updated later, the important thing is having a view to better display these errors and other messages.
Current screenshot of work-in-progress:
from atom-beautify.
For Beautification in progress
message:
from atom-beautify.
Published Beautification in progress
message and Unsupported language
messages (using Atom Message Panel) to v0.7.0
from atom-beautify.
This can be deprecated in favour of Atom Notifications!
Update: Since I still want to see beautification progress (start and completion), the currently implemented UI for showing that a beautification is in progress can stay. Errors and other notifications can use Atom Notifications. This is already being done for deprecate
method in Beautifier
class (See #282).
Given that the beautification progress UI is already implemented and the Atom Notifications can be used for everything else, this issue can be closed.
from atom-beautify.
Should go migrate off of Atom Message Panel to Atom Notifications.
from atom-beautify.
Removed old Atom Message Panel related code with 1dfac5b
from atom-beautify.
Related Issues (20)
- Javascript space before paren HOT 1
- Failed to activate the atom-beautify package HOT 3
- beautify HOT 1
- download failed HOT 1
- Cannot beautify Velocity file HOT 1
- Installed but not listed on packages tab HOT 1
- dart language not support HOT 1
- Could not find 'uncrustify'. The program may not be installed. HOT 1
- 0 I've been trying to install atom-beautify on my Windows 10 x64 machine, but I keep getting this error : npm ERR! code Z_BUF_ERROR npm ERR! errno -5 npm ERR! zlib: unexpected end of file npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\*****\.atom\.apm\_logs\2019-01-18T06_40_37_988Z-debug.log Googling about it, I found this is an issue that has been raised but closed without much in the way of resolution : https://github.com/Glavin001/atom-beautify/issues/2240 I tried uninstalling and reinstalling Atom, and also deleting the .apm folder and giving it another go, and then trying to install previous versions of atom-beautify using the following, apm install [email protected] apm install [email protected] But nothing seems to work, and I get the same error with a Deprecation warning on the latter. Has anyone else encounteredd this issue, are there any known work-arounds for it? HOT 1
- Atom-beautiful
- atom-beautify
- cant go futher of this HOT 1
- network is unreachable
- it was not installing HOT 1
- PHP beautify problem HOT 1
- How can I solve this problem ? HOT 2
- facing error HOT 2
- Not working :( HOT 1
- i
- Object.<anonymous> is deprecated.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from atom-beautify.