Skip to content

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

Open
itsmevichu wants to merge 12 commits intojupyter:mainfrom
itsmevichu:ingore-tree-patterns
Open

UI issue in the "tree view" #7216#7253
itsmevichu wants to merge 12 commits intojupyter:mainfrom
itsmevichu:ingore-tree-patterns

Conversation

@itsmevichu
Copy link
Copy Markdown
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.

@github-actions
Copy link
Copy Markdown
Contributor

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

@krassowski krassowski added the bug label Feb 18, 2024
Comment thread packages/application-extension/src/index.ts Outdated
@jtpio jtpio modified the milestones: 7.0.x, 7.1.x Feb 19, 2024
@itsmevichu itsmevichu requested a review from jtpio February 20, 2024 17:50
}

const pathSegments: string[] = parsed.path.split(pathSegmentPattern);
if (pathSegments.length > 1 && pathSegments[0].match(ignoredPattern)) {
Copy link
Copy Markdown
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
@jtpio jtpio modified the milestones: 7.3.x, 7.5.x Nov 15, 2025
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