-
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
Confused about what Edit/View does #2203
Comments
We added these because previously you couldn't do either of these things from the UI:
The error viewing an HTML page is a bug; I'll look into that. |
See jupytergh-2203 The URL calculation was going wrong, so it was using a URL starting with //files. This uses url_path_join() to get the separators right.
#2208 fixes the error viewing HTML files, at least for me. Thanks for spotting that before we released! |
I think we can close this one as it is html view is fixed by #2208. And I agree with @takluyver that we should not be too smart. Edit/View everywhere seem fine to me. |
Not thrilled with all the buttons, but ok 👌
I don't understand why we would introduced new buttons that don't do anything useful.
…Sent from my iPhone
On Feb 22, 2017, at 10:47 AM, Matthias Bussonnier ***@***.***> wrote:
I think we can close this one as it is html view is fixed by #2208. And I agree with @takluyver that we should not be too smart. Edit/View everywhere seem fine to me.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
They both do something useful under certain conditions; see my earlier comment. |
Got it! I missed the issue of editable files that report the an unexpected MIME type. But allowing users to click on files that we know they won't be able to edit is very confusing (images in particular). Given this new information, my preference would be:
|
There is another minor use for 'view', which I forgot - it gives you a way to get the raw text of a file which would otherwise open in the text editor. Possibly niche, but could be useful if you have e.g. a very long file. I'd broadly agree with hiding edit when only images are selected, but we need to be a bit careful, because |
Why ? Html are perfectly valid text files. Can't you edit a
Why ? Isn't SVG a valid image format you might want to edit with a text editor? |
Well, just 🐴 with @takluyver and I think we agreed, we don't want to be in the businesss of deciding what can and/or cannot be viewed/editted. |
@Carreau sorry I think there were two possible meanings in my sentence "Only offer "View" for HTML files":
I was meaning (2), so that yes, you would see the "Edit" button for HTML files. But you wouldn't see the "View" button for other things. And by image types, I was only referring to jpg/png, not svg, which is definitely text and can be edited just fine. Right now if you "edit" a jpg or png, it opens the text editor, but it fails with an encoding error. If a user says "Edit this jpg file" that is a disappointing and confusing outcome... @takluyver I agree that getting the raw text of a text file using "View" would be useful, but that doesn't work right now. The View button only shows (as far as I can tell) for HTML files. So actually, the current behavior actually matches my preference (View only shows for HTML files). So I think the only change I would like is to not show the "Edit" button for the |
Ah ! Sorry for the confusion.
Wait do you mean "Edit" ? Like you don't want the "View" button for images ?
I got what you were thinking. The problem is that OS are known to not give the right mimetype. We had many issues with windows reporting css as Keep in mind that the button at the top are advanced action, by default clicking on the links will do the right thing (hopefully). And removing either edit (or view) has IMHO more chance of annoying advanced users than to really be annoying for newcomers, and I think that Jupyter have mostly been about allowing users to do arbitrary things, and that would go the opposite way. |
I totally agree we should give advanced users the tools they need. The issue in this case is that the "advanced" usage-case buttons are put right in the middle of very basic buttons such as Move, Download and Delete: That makes the lives of the many non advanced users difficult, just to appease the advanced ones. The right UI for this type of thing would be to put the more advanced action behind a context menu, but I think that is outside the scope of 5.0. Trying to think about an in between path... We already have a reg-exp in these code paths for file extensions: https://github.com/jupyter/notebook/blob/master/notebook/static/tree/js/notebooklist.js#L604 Editing those lists for the Edit/View button is trivial. Also, looking at file extensions is exactly how we map files onto models/views that can view/edit those files in JupyterLab. I can submit a PR to address this...but what to do exactly. To me, the most important question is this "what precise things do the Edit/View buttons enable a user to do that they could not do otherwise". Based on what Thomas said that is:
Let me see if I can put together a PR that shows the Edit/View buttons for these cases alone. |
OK, I think the PR I just submitted addresses everything. Thanks! |
I'm still confused. Is this issue resolved? I just upgraded to 5.1.0, and I can not edit what I guess are considered "unknown" files now (but all purely text). My opinion is to err on side of more flexible. Let anything be editable (with the understandable exception of notebook files, as already done). Maybe use an alert when you click edit to say "Hey, I think this is a binary file, are you sure?", but removing the edit button seem a little drastic to me. MIME types, accepted extensions, unaccepted extensions (or even other suggestions like binaryornot) all seem to be making the decision for me, when I'd rather decide if I want to be able to click edit or not. Choosing the default behavior is fantastic, but preventing me from editing feels like a little much. Even if I'm only 1% of 1%. WorkaroundI can work around this by adding a bookmark with |
Can you give some examples of files that you expect to be able to edit but can't? |
@takluyver The GNU Coding standards require all projects to have a set of text files called As a Unix user, I'm used to think that everything is a text file unless proven otherwise, so this feels backward. |
If that is the case (I am not doubting you) then we definitely have a bug.
The edit/view semantics are a bit subtle, sounds like we missed some things.
…On Fri, Sep 29, 2017 at 12:00 PM, Alexandre Duret-Lutz < ***@***.***> wrote:
@takluyver <https://github.com/takluyver> The GNU Coding standards
require all projects to have a set of text files called README, NEWS,
ChangeLog, LICENSE, etc. Those are text files without extension. Python's
mimetype.guess_type returns (None, None). Jupyter 5.1.0 does not allows
those files to be viewed or edited, at least on my system.
As a Unix user, I'm used to think that everything is a text file unless
proven otherwise, so this feels backward.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2203 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABr0LWbZjb8oDByq3qLTF6JDT6FkCjYks5snT5UgaJpZM4MFi32>
.
--
Brian E. Granger
Associate Professor of Physics and Data Science
Cal Poly State University, San Luis Obispo
@ellisonbg on Twitter and GitHub
[email protected] and [email protected]
|
I'm also on 5.1.0 and the Edit button doesn't show up for .r and .R files either. |
@gnestor - can we fix this for 5.1.1? - this is a pretty significant
regression
…On Wed, Oct 4, 2017 at 8:16 AM, Dang Trung Kien ***@***.***> wrote:
I'm also on 5.1.0 and the Edit button doesn't show up for .r and .R files
either.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2203 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABr0K8pczPvWiAEAh0wDi7Jyfou33vrks5so6E9gaJpZM4MFi32>
.
--
Brian E. Granger
Associate Professor of Physics and Data Science
Cal Poly State University, San Luis Obispo
@ellisonbg on Twitter and GitHub
[email protected] and [email protected]
|
@ellisonbg Yes, I will push for a 5.2 release tomorrow or Monday with a fix for this. |
Thanks!
…On Thu, Oct 5, 2017 at 3:16 PM, Grant Nestor ***@***.***> wrote:
@ellisonbg <https://github.com/ellisonbg> Yes, I will push for a 5.2
release tomorrow or Monday with a fix for this.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2203 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABr0BQSyg74RalkJexH7QWBOCJkNXp7ks5spVUlgaJpZM4MFi32>
.
--
Brian E. Granger
Associate Professor of Physics and Data Science
Cal Poly State University, San Luis Obispo
@ellisonbg on Twitter and GitHub
[email protected] and [email protected]
|
Could we get the current #2871 in as part of 5.2? |
@rgbkrk Yes! Shall I merge? |
Notebook 5.2.0rc1 is available on PyPI so please give it a try and confirm that this is resolved 👍:
|
@gnestor, did you mean 5.2.0rc1? |
I did 🤦♂️ |
Just tested. Works for both .r files and files without extension. Thanks a lot @gnestor 👍 |
I am doing UI/UX testing for issue #2142. The Edit/View button are either not working or working in a way that is really confusing. Here is what I observe:
Is this a bug?
My recommendations:
@gnestor
The text was updated successfully, but these errors were encountered: