berkeley-dsep-infra / datahub

JupyterHubs for use by Berkeley enrolled students
https://docs.datahub.berkeley.edu
BSD 3-Clause "New" or "Revised" License
62 stars 37 forks source link

Allow user to toggle 'show hidden files'? #5825

Closed cboettig closed 13 hours ago

cboettig commented 4 days ago

Summary

In our course, ESPM-157, many features we would like to cover, including git, GitHub Actions, git lfs (used in huggingface), require access to hidden files. (besides, we generally want students to understand what a hidden file is and feel confident working with it). Historically we have used the RStudio editor, where this a dropdown on the File menu.

In Jupyterhub, it looks like turning this on involves some additional steps? https://jupyterlab.readthedocs.io/en/latest/user/files.html#displaying-hidden-files (I've tried toggling this in the settings editor menu, but it doesn't seem to have an effect.)

Acceptance criteria

Users can choose to show or hide hidden files (dot files) using the View menu, as described in https://jupyterlab.readthedocs.io/en/latest/user/files.html#displaying-hidden-files

Additional Notes

I know we have the vscode (OSS Code) editor available, which already supports this too, but I'm hoping to just stick with the JupyterLab interface for consistency & simplicity it offers....

ryanlovett commented 4 days ago

This is enabled in stat159 hub:

cboettig commented 3 days ago

@ryanlovett thanks, that's great! I was looking for how to do this in values.yaml file and couldn't figure it out. Is this documented somewhere? extraFiles.culling-config.data doesn't seem like the most obvious path to find ContentsManager options...

ryanlovett commented 3 days ago

@cboettig I think Yuvi chose culling-config because that's the slug that references the file contents that gets mounted at /etc/jupyter/jupyter_notebook_config.json. At the time the contents contained configuration related to culling. This contents should probably be put in the file /etc/jupyter/jupyter_server_config.json instead since it impacts jupyter server. The slug should be named jupyter_server_config.json (like what 2i2c does) to make it clearer.

This particular config is documented in JupyterLab and jupyter server.

If someone else doesn't get to it, I can make a PR on Monday.

balajialg commented 1 day ago

I just saw the conversation and created #5830 to address the changes listed here. Ryan - happy to close my PR incase you have specific changes in mind.

ryanlovett commented 1 day ago

Thanks for submitting that @balajialg ! I recommend the changes mentioned in https://github.com/berkeley-dsep-infra/datahub/issues/5825#issuecomment-2198456856. (not using culling-config since it is misleading and using /etc/jupyter/jupyter_server_config.json as the filename -- see the 2i2c example)

balajialg commented 1 day ago

Ah, thanks (my bad)! I just updated the PR with a new commit