-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Adding toggle line numbers for all cells #1312
Conversation
Great, thanks for the contribution. Could you post a screenshot showing the On Wed, Apr 6, 2016 at 5:18 PM, Vivian Fang [email protected]
Brian E. Granger |
Great! It seems to me like this should go in the View menu, rather than the toolbar, though, given its relatively rare frequency. |
Screenshot added on first comment. |
@@ -65,6 +65,7 @@ define(function (require) { | |||
this.ws_url = options.ws_url; | |||
this._session_starting = false; | |||
this.last_modified = null; | |||
this.line_numbers = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I would make that private with a leading underscore, so that we can change the implementation easily.
Do we want to make the "all lines" numbers a property so that you can easily implement not a only a toggle, but a "show all" and "hide all". |
I tend to agree with @minrk that this is used infrequently and should probably be in the View menu. At the same time it doesn't take up much space in the toolbar. But, in either case, it should be included in the View menu (even if in the toolbar as well) |
Sure, I was just showing @Secant how to do thing, we did not get to the point of adding it in the menu.
Well... it is used infrequently...
It's like arguing that setting you car is self driving mode is not such a useful feature an as a proof you show that the number of car that self-drive on the road is low. Also, it also depend on whether we persist the value in nbconfig or not. If we persist it, people will use it once and forget it. At which point I agree that the toolbar is likely not necessary. If we don't persist it and keep it as an instance variable. some users will likely use it every time they open the notebook. Lastly, It was one of the most requested feature at JupyterDays, which make me think that – in the case we don't persist it to nbconfig – a visible UI element for it seem likely useful. |
I think that in the long run, a menu entry and persistence is the right way to do this. Whether we want to put it in the menu first and trust that we get round to persistence, or put it in the toolbar until we do persistence, I'm not sure. |
BTW, just for @Secant information, the View menu is generated server side in So you likely want to create a new menu like that
and you probably figured out on yourself that you have to modify Hope that helps. Feel free to push any more commit on the same branch and the PR will update. |
I like the idea of adding it to the View menu and making it persistent. On Thu, Apr 7, 2016 at 4:07 PM, Matthias Bussonnier <
Brian E. Granger |
👍 |
Reviving this one... I moved the toggle line numbers from the toolbar to the "View" menu. See #1676. @ellisonbg Any UX feedback? |
Hi! I'm a research apprentice at BIDS with Matthias (@ Carreau). This is for #1244.
Creates a button in the main toolbar that will toggle the line numbers on/off in all code cells. Future PR will have line numbering persist (i.e. new code cells will have line numbers turned on, if the user turned on line numbers for all cells).