Giter VIP home page Giter VIP logo

Comments (8)

UziTech avatar UziTech commented on September 18, 2024 1

I like the light bulb idea. Also holding Ctrl, or some defined keys, to underline like hyper click would work too.

from intentions.

steelbrain avatar steelbrain commented on September 18, 2024 1

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.

jeff-hykin avatar jeff-hykin commented on September 18, 2024 1

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
Screenshot_20210615-080043__01.jpg

from intentions.

k2d222 avatar k2d222 commented on September 18, 2024 1

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.

aminya avatar aminya commented on September 18, 2024 1

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.

aminya avatar aminya commented on September 18, 2024

Would like to hear your ideas. @steelbrain @UziTech @lierdakil

from intentions.

jeff-hykin avatar jeff-hykin commented on September 18, 2024

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.

jeff-hykin avatar jeff-hykin commented on September 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.