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

Show hint when you click on a global without Ctrl down #2449

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

fonsp
Copy link
Owner

@fonsp fonsp commented Jan 18, 2023

In some recent screen-sharing sessions with Pluto users, I found that the Jump to definition feature is too hidden: people don't know it exists, or they forgot the keyboard shortcut.

This PR will pop up a hint if you click on a global without Ctrl down.

What do people think about this?

See also these two other PRs, which will be merged soon:

Schermopname.2023-01-18.om.18.48.59.mov

TODO:

  • As the popup's source_element, I used the codemirror line element, not just the identifier element. I did this to make the popup show next to the editor, instead of on top of the line. BUT: now you need to click outside the line to hide the popup, clicking somewhere else within the line leaves it open. That does not feel nice.
  • It feels a bit intrusive, as it will show up quite a lot during regular use, triggering a fancy animation and taking up a bit of surface area each time. Maybe the hint needs a more subtle style. Do others agree?

@fonsp fonsp marked this pull request as ready for review January 18, 2023 17:49
@github-actions
Copy link
Contributor

Try this Pull Request!

Open Julia and type:

julia> import Pkg
julia> Pkg.activate(temp=true)
julia> Pkg.add(url="https://github.com/fonsp/Pluto.jl", rev="jump-to-definition-tip")
julia> using Pluto

@ederag
Copy link

ederag commented Jan 23, 2023

I agree that it might quickly become too distracting.
Would it be possible to have a "do not show again" (even when restarting the Pluto server) ?
Maybe as a cookie ?

@ederag
Copy link

ederag commented Jan 23, 2023

Another stance could be to only show the wiggling underlines (that make the variable a link)
when Ctrl is pressed.
This way, the first time the user hits Ctrl, it should be clearer that something new can be done.
And the code display would be cleaner (those underlines slightly alter my reading) when Ctrl is released.

@fonsp
Copy link
Owner Author

fonsp commented Jan 23, 2023

Another stance could be to only show the wiggling underlines (that make the variable a link) when Ctrl is pressed. This way, the first time the user hits Ctrl, it should be clearer that something new can be done. And the code display would be cleaner (those underlines slightly alter my reading) when Ctrl is released.

Thanks for the feedback! This was exactly my thought when I made the underlines bright pink when you press Ctrl! 😅

@ederag
Copy link

ederag commented Jan 24, 2023

This was exactly my thought when I made the underlines bright pink when you press Ctrl

🤣 Being so used to the effect, I forgot about it !?
Maybe the effect would be stronger if the underlines were normally invisible ?
(a change of color is not as strong as something appearing)

@fonsp
Copy link
Owner Author

fonsp commented Jan 24, 2023

:) I like the fat underlines, since globals play the lead role in our reactivity. But good to hear your feedback! I will take it into consideration the next time this is up for a restyle.

@greimel
Copy link
Contributor

greimel commented Feb 4, 2023

I like a lot that globals stand out visually!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation enhancement New feature or request frontend Concerning the HTML editor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants