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

UI issue in the "tree view" #7216 #7253

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

Conversation

itsmevichu
Copy link
Contributor

Issue No. #7216

Problem

The problem arises whenever these keywords, namely {“notebooks”, “edit”, ”consoles”, ”terminals”}, are detected in the path. This leads to undesired behaviour when directories with these keywords are present.

Some of our plugins actively monitor the URL path for the above keywords to execute corresponding commands. When these plugins come across the path with matching keywords(directories) during file browsing(tree view), they are forced to execute the associated command, which causes the issue.

Solution

  1. Since our file browsing consistently include the "tree" keyword in the path, I've explicitly handled the situation by ensuring that the plugins do not execute when the path contains the keyword "tree".
  2. In another scenario, when the folder structure is like /terminals/temp.ipynb, opening it redirects the path to /notebooks/terminals/temp.ipynb(also applies for other file formats); this unintentionally triggers the terminal-extension plugin. I alse have addressed this specific case explicitly to prevent such occurrences (This also applies to consoles).

Thank you for considering my contribution. And I welcome any feedback or suggestions for further improvements.

Copy link
Contributor

Binder 👈 Launch a Binder on branch itsmevichu/notebook/ingore-tree-patterns

@krassowski krassowski added the bug label Feb 18, 2024
@jtpio jtpio modified the milestones: 7.0.x, 7.1.x Feb 19, 2024
const [, , path] = matches;
if (!path) {
return;
}

const pathSegments: string[] = parsed.path.split(pathSegmentPattern);
if (pathSegments.length > 1 && pathSegments[0].match(ignoredPattern)) {
Copy link
Member

Choose a reason for hiding this comment

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

Wondering if following a similar logic as in JupyterLab (disposing the command after routing) could help keep things simpler and avoid special cases using patterns?

https://github.com/jupyterlab/jupyterlab/blob/cdca0a20ba84af21922c390c46e086e50120d4cc/packages/application-extension/src/index.tsx#L938-L939

@jtpio jtpio modified the milestones: 7.1.x, 7.3.x Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants