Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DiagnosticsManager, refactor DiagnosticPanel #176

Open
bollwyvl opened this issue Jan 22, 2020 · 2 comments
Open

Add DiagnosticsManager, refactor DiagnosticPanel #176

bollwyvl opened this issue Jan 22, 2020 · 2 comments

Comments

@bollwyvl
Copy link
Collaborator

Elevator Pitch

Create a DiagnosticManager singleton. Move DiagnosticsPanel into its own file (and top-level plugin #163).

Motivation

The diagnostics are one of the message types that "just happen" from the backend, and so cannot be Promise-ified (#165). Having a single manager means there would only be a single listener per connection event (or whatever we end up using), and then we can use a Model<Document> for each documentUri which can subscribe to them.

With a central store of the last-seen diagnostics, the panel could show all diagnostics, even if initially filtered to a specific file (#160), and you could see warnings between multiple files.

Design Ideas

   + Show the icon/count for the highest level of thing found
   |                          
|-------------------------| 
| [E] Diagnostics 2       |________________________________________________
| File [Current V]  Search [           ][.*] [copy] [filt 3] [cols 3] [x] | -+ hideable tool bar, toggle between current/all    
|-------------------------------------------------------------------------|   - search is dumb/regex (across everything)
| [!] | Message              | Location           | Code  | Source | Lang |     - `<field>:thing` modifiers
|-----|----------------------|--------------------|-------|--------|------|   - copy all/selected
| [E] | Bad code             | Untitled.ipynb:1:1 | E302  | pyfoo  | [py] |   - persistent filters (with count hidden)
| [W] | Bad Whitespace       | Untitled.ipynb:1:1 | W100  | rbar   | [r]  |   - cols (with count hidden)
--------------------------------------------------------------------------|
  |                                     |                             | 
  |                                     |                             + icon (kernel, file, or override in server spec)
  |                                     + collapse previous columns, support "Go To" by file/line/col
  + icons (a la gutter)
@bollwyvl
Copy link
Collaborator Author

Also ref

@krassowski
Copy link
Member

I very much like the ASCII art design. Also agree on splitting the diagnostics panel into a separate file.

Implementation-wise I would probably prefer to keep the Feature class hierarchy for simplicity, but this could be supercharged to allow singleton-like behaviour (in the sense that only one connection would be opened). We could have a parameter/subclass for such Features.

These are just initial thoughts...

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

No branches or pull requests

2 participants