mingo-app / mingo

Found a bug? have a FR ?
59 stars 3 forks source link

[FR] Pre-populate export query from current search, as if "Export documents" button has been clicked #576

Closed mrjoesm closed 1 year ago

mrjoesm commented 1 year ago

Is your feature request related to a problem? Please describe.

  1. Search for something in docs
  2. Click Export tab (1)
  3. Query from the original search isn't present
  4. Return to Documents tab, hit the Export documents button (2)
  5. App navigates to Export tab with the query pre-populated

Describe the solution you'd like

  1. Populate the Export query with what is present in the Document tab's query when selecting the Export tab

Describe alternatives you've considered

  1. Copying the query before navigating away, or hitting the Export documents button (but even though I know this is an option, I forget)

Additional context

1

tothradoslav commented 1 year ago

Thanks for this. Thinking about consequeces. Your suggestion would only be possible in case the export view has not been opened yet in the current tab. Mingo remebers the states of each view (those pills we call views) and imagine the following situation:

  1. first you search for some documents
  2. click on "export", the query is taken from the documents and prepopulated as requested
  3. you return to the documents and change the query
  4. now you want to return to your previous export, click the "export" but it gets reloaded with the new query - but this might be something you didn't want to happen

Also, if this would be the case with Export, the same behaviour should be avabilable for other views (such as schema) as well.

One solution could be, that the query would be taken and prepopulated only if this is the first time you open the Export in the current tab. Once you open it, a changed query in documents would not affect the Export you have been working on.

However, this might raise some UX issues, for some users this could be a weird "magic" behaviour they don't understand. "Why did it happen the first time and not any more??"

Please let me know what you think.

tothradoslav commented 1 year ago

Thinking of another option: in the Export view, add a button at the top "Use the filter from Documents" (filter means query, sort, skip, limit, project all together = the entire state of the Documents view).

Or let's just use the "Export documents" button (2) :)

mrjoesm commented 1 year ago

I wonder if long-term it should just be a single unified filter across all views in a given tab? That feels like cleaner ux to me

You could then open a new tab if you want to have a different query in export vs documents at the same time

I think a context per tab makes sense, but I understand what you're saying

tothradoslav commented 1 year ago

Your suggestion seemed a great suggestion until we went deeper and realized it's not the way to go. After having a discussion about this, we decided not to implement any of the above suggestions. The option to export the viewed docs is available using the icon and the dropdown by the "Submit" / "Refresh" button. So for now, we will keep this as is.

However, if you have futher ideas on this, please let us know. We'd like to make the UX better. The suggested ways seem to make more confusion then solution even though the idea / intention is great. So let's keep the discussion alive. It may need a much deeper change, but may result in better UX eventually.