Skip to content
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

Add support to view hidden files in JupyterLab #3160

Closed
fperez opened this issue Jan 19, 2022 · 15 comments
Closed

Add support to view hidden files in JupyterLab #3160

fperez opened this issue Jan 19, 2022 · 15 comments
Assignees

Comments

@fperez
Copy link
Collaborator

fperez commented Jan 19, 2022

Summary

As of 3.2.0, JupyterLab now has support for displaying hidden files in the file manager. But for the option to appear in the View menu, a server side option must be toggled.

User Stories

I think users of all hubs may benefit from having this option active, as it makes it possible to edit configuration files more easily with the GUI editor, which was otherwise very cumbersome.

Acceptance criteria

The View menu will have a Show Hidden Files menu entry for all users.

@yuvipanda
Copy link
Contributor

Great, I'll enable this for stat159 hub soon.

@balajialg do you think this would be useful to enable globally for everyone?

@fperez
Copy link
Collaborator Author

fperez commented Jan 19, 2022

@yuvipanda @balajialg the reason I suggested enabling it everywhere is b/c if a user ever needs to edit any hidden file (say .bashrc), it's extremely awkward to do it absent this feature. They have to go to the CLI and either edit it with vi/emacs/whatever, or make a symlink or rename it temporarily.

I've had occasional need for that in other courses, so I think it's a useful thing to have with no downsides I can see (it doesn't show them by default).

@fperez
Copy link
Collaborator Author

fperez commented Jan 19, 2022

Many thanks @yuvipanda!

@yuvipanda
Copy link
Contributor

@fperez do you know if it shows them by default in classic noteobok?

@fperez
Copy link
Collaborator Author

fperez commented Jan 19, 2022

It doesn't show them at all in Classic, and has no way of showing them whatsoever. I think for Classic it was much less of an issue as it was used largely for notebooks with minimal "full OS"-type usage, which we see much more of with Lab. So while it was an occasional minor nuisance before, I think of it as a real issue now.

@balajialg
Copy link
Contributor

balajialg commented Jan 19, 2022

@fperez Thanks for suggesting this use case.

TL;DR: @yuvipanda From my limited experience, I have not seen any of our users report having trouble editing hidden files. I don't have enough data to form a point of view here and would go with what you both decide as the right thing to do.

Having said that, Making a couple of assumptions, (Correct me if I am wrong)

  • It is already enabled by default in a classic notebook or
  • Users never had to tweak a hidden file as part of setting up their hub.

Thinking in the near term, there is no harm in enabling this feature considering the advantages articulated by @fperez and also that most users not using the lab at this juncture.

@fperez
Copy link
Collaborator Author

fperez commented Jan 24, 2022

@balajialg - if your users have had a good experience editing hidden files, could you share how they do it? There may be a good solution I'm not aware of and I'd love to know.

As the course advances I'm realizing this is actually more important than I'd originally thought, as my students are going to need to do this kind of manipulation reasonably often. I'd love to have a good solution if possible (either activating this option in JupyterLab or something else if @balajialg knows of alternatives).

Thanks!

@balajialg
Copy link
Contributor

balajialg commented Jan 25, 2022

@fperez Apologies for not being clear with my earlier comment! To set the context, most instructors (amongst 60+ courses using Datahub) either use classic notebook or RStudio to support their instructional needs. Considering that, there haven't been any requests related to editing hidden files that I am aware of. As Data 100 (last semester) was the only class that used Jupyter Lab, I am not able to extrapolate the universality of enabling this functionality across other courses.

Having said that, I don't see any harm in enabling this functionality across other hubs considering the problem it solves for your students!

@fperez
Copy link
Collaborator Author

fperez commented Jan 25, 2022

Ah, understood, thanks - then in that case yes, I think this is totally worth doing.

I'm using 159 as a testing ground for teaching students a good cloud-native workflow, where they have an environment in our hub that gives them a solid setup for most of their computing, and where they learn how to do lots of different tasks, not only run notebooks or R scripts.

So I want to show them how to "live" in a hub full-time (and I'm doing so myself to eat my own dog food!), which requires things like regular configuration management, lots of command-line work, etc.

If this goes well, I can imagine it being a pattern we use more and more of in the future, so in a sense I'm exploring early terrain here :) Thanks for your support!

@balajialg
Copy link
Contributor

balajialg commented Jan 25, 2022

@fperez That's fascinating! We are receiving requests from a few other instructors across different departments (recently Civil Engg) who want to do advanced use cases (a subset of things you are doing currently like securely pushing to Github, modifying conda environment, etc.). So, your explorations in this aspect will benefit us in guiding other instructors who might also be interested in doing the same.

On another note, It will also be helpful if you could document your experience at the end of the semester (only if your time permits).

@fperez
Copy link
Collaborator Author

fperez commented Jan 25, 2022

For sure @balajialg - having a discussion on these more advanced use cases would be very useful. We can think about whether to do so in a smaller setting with just the campus team, or with the broader audience of the Data Science Education workshops, as I think these patterns of usage apply more broadly.

Happy to talk about all that after we survive the semester!

@yuvipanda
Copy link
Contributor

Unfortunately enabling the ContentsManager setting shows all hidden files by default in classic notebook, without any ability to hide them:

image

I think this would be confusing for classic notebook users.

@balajialg
Copy link
Contributor

balajialg commented Jan 25, 2022

@fperez Thanks a lot for considering the documentation request! Those two suggested options sound great. Let's talk more at the end of the semester.

@yuvipanda Did you disable this option or is it specific to Stat 159 hub? I am not able to see any difference in my instance of Datahub.

@fperez
Copy link
Collaborator Author

fperez commented Jan 26, 2022

Thanks for checking @yuvipanda - for Stat159 it doesn't matter - we're not using the Classic UI for anything, and it doesn't bother me if they happen to open it and see those files. Hiding them is a convenience for certain use cases, but not a problem in ours.

One more reason to accelerate the retrolab transition :) (I'm not saying it has options to deal with this, but if it doesn't, it should be easier to add one since the functionality is already there in JLab).

@fperez
Copy link
Collaborator Author

fperez commented Jan 31, 2022

Thanks!! I see this was implemented (not sure when, just noticed it today, right as we needed it, so perfect timing!! :).

Closing as it's done for us, very helpful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants