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

Issue29/update on rename #49

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

andrewfulton9
Copy link
Collaborator

Reference Issues or PRs

Closes #29

What does this implement/fix?

Put a x in the boxes that apply

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds a feature)
  • Breaking change (fix or feature that would cause existing features not to work as expected)
  • Documentation Update
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build related changes
  • Other (please describe):

Adds functionality to rename gallery directories and their parent directories.

gallery-rename-example-small.mp4

Testing

  • Did you test the pull request locally?
  • Did you add new tests?

Documentation

Access-centered content checklist

Text styling

  • The content is written with plain language (where relevant).
  • If there are headers, they use the proper header tags (with only one level-one header: H1 or # in markdown).
  • All links describe where they link to (for example, check the Nebari website).
  • This content adheres to the Nebari style guides.

Non-text content

  • All content is represented as text (for example, images need alt text, and videos need captions or descriptive transcripts).
  • If there are emojis, there are not more than three in a row.
  • Don't use flashing GIFs or videos.
  • If the content were to be read as plain text, it still makes sense, and no information is missing.

Any other comments?

This works really well within a session, but the changes aren't reflected between sessions which I think is probably important. I'm unsure what the best way to keep between session state is. One idea would be to make the destination attribute of Gallery Manager a setting. This would be able to save state across sessions for the top level destination folder, but to keep each exhibits destination attribute added in this branch could easily lead to bad UX. Another idea would be to do a recursive search through the filesystem for the repo name if the repo doesn't exist in the expected location on load and assume that any exact matches are in fact the repo. This would work in most cases, but has the potential to slow down startup considerably and false positive matches could also be poor UX.

@krassowski, do you have any thoughts on this?

@andrewfulton9 andrewfulton9 self-assigned this Jan 22, 2025
Copy link

Binder 👈 Launch a Binder on branch andrewfulton9/jupyterlab-gallery/issue29/update_on_rename

Copy link
Member

@krassowski krassowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm.. that's an interesting idea, but while it keeps the gallery working within the current jupyter-server lifetime it will not work after restart?

@andrewfulton9
Copy link
Collaborator Author

Hmm.. that's an interesting idea, but while it keeps the gallery working within the current jupyter-server lifetime it will not work after restart?

That's my understanding. If the server is restarted I don't believe the state is saved.

@krassowski
Copy link
Member

In that case, should we just allow user to download it again rather than to navigate to renamed folder?

@andrewfulton9
Copy link
Collaborator Author

Yeah that sounds good for me. In that case, I will try to figure out a test for this mark this ready for review

@andrewfulton9 andrewfulton9 marked this pull request as ready for review January 27, 2025 22:41
@andrewfulton9
Copy link
Collaborator Author

I added a test for this that is passing. The failing integration tests that are failing are addressed in #48

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

Successfully merging this pull request may close these issues.

Update should be triggered on rename, not only on delete
2 participants