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

Corpus Viewer output only selected documents #507

Closed
robertcv opened this issue Mar 26, 2020 · 8 comments · Fixed by #562
Closed

Corpus Viewer output only selected documents #507

robertcv opened this issue Mar 26, 2020 · 8 comments · Fixed by #562
Assignees

Comments

@robertcv
Copy link
Collaborator

Text version

master

Orange version

master

Expected behavior

I search for a word in Corpus Viewer and get some documents. I would then expect the output to be those documents that I also select in the documents list. It would behave more like Data Table.

Actual behavior

The output is always documents that match search regardless of what is selected in the documents list.

Steps to reproduce the behavior

Corpus (grimm-tales-selected.tab) -> Corpus Viewer -> search for dog -> select Snow White to The Fox and the Cat

@robertcv
Copy link
Collaborator Author

@ajdapretnar What do you think?

@ajdapretnar
Copy link
Collaborator

This was by design in the beginning, but it did occur to me it is quite strange. The question is how would we handle both the filter and the selection?

If filter and no selection, what happens? Does the user have to select all documents manually? Or do we output filtered documents and apply selection on top if it is present?

@ajdapretnar
Copy link
Collaborator

Btw, selection here is connected to display, so that is another issue. Selection means what you want to see in the viewer.

What if documents are selected for the view? Are they output automatically? Even if there is no filter?
Do we disconnect documents from the view? It doesn't make sense, right?

@djukicn
Copy link
Collaborator

djukicn commented May 15, 2020

This functionality bothers me, too. What if there was a radio button choice between outputting matching documents or outputting selection? That way the user could control whether the selection is used only for choosing documents to view or also for outputting. By choosing to output selection, one could also use regexp filter only to narrow down the search for relevant documents and then manually select the subset of matching documents. Clicking on the option to output matching documents would preserve the current behavior of the widget.
Or even simpler, instead of radio button we could just add another output.

@ajdapretnar
Copy link
Collaborator

Would it be too counter-intuitive to say:

  • if selection, put it on the output
  • otherwise output the filtered documents

Would that cause issues with settings?

@djukicn
Copy link
Collaborator

djukicn commented May 15, 2020

If I see correctly, there's always at least one document selected (when the widget starts, the first document is selected). Is there a way to clear selection?

@ajdapretnar
Copy link
Collaborator

Ok, after some discussion with @lanzagar, we decided we should try with the following:

  • the output is always a selection
  • to output everything, the user must use Ctrl+A
  • if the user first selects some documents, then writes a filter, the intersection of the two is the selection (if a doc was selected before and is in the subset, it is still selected)
  • to output data for filter, write query then Ctrl+A
  • display remains unchanged

Potential issues could arise with backward compatibility. We should keep this in mind. Also we should store settings correctly.

I suggest we try this with a PR and then do a bit of testing to see how it works in practice. Is this ok?

@djukicn
Copy link
Collaborator

djukicn commented May 15, 2020

Sounds good.

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

Successfully merging a pull request may close this issue.

4 participants