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

Searching a folder with markdown and notebook files #95275

Closed
MaddyDev opened this issue Apr 14, 2020 · 3 comments
Closed

Searching a folder with markdown and notebook files #95275

MaddyDev opened this issue Apr 14, 2020 · 3 comments
Assignees
Labels
feature-request Request for new features or functionality search Search widget and operation issues verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@MaddyDev
Copy link
Contributor

Version: 1.44.1 (user setup)
Commit: a9f8623
Date: 2020-04-11T01:48:12.622Z
Electron: 7.1.11
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.18363

When using Juputer books or a folder with exclusively markdown and notebook files, Find in folder search isn't friendly.

Steps to Reproduce:

  1. Open a folder which has notebook and markdown files and search for a term to get some results.
  2. On clicking the expanded results, if it's a markdown file, it opens up as text file and if it's a ipynb file, it refreshes and does not scroll to the correct place.

It would be a better experience if we just show flat files which has the search term and open up the file in the correct format on click. Or have the expanded results to open up in the correct file format and scroll to correct location.

@bpasero bpasero assigned roblourens and unassigned bpasero Apr 15, 2020
@bpasero bpasero added the search Search widget and operation issues label Apr 15, 2020
@roblourens roblourens added the feature-request Request for new features or functionality label Apr 17, 2020
@roblourens
Copy link
Member

Thought about how to improve this. Here's an easy strategy and some notes on what we need to do.

  • When a search editor is opened, open the notebook find widget with the same parameters
  • Navigate to the first search match (maybe if the 3rd one was clicked, navigate to the 3rd match)
  • And sync find matches back into the search view, same as it works for text editors

Notes

  • Extend IEditorOptions with options for other editors so the notebook editor can be opened in "search mode"
  • Or, just have the search view call a method on the notebook editor that's returned from IEditorService#openEditor. This is probably a lot easier, and I don't know whether editor options are handled when the editor is already open.
  • The notebook find widget doesn't initialize the search when the search string is changed programmatically
  • Should move the find implementation from the cell VMs to the NotebookTextModel so it works more like the text editor find
  • Then have SearchModel interact with the notebook model basically the same as it does with the text editor model

@roblourens
Copy link
Member

Filed #148068 to continue

Verification steps

  • Do a text search in a workspace that contains a notebook
  • Get a match in the notebook JSON (eg search something that will match a single line of code or markdown in a ipynb or github-issues file). This is a basic text search, it doesn't know how the notebook is rendered
  • Click a search result
  • The notebook editor should open with the find widget open to the same query
  • The notebook editor should scroll to the same index match that you clicked - if you clicked the third match, it should scroll to the third match in the notebook

Since this is still a basic text search in json, you may get different results in the search sidebar as in the notebook editor!

@roblourens roblourens added the verification-needed Verification of issue is requested label Apr 25, 2022
@jrieken jrieken added the verified Verification succeeded label Apr 27, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jun 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality search Search widget and operation issues verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants
@roblourens @bpasero @jrieken @MaddyDev and others