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

Testing: Notebook Rich Content Search for Editable Contents in Open Notebooks #174724

Closed
3 tasks done
andreamah opened this issue Feb 17, 2023 · 4 comments
Closed
3 tasks done

Comments

@andreamah
Copy link
Contributor

andreamah commented Feb 17, 2023

Refs #164926

Complexity: 4

Create Issue


Background

The goal of this issue is to test the part of #164926 that is in insiders. This should enable "rich content" search in open notebooks, meaning that, in open notebooks, search results should show actual results found in the notebook instead of raw results found in the text file. Currently, this only involves showing results for writeable content in notebooks (ie: cell inputs, markdown sources).

A simple example of this is that raw text could show

"print(\"Hello World\")",

which would look like

print("Hello World")

in the notebook. With my current progress, you should see the first (raw) one when notebooks are closed and the second (processed) one when the notebook is opened and rendered. This is because it uses the notebook editor's find widget when the notebook is open to find search results.

Note that the search results when a notebook is open aren't going to show non-editable contents (cell outputs, markdown previews) yet.

Example GIF of behavior:
Recording 2023-02-16 at 10 08 32

Set up:

  • Download the newest Insiders.
  • set "search.experimental.notebookSearch": true in your settings.

Testing:

  1. Open a workspace that has notebooks.
  2. Test the new search functionality. You should see the "rich content" results appear when you:
    a. Open a notebook with search results, either from the explorer or from the search results itself.
    b. Perform a search and there are results in a currently opened notebook.
  3. Results should show for all opened notebooks, and only for editable contents.
  4. Replace and Replace All functionalities should work, in addition to Dismiss for the results.
  5. Dirty changes in notebooks that are open and have results in the search view should reflect in the search results.
  6. Results should be properly highlighted when you open the file. Jumping to a result when clicking on it should work.
  7. Setting the experimental flag to false will restore search to its default behavior.

Thanks for testing! :)

@ulugbekna
Copy link
Contributor

ulugbekna commented Feb 21, 2023

@andreamah all outlined items work, but: the replace on enter doesn't work -- is this intended? Just wanted to make sure before creating an issue.

On the gif you can see how on enter, the found text isn't replaced when inside a notebook, but works in a text file.

Screen.Recording.2023-02-21.at.14.08.17.mov

@ulugbekna ulugbekna removed their assignment Feb 21, 2023
@andreamah
Copy link
Contributor Author

@andreamah all outlined items work, but: the replace on enter doesn't work -- is this intended? Just wanted to make sure before creating an issue.

On the gif you can see how on enter, the found text isn't replaced when inside a notebook, but works in a text file.

Were you testing the find widget (CTRL+F)? This TPI is for the global search (CTRL+SHIFT+F).

Find widget:
image

Global Search:
image

I just noticed that you were interacting mainly with the find widget in the screencap, which doesn't need to be tested here.

@ulugbekna
Copy link
Contributor

Oh, I somehow tested only Replace using the find widget (out of habit).

Replacing on Enter doesn't work regardless of find/global search widget both for notebooks and text files -- I guess that's intentional. Sorry for the noise :-)

@andreamah
Copy link
Contributor Author

Oh, I somehow tested only Replace using the find widget (out of habit).

Replacing on Enter doesn't work regardless of find/global search widget both for notebooks and text files -- I guess that's intentional. Sorry for the noise :-)

Ah ok! I was just making sure that you were testing the right thing :)

On search, I don't think we support something like replace on enter, since pressing enter when in the replace field will run the search. It should still work on the find widget, though (I think). You can file an issue for that.

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

No branches or pull requests

5 participants
@TylerLeonhardt @ulugbekna @joyceerhl @andreamah and others