You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This has to do with using the search widget to search for notebook content. Like in previous TPIs, the search widget should be able to search fully in open notebooks. However, when a notebook was closed, the search widget always searched the raw source text of the notebook. In the TPI linked above, you could see how opening a search result changed the search result preview's text so that it matches the "rich" version of the text that you view from the notebook editor. With my changes, I'm aiming to show "rich" results before you open the notebooks. These will be limited to only searching notebook INPUTS for now (code and markdown input) when a notebook is closed. This means that it's normal to see extra results appear (or results changing preview text) when you open a notebook (either from a result or not) because opening a notebook triggers another search that should also show results for outputs and rendered content.
DEMO:
closed-notebook-search.mp4
Set up:
Enable search.experimental.closedNotebookRichContentResults. Just to be sure that you're in a good state, please also reload the window after you do this.
Testing:
Test that:
searching in closed notebooks shows only matches that are in notebook inputs and not notebook outputs.
searching in closed notebooks shows "rich" content.
For example, you can have a cell that contains the python:
print('hello')
print('hello')
print('hello')
And the search result in the closed notebook should NOT have quotes.
Incorrect:
Correct:
Clicking on a search result should open the document at the appropriate location. Please be aware that this might not always work upon opening the notebook due to this bug. Also, this bug might prevent the current match from being highlighted correctly upon clicking on a search result.
searching in non-notebooks is as expected still.
Please just play around the feature and leave feedback on what you think!
Future work
For the future, I'm planning on improving on these two areas:
Performance of the notebook search (especially in remote scenarios). Issue here
Potentially adding support for searching outputs in closed notebooks.
In this case, possibly facilitating better switch between closed and open notebook search (since filter icon suddenly appears for searching open notebooks, but not closed).
The text was updated successfully, but these errors were encountered:
Refs #173726
Complexity: 4
Create Issue
Intro:
Hi! 👋
This has to do with using the search widget to search for notebook content. Like in previous TPIs, the search widget should be able to search fully in open notebooks. However, when a notebook was closed, the search widget always searched the raw source text of the notebook. In the TPI linked above, you could see how opening a search result changed the search result preview's text so that it matches the "rich" version of the text that you view from the notebook editor. With my changes, I'm aiming to show "rich" results before you open the notebooks. These will be limited to only searching notebook INPUTS for now (code and markdown input) when a notebook is closed. This means that it's normal to see extra results appear (or results changing preview text) when you open a notebook (either from a result or not) because opening a notebook triggers another search that should also show results for outputs and rendered content.
DEMO:
closed-notebook-search.mp4
Set up:
Enable
search.experimental.closedNotebookRichContentResults
. Just to be sure that you're in a good state, please also reload the window after you do this.Testing:
Test that:
For example, you can have a cell that contains the python:
And the search result in the closed notebook should NOT have quotes.
Incorrect:
Correct:
Future work
For the future, I'm planning on improving on these two areas:
The text was updated successfully, but these errors were encountered: