SMC sage worksheets: toggling input and output

101 views
Skip to first unread message

William Stein

unread,
Sep 27, 2016, 7:43:04 PM9/27/16
to sage-cloud, sage-cloud-members
Hi,

After getting too tired of people saying things like "I'm getting
crazy with cells becoming hidden in a way I'm not in full control." I
just rewrote how cell input/output hiding works. Now there is a
little toggle triangle in the very left column next to the input cell
divider, and also next to the output. That's how you toggle
visibility of input and output.

Do %md or %html doesn't automatically "magically" hide anymore.
Double clicking on the output doesn't do anything anymore. It's
simple, straightforward, and you are in control.

Enjoy,

-- William
Screen Shot 2016-09-27 at 4.39.27 PM.png

David Roe

unread,
Sep 27, 2016, 7:57:00 PM9/27/16
to sage-cloud, sage-cloud-members
Nice!  I think this is a cleaner interface.
David


--
You received this message because you are subscribed to the Google Groups "sage-cloud" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-cloud+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-cloud/CA%2BjwZMi_LSS9s34X5zfGL_HEsYzdX2-SyPfR6bcO64EXsFdCiQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Pedro Cruz

unread,
Sep 28, 2016, 6:45:07 PM9/28/16
to sage-cloud, sage-clou...@googlegroups.com, roed...@gmail.com
Quite impressive the nice simplicity of those show/hide arrows and line numbers!
Pedro


quarta-feira, 28 de Setembro de 2016 às 00:57:00 UTC+1, David Roe escreveu:
Nice!  I think this is a cleaner interface.
David
On Tue, Sep 27, 2016 at 5:42 PM, William Stein <wst...@sagemath.com> wrote:
Hi,

After getting too tired of people saying things like "I'm getting
crazy with cells becoming hidden in a way I'm not in full control." I
just rewrote how cell input/output hiding works.  Now there is a
little toggle triangle in the very left column next to the input cell
divider, and also next to the output.  That's how you toggle
visibility of input and output.

Do %md or %html doesn't automatically "magically" hide anymore.
Double clicking on the output doesn't do anything anymore.    It's
simple, straightforward, and you are in control.

Enjoy,

 -- William

--
You received this message because you are subscribed to the Google Groups "sage-cloud" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-cloud+...@googlegroups.com.

William Stein

unread,
Sep 28, 2016, 6:50:11 PM9/28/16
to sage-cloud, sage-cloud-members, David Roe
On Wed, Sep 28, 2016 at 3:45 PM, Pedro Cruz <pedrocr...@gmail.com> wrote:
> Quite impressive the nice simplicity of those show/hide arrows and line
> numbers!
> Pedro
>

Thanks. I just changed things today to also have a second level of
local line numbers.
> https://groups.google.com/d/msgid/sage-cloud/a84c9767-36a3-41b9-915f-98a581abafda%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



--

Best Regards,
William Stein

CEO, SageMath, Inc.
Screen Shot 2016-09-28 at 3.07.17 PM.png

Rob Beezer

unread,
Oct 4, 2016, 2:06:18 PM10/4/16
to sage-...@googlegroups.com
After a few days of regular use, I still like this a lot. And I think a lot of
little things (like highlighting input for copy/paste) have improved since the
double-click-to-show-input has been disabled.

The "code folding" triangles are great.

Here's the "but." For a cell with %md, %html, %latex I think that you
generally do not want to see the input. You routinely want to go back and edit
it, and you can use a triangle to do that intuitively, reliably and predictably.

This is in contrast to a "compute" cell, such as default sage, or say %python
where maybe you want to see input and output simultaneously. The distinction is
the "text" cells have an ugly representation on input and nice representation on
output, and their content is identical.

I warned my students about the change and *told* them to hide the input for
their explanations of their Sage exercises. I still got several worksheets with
all of these inputs open, which was a bit maddening to read through and/or close
them all. Another student went too far and hid all his Sage code, which meant I
*had* to open all those.

Yes, you can put %hide into each such text cell.

Suggestion: Execute a %md, %html, %latex and that automatically hides the
input. For subsequent edits, the user can hit the triangle. (Or this behavior
is configurable as an editor setting).

But maybe I am in the minority and most people want all input cells open all the
time until they choose to hide them. There are times you want hide a compute
cell, but I think these are more typically set-up code, completed interacts, or
code producing elaborate graphics, and may be rarer?

Rob

William Stein

unread,
Oct 4, 2016, 2:15:49 PM10/4/16
to sage-cloud
On Tue, Oct 4, 2016 at 11:06 AM, Rob Beezer <bee...@ups.edu> wrote:
> After a few days of regular use, I still like this a lot. And I think a lot
> of little things (like highlighting input for copy/paste) have improved
> since the double-click-to-show-input has been disabled.
>
> The "code folding" triangles are great.
>
> Here's the "but." For a cell with %md, %html, %latex I think that you
> generally do not want to see the input. You routinely want to go back and
> edit it, and you can use a triangle to do that intuitively, reliably and
> predictably.
>
> This is in contrast to a "compute" cell, such as default sage, or say
> %python where maybe you want to see input and output simultaneously. The
> distinction is the "text" cells have an ugly representation on input and
> nice representation on output, and their content is identical.
>
> I warned my students about the change and *told* them to hide the input for
> their explanations of their Sage exercises. I still got several worksheets
> with all of these inputs open, which was a bit maddening to read through
> and/or close them all. Another student went too far and hid all his Sage
> code, which meant I *had* to open all those.
>
> Yes, you can put %hide into each such text cell.
>
> Suggestion: Execute a %md, %html, %latex and that automatically hides the
> input. For subsequent edits, the user can hit the triangle. (Or this
> behavior is configurable as an editor setting).

Wouldn't this be even more confusing as it makes the behavior way less
predictable than before. At least now it is very predictable.

What about us just replacing the in/out/x buttons at the top by two
menu-buttons that have these options:

Input:
- Hide
- Show
- Hide text cells
- Show text cells
- Hide code cells
- Show code cells

Output:
- Hide
- Show
- Delete

(The current toggle behavior is pretty much never useful for ranges of
cells, so it would just go away.)


With this, you could take the student homework and do "Control+a",
then "Input --> Hide text cells" at the end.

William

Rob Beezer

unread,
Oct 4, 2016, 2:59:59 PM10/4/16
to sage-...@googlegroups.com
On 10/04/2016 11:15 AM, William Stein wrote:
> Wouldn't this be even more confusing as it makes the behavior way less
> predictable than before. At least now it is very predictable.

Perhaps. I know enough to know I don't always understand human nature.

> What about us just replacing the in/out/x buttons at the top by two
> menu-buttons that have these options:
>
> Input:
> - Hide
> - Show
> - Hide text cells
> - Show text cells
> - Hide code cells
> - Show code cells
>
> Output:
> - Hide
> - Show
> - Delete

I think that would be very, very useful. I didn't always find those other
buttons very useful.

> With this, you could take the student homework and do "Control+a",
> then "Input --> Hide text cells" at the end.

With this, the *students* could .... ;-)

Thanks for the reply. If it would help for me to make a GitHub issue out of
this discussion, please just let me know, and I'll get on it. I won't try to
discern the right labels, though. ;-)

Thanks,
Rob

William Stein

unread,
Oct 4, 2016, 3:22:39 PM10/4/16
to sage-cloud
On Tue, Oct 4, 2016 at 11:59 AM, Rob Beezer <bee...@ups.edu> wrote:
> On 10/04/2016 11:15 AM, William Stein wrote:
>>
>> Wouldn't this be even more confusing as it makes the behavior way less
>> predictable than before. At least now it is very predictable.
>
>
> Perhaps.

With your suggestion, to know what will happen when you hit shift
enter, you have to know:

(1) which types of cells autohide (latex, md, html)
(2) whether or not it is the first time to evaluate that cell

That will be difficult for users to determine, and also hard to implement.

>
>> What about us just replacing the in/out/x buttons at the top by two
>> menu-buttons that have these options:
>>
>> Input:
>> - Hide
>> - Show
>> - Hide text cells
>> - Show text cells
>> - Hide code cells
>> - Show code cells
>>
>> Output:
>> - Hide
>> - Show
>> - Delete
>
>
> I think that would be very, very useful. I didn't always find those other
> buttons very useful.
>
>> With this, you could take the student homework and do "Control+a",
>> then "Input --> Hide text cells" at the end.
>
>
> With this, the *students* could .... ;-)
>
> Thanks for the reply. If it would help for me to make a GitHub issue out of
> this discussion, please just let me know, and I'll get on it. I won't try
> to discern the right labels, though. ;-)

Make an issue. It's an enhancement...

>
> Thanks,
> Rob
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-cloud" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-cloud+...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-cloud/MTAwMDAyOS5iZWV6ZXI.1475607595%40quikprotect.
>
> For more options, visit https://groups.google.com/d/optout.



singlets

unread,
Oct 4, 2016, 9:35:07 PM10/4/16
to sage-cloud, bee...@ups.edu


On Tuesday, October 4, 2016 at 1:06:18 PM UTC-5, Robert Beezer wrote:


Suggestion:  Execute a %md, %html, %latex and that automatically hides the
input.  For subsequent edits, the user can hit the triangle.  (Or this behavior
is configurable as an editor setting).
 

But maybe I am in the minority

I am in that minority, too.  I had the same thoughts about cells with the same magics; probably because I often used sagews as a presentation tool (no computations) and am accustomed to the old behavior.

Just spitballing here:I was briefly confused by how the cell triangles and the toggle switches in the tool bar work together. I wonder if the toggle toolbar button could morph into a "toggle *all* input/output cells"? or toggle all %md, %html, %latex cells?  Do/will others use these buttons with the new triangle feature?

Thanks,
Steve

singlets

unread,
Oct 4, 2016, 9:38:22 PM10/4/16
to sage-cloud, bee...@ups.edu

Ooops, William's post related to this very thing came out while I was away.  Never mind...

Steve

Thanks,
Steve

Rob Beezer

unread,
Oct 4, 2016, 10:03:18 PM10/4/16
to sage-...@googlegroups.com
On 10/04/2016 12:22 PM, William Stein wrote:
> Make an issue. It's an enhancement...

For the record: https://github.com/sagemathinc/smc/issues/989

Thanks again.

Aaron Tresham

unread,
Oct 5, 2016, 1:30:49 PM10/5/16
to sage-cloud, bee...@ups.edu
I also like the old behavior - I rarely want my students to see the input of text cells.

But a menu that allows the user to hide all text input sounds like an acceptable compromise.

I'm glad I'm not the only one thinking about this.

Aaron

William Stein

unread,
Oct 5, 2016, 2:31:30 PM10/5/16
to sage-...@googlegroups.com, bee...@ups.edu


On Wednesday, October 5, 2016, Aaron Tresham <atre...@gmail.com> wrote:
I also like the old behavior - I rarely want my students to see the input of text cells.

But a menu that allows the user to hide all text input sounds like an acceptable compromise.

I'm glad I'm not the only one thinking about this.

Can you look at the ticket and the options listed there. I could implement this pretty quickly.  Maybe I should also add some code folding options to the menu (as they are not obvious)...

 

Aaron

On Tuesday, October 4, 2016 at 4:03:18 PM UTC-10, Robert Beezer wrote:
On 10/04/2016 12:22 PM, William Stein wrote:
> Make an issue.  It's an enhancement...

For the record:  https://github.com/sagemathinc/smc/issues/989

Thanks again.

--
You received this message because you are subscribed to the Google Groups "sage-cloud" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-cloud+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-cloud/cd63fe08-4f8d-4ea0-a48c-e5384a582b1a%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Aaron Tresham

unread,
Oct 5, 2016, 5:12:58 PM10/5/16
to sage-cloud
This menu would apply to the current cell, or currently highlighted cells, right?

I suppose the menu would get too long if you had "hide all," "show all," "hide all text," "show all text," etc., in addition to "hide current," "show current," etc. As you mentioned before, you can just use ctrl-a and then select from the menu.

I like the idea. Thanks for considering this.

On Wednesday, October 5, 2016 at 8:31:30 AM UTC-10, William Stein wrote:

Singleton, Steve

unread,
Oct 5, 2016, 5:22:52 PM10/5/16
to sage-...@googlegroups.com
On Wed, Oct 5, 2016 at 4:12 PM, Aaron Tresham <atre...@gmail.com> wrote:
This menu would apply to the current cell, or currently highlighted cells, right?

I suppose the menu would get too long if you had "hide all," "show all," "hide all text," "show all text," etc., in addition to "hide current," "show current," etc. As you mentioned before, you can just use ctrl-a and then select from the menu.
 
Except for those using the emacs bindings...

Rob Beezer

unread,
Oct 5, 2016, 10:31:58 PM10/5/16
to sage-...@googlegroups.com
On 10/05/2016 02:12 PM, Aaron Tresham wrote:
> This menu would apply to the current cell, or currently highlighted cells, right?

I understood William's suggestion (in the context of my students' work) to apply
to *all* of the cells in a worksheet.

Some of my personal hesitation to use the current in/out/x toggles is the
necessity of highlighting cells first.

William Stein

unread,
Oct 6, 2016, 5:19:22 PM10/6/16
to sage-cloud
One part of the menu would apply to the selected cells and another part to all.

-- william

>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-cloud" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-cloud+...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sage-cloud/MTAwMDAzOC5iZWV6ZXI.1475721113%40quikprotect.
Reply all
Reply to author
Forward
0 new messages