Comments (8)
I like the light bulb idea. Also holding Ctrl, or some defined keys, to underline like hyper click would work too.
from intentions.
Although it wasn't the best execution, I envisioned intentions
to be the code actions package, while linter was one of the consumers that suggested the actions. There are a lot of code actions, some more proactively available than others:
- Linter issues are available proactively for the whole file
- Fancy language aware "find usages" and "refactor" could be a more reactive during-opening-dropdown action
But thinking about it now, this could be solved with a light-bulb style API. The user would see the highlight coming from linter and when they select that range, they could see the lightbulb coming from intentions. Thank you for working on this!
from intentions.
All I ask is that the lightbulb icon be a rectangle with rounded corners and a proper shadow.
As opposed to something like this; an icon that is the shape of the bulb 💡 and looks like an emoji character inside the code
from intentions.
Instead of adding a lightbulb, wouldn't it be possible to reuse the "dots" from the linter-ui ? It would avoid having another gutter taking space on the side. For code actions on warning / errors the dots could be clickable, and for other actions, we could show a dot only for the current line.
from intentions.
I don't think adding another gutter makes sense. I would prefer a lightbulb UI because it would produce much less visual distraction.
Instead of adding a lightbulb, wouldn't it be possible to reuse the "dots" from the linter-ui ? It would avoid having another gutter taking space on the side. For code actions on warning / errors the dots could be clickable, and for other actions, we could show a dot only for the current line.
Googling "IntelliJ Lightbulb" almost half the results are "how to disable IntelliJ lightbulb". And if people want to disable a useful feature, that probably means they screwed up the UI/UX. Keeping the UI as minimal as possible will probably avoid that problem.
The placement of the lightbulb is important here. I also don't think that putting the icon "on the code" is a good idea (what Intellij does). It should be in the gutter like Linter, but we shouldn't show all of the available code actions at once (that would mean that almost all the lines would have a lightbulb!).
My plan for now:
-
Add a "lightbulb button" in the gutter (like linter dots) only for the current line. It would be in the gutter, so not in the way of coding. Pressing the button should be the same as
ALT+ENTER
. -
I will stick to the current method we are already using to show the available actions (adding underlines to the code itself which appears by holding
CTRL
).
from intentions.
Would like to hear your ideas. @steelbrain @UziTech @lierdakil
from intentions.
Overall, I think it would be fine to show all of the light bulbs so long as they weren't visually obtrusive like other editors.
For example, a tiny gray outline of a bulb off in the gutter on the left side of the editor wouldn't be visual noise. If you were looking for it it would be there, but it wouldn't draw your attention away from the code. So from a cognitive load perspective, it would be fine to have 15 of those in one view.
Then just save the lit-up lightbulb for the current line, and have it dim to 50% opacity after 3 sec of inactivity.
from intentions.
Instead of adding a lightbulb, wouldn't it be possible to reuse the "dots" from the linter-ui ? It would avoid having another gutter taking space on the side. For code actions on warning / errors the dots could be clickable, and for other actions, we could show a dot only for the current line.
I support this.
Googling "IntelliJ Lightbulb" almost half the results are "how to disable IntelliJ lightbulb". And if people want to disable a useful feature, that probably means they screwed up the UI/UX. Keeping the UI as minimal as possible will probably avoid that problem.
from intentions.
Related Issues (20)
- Can't trigger intentions list HOT 9
- Sorry. HOT 2
- Hold the special key to show intentions can consume all the CPU
- intentions:show triggers error HOT 4
- 1.1.3 breaks contextual intentions HOT 2
- Keyboard interaction captured after selecting option HOT 1
- intentions highlights render outside of current editor pane HOT 3
- greenkeeper badge on README.md HOT 2
- Intentions disables double clicking
- The tests are failing in new Atom
- atom-ide-base disables intentions automatically HOT 3
- Unifying the key bindings on different operating systems
- Unexpected token . HOT 3
- Intentions are not highlighted in TypeScript files
- Keybinding on macOS doesn't trigger HOT 2
- Atom and Intentions version issue Installing/Uninstalling - Ubuntu 18.04 HOT 1
- Failed to load the intentions package HOT 13
- Uncaught TypeError: Illegal invocation
- Scrolling doesn't work
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 intentions.