-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Add filtering notebook cells with tags #15157
base: main
Are you sure you want to change the base?
Add filtering notebook cells with tags #15157
Conversation
Thanks for making a pull request to jupyterlab! |
Is there an issue discussing design of this feature? I know that tag filtering was previously (3.x) available in Table of Contents. From the UX point of view it appears of high important to indicate that the tag filters that are active. Is the intent to move it back to ToC or keep it on the toolbar? |
I am not sure there is an issue discussing this design apart from what is said in issue #12542. For the moment the idea is too keep this filtering tool accessible from the toolbar. I would be happy to further discuss UX aspects. Can you please elaborate what you mean by its is of high importance to indicate what tags filters are active. Thanks. |
In past, when the feature of collapsing cells or collapsing headers was introduced users were very distressed when they triggered it accidentally or triggered it intentionally and forgot that it was active because this lead to impression of:
therefore whenever a feature temporarily hiding cells is active it is important to offer an indication of that. On placement of the feature, we previously had it in the ToC, please see mockups/screenshots from #8566 (comment): and #10346: At the time I suggested that maybe a good placement would be in the cell tools sidebar where the cell tags are added in the first place(#8566 (comment)), but I do not have a strong opinion on it. |
@krassowski Thanks for the precision. For the moment the tool is very basic but it is worth to keep this in mind for the future. |
328ff04
to
0f0f7a4
Compare
I think that the UI/UX here should be addressed before merging because:
|
0f0f7a4
to
3772baa
Compare
@krassowski Thanks for the comment. In a future commit, I will either use the filterdot icon option in a first time or move the button to the common tools panel. But first, I am addressing the addition of buttons to validate the tag selection or to clear all filters as it was in the previous filtering tool of jupyterlab 3 version. |
408bef4
to
823ad8d
Compare
You can see in the introduction of the PR an updated gif with demonstration of clicking on a button in the common tool, opening a dialog and having the possibility to check some filters (not sure this is the best user experience, maybe having the content of the dialog directly in the common tools would be nicer? but then it is much more complicated to synchronize everything) For the moment, the case of closing the dialog without having properly clicked on one of the 3 buttons is not addressed (leading to a desynchronisation between the tags checked and the collapsed cells when reopening the dialog). |
14a36b1
to
fb55843
Compare
@krassowski I hope with this last commit we approach something close to what you suggested in terms of UX. Note that when a notebook is opened and when it already has collapsed cells, when opening the filtering dialog, all cells are reset to uncollapsed. I don't know if this is the best behavior to propose. |
bot please update snapshots |
Documentation snapshots updated. |
Galata snapshots updated. |
201186a
to
9f6d73b
Compare
bot please update snapshots |
Documentation snapshots updated. |
@krassowski I totally agree that force pushing makes it difficult to see most recent elements of the discussion. If you have any suggestion to make it better and more convenient, please let me know. I will try to change this. |
Well, I do not know of any mitigation other than using merge commits for resolving conflicts rather than using rebase + force-push (and I completely understand that sometimes force-push is more convenient). |
c5cb983
to
c85c5c5
Compare
bot please update snapshots |
c85c5c5
to
9e3833f
Compare
9e3833f
to
5991580
Compare
@krassowski The PR is now up to date with main. There is only the check_links test failing. |
@ericsnekbytes I am wondering if you had more feedback or thoughts about this point ? Thanks |
@HaudinFlorence There's definitely a mismatch in expectations for me using this tool. I was expecting to select tags in the popup dialog, then hit the "collapse cells" button to collapse cells that had that tag applied. From what I understand now, it looks like the tool intends for you to select tags, and when applied, it will hide cells that do not have that exact combination of tags. I was not expecting the dialog to have any tags already highlighted: I expected them to be blank, then allow me to pick tags for a one-time filtering operation. Some suggestions:
|
@ericsnekbytes Thanks your detailed inputs. So if I understand correctly, you would have expected to select the tags directly in the dialog and not using the current
|
This PR aims at adding a way to filter (basically to collapse) cells of a notebook that have specific tags. It provides a dialog listing all the tags of all the cells. The user can choose and check tags in the interface. All the tagged cells will then be collapsed respectively.
Final styling
References
This PR
fixes #12542
fixes #8298
Code changes
In
packages/notebook-extensions/src
:filterCells
celltaglist.tsx
filterCells
command: when clicking a dialog open displaying the list of available tags for all the cellsUser-facing changes
Backwards-incompatible changes