-
Notifications
You must be signed in to change notification settings - Fork 5
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
Align worksheet decorations #149
Labels
Comments
I think the IntelliJ layout is too separated from the rest. I really like
the ergonomics of the previous Scala worksheets: Have comments line up at
column 40 or so, in order to
have them visually distinct from the code, but still close enough to make a
visual connection. At column 40, you'd still see most of the output even on
a vertically split window.
Lines that are longer than this margin would simply have their comments
pushed back. So comment start column is max(40, line.length + 1).
…On Mon, Sep 14, 2020 at 9:46 AM Krzysiek Bochenek ***@***.***> wrote:
Example from intellij:
(It puts worksheet output into separate frame splitted on right and you
can adjust width of it as you want)
[image: 2020-09-14-091946_1009x446_scrot]
<https://user-images.githubusercontent.com/10478402/93055562-739faf80-f66b-11ea-83c8-6c38658d4730.png>
I think that aligning output in some cases makes sense, in others it
doesn't.
(just added bunch of spaces to align decorations)
[image: 2020-09-14-092448_416x194_scrot]
<https://user-images.githubusercontent.com/10478402/93056053-2a039480-f66c-11ea-9c21-e7418a87321f.png>
- (-) if you have a few statements on left and far on right their
output it is actually harder to match statement to output. You can move
cursor to your statement and it highlights whole line but this is worse
than what we have now
- (-) if you have one long statement followed by a bunch of short ones
it might
one: cause short statements output to be truncated even though their
output would fit on screen
two: force user to artificially split lines just to get more output on
screen
- (+) if you copy/paste bunch of code, it might contain comments, you
might not recognize easily where evaluation output starts if it is not
aligned.
- (+) you might want to compare output from 3 statements, it is nice
to have output aligned in that case (although as in my case you can just
add bunch of spaces at the end to move decoration)
My number 1 option would be to make it configurable. Users will be able to
choose what they prefer, it doesn't seem hard from technical point of view,
but I know you don't prefer to make worksheets configurable, but that's my
point.
My number 2 if we can't configure it would be to split worksheet into
blocks of code(separation would be let's say empty line) and align output
separately for each block:
[image: 2020-09-14-094547_1100x163_scrot]
<https://user-images.githubusercontent.com/10478402/93058033-19a0e900-f66f-11ea-9791-add005a3503d.png>
But then again I don't use worksheets on daily basis so what do I know
🤷♂️
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#149 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGCKVRPF77Y4A6BZAFEQZLSFXC6VANCNFSM4REZAY4A>
.
--
Martin Odersky
Professor, Programming Methods Group (LAMP)
Faculty IC, EPFL
Station 14, Lausanne, Switzerland
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
It was suggested by @odersky that currently worksheets are not super clear if each decoration is in a different column like:
Describe the solution you'd like
Find the common margin and display the decorations there:
Some issues:
Describe alternatives you've considered
Worksheets working as is with no common column position
Additional context
I did some initial work here: https://github.com/tgodzik/metals/tree/add-align but would love to gather some feedback before spending any more time.
Search terms:
align worksheets
The text was updated successfully, but these errors were encountered: