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
[notebook] read-only: disable name field #1132
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -106,6 +106,10 @@ $(document).ready(function () { | |
$('div#config_section').addClass('hidden'); | ||
$('div#kernel_section').addClass('hidden'); | ||
$('span#login_widget').removeClass('hidden'); | ||
|
||
// set the notebook name field as not modifiable | ||
$('#notebook_name').attr('disabled','disabled') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you have an aesthetic preference for 'disabled' vs 'readonly'? Functionally identical, but disabled greys out the field. I'm 50-50 on this one. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I slightly prefer the 'disabled' because it's another visual clue of the read-only mode. I often myself mistaking both mode because you can still select things in RO-mode, especially the blinking cursor also. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fair enough, it does serve as a decent indicator of read-only mode (along with the absence of the save button, etc.). We definitely don't want to do something like this to the regular notebook fields, which are just read-only. Those must remain selectable, and should probably not be aesthetically altered. The blinking cursor would maybe be nice to remove, but it should otherwise look unaltered. |
||
|
||
// left panel starts collapsed, but the collapse must happen after | ||
// elements start drawing. Don't draw contents of the panel until | ||
// after they are collapsed | ||
|
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.
On this one, the approach we have gone with elsewhere is to start with class=hidden, and remove that once we know that we are not read-only. That way, we don't flash text on the screen.
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.
Ok, done, this wasn't the case for surrounding element like
new_notebook
button, I've changed it also.