Bug 76898 - It is not possible to reset the Standard Filter
Summary: It is not possible to reset the Standard Filter
Status: ASSIGNED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.0.2 rc
Hardware: Other All
: medium enhancement
Assignee: Martin van Zijl
URL:
Whiteboard: target:7.1.0
Keywords:
Depends on:
Blocks: Dialog AutoFilter
  Show dependency treegraph
 
Reported: 2014-04-01 11:07 UTC by narayanaras
Modified: 2020-06-03 17:46 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Demo of the reset button in my patch. (265.36 KB, image/gif)
2019-01-14 21:18 UTC, Martin van Zijl
Details
Demo of the "X" buttons in my patch. (298.11 KB, image/gif)
2019-01-14 21:18 UTC, Martin van Zijl
Details
Updated demo of Reset/Clear button. (1.21 MB, image/gif)
2020-05-24 21:30 UTC, Martin van Zijl
Details
Updated demo of "X" buttons. (1.12 MB, image/gif)
2020-05-26 20:29 UTC, Martin van Zijl
Details
Video demo of "remove" buttons for individual conditions. (1.06 MB, image/gif)
2020-05-28 19:54 UTC, Martin van Zijl
Details
Outstanding bug with individual "remove" buttons. (2.12 MB, image/gif)
2020-06-02 20:40 UTC, Martin van Zijl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description narayanaras 2014-04-01 11:07:59 UTC
Take any dataset and apply Autofilter to it. (Data > Filter > Autofilter).
Then click on any column head, and select "Standard Filter" option.

The Standard Filter GUI pops up.

Set any condition (does not matter what), and press OK.

Now re-open the standard filter GUI. 
How would you reset the filter?

Desired:
1. Provide a "Reset" button at bottom, which clears the entries.
2. Provide a X button against each row of filter, to delete it.
   (When all rows are deleted, the filter is effectively reset)
Comment 1 m.a.riosv 2014-04-01 20:09:59 UTC
Hi @narayanaras, thanks for reporting.

You are right, it is not too much obvious.

Go to the field of the first condition and select -non- at the top.

You can use the same way to delete from any particular condition the rest of condition.

Change the status to New, and the importance from normal to enhancement.
Comment 2 Martin van Zijl 2019-01-14 21:18:27 UTC
Created attachment 148318 [details]
Demo of the reset button in my patch.
Comment 3 Martin van Zijl 2019-01-14 21:18:59 UTC
Created attachment 148319 [details]
Demo of the "X" buttons in my patch.
Comment 4 Martin van Zijl 2019-01-14 21:20:58 UTC
I am working on this. Above I have attached a demo of the reset ("Clear") button and the "X" buttons in my patch.

I hope to check this with the design team later today.
Comment 5 Xisco Faulí 2019-05-23 14:45:13 UTC
Dear Martin van Zijl,
This bug has been in ASSIGNED status for more than 3 months without any
activity. Resetting it to NEW.
Please assigned it back to yourself if you're still working on this.
Comment 6 Martin van Zijl 2020-05-24 21:29:18 UTC
Apologies for the delay. I decided to break this into two patches:

1) For just the "Reset" button.
2) For the "X" buttons.

I just submitted the patch for the "Reset" (Clear) button.
Comment 7 Martin van Zijl 2020-05-24 21:30:38 UTC
Created attachment 161244 [details]
Updated demo of Reset/Clear button.
Comment 8 m.a.riosv 2020-05-25 07:14:55 UTC
Looks find Martin, thanks. Waiting for the patch for X buttons.
Comment 9 Martin van Zijl 2020-05-26 20:26:49 UTC
I also submitted also the for the "X" buttons. This is a WIP since there are still issues with it to fix.
Comment 10 Martin van Zijl 2020-05-26 20:28:52 UTC
(In reply to Martin van Zijl from comment #9)
> I also submitted also the for the "X" buttons. This is a WIP since there are
> still issues with it to fix.

I meant to say "I also submitted the patch for the "X" buttons". I can't see how to edit comments in Buzgilla - it's strange.
Comment 11 Martin van Zijl 2020-05-26 20:29:51 UTC
Created attachment 161311 [details]
Updated demo of "X" buttons.
Comment 12 Martin van Zijl 2020-05-26 20:50:35 UTC
UX Team -- please take a look at this enhancement. I have actually already coded this (almost complete), and you can see the video demos in the attachments. Let me know if you have any suggestions for changes, before I finalize it.
Comment 13 Heiko Tietze 2020-05-27 11:12:04 UTC
(In reply to Martin van Zijl from comment #12)
> UX Team -- please take a look at this enhancement.

Awesome! Nitpicking: the button looks a bit squeezed. If you use a standard image it might be better. Adding icon designers to get the right image.
Comment 14 Rizal Muttaqin 2020-05-27 11:20:50 UTC
(In reply to Heiko Tietze from comment #13)
> (In reply to Martin van Zijl from comment #12)
> > UX Team -- please take a look at this enhancement.
> 
> Awesome! Nitpicking: the button looks a bit squeezed. If you use a standard
> image it might be better. Adding icon designers to get the right image.

We can use sc_delete.png/sc_delete.svg for this button.

Anything, your work is brilliant Martin!!
Comment 15 Martin van Zijl 2020-05-28 19:53:40 UTC
(In reply to Rizal Muttaqin from comment #14)
> (In reply to Heiko Tietze from comment #13)
> > (In reply to Martin van Zijl from comment #12)
> > > UX Team -- please take a look at this enhancement.
> > 
> > Awesome! Nitpicking: the button looks a bit squeezed. If you use a standard
> > image it might be better. Adding icon designers to get the right image.
> 
> We can use sc_delete.png/sc_delete.svg for this button.
> 
> Anything, your work is brilliant Martin!!

Thanks for the tip. I will use "sc_delete.png" for the button instead of "x". I also added a tooltip that says "Remove". I've pushed the updated code to Gerrit, and I'll update the video demo shortly.
Comment 16 Martin van Zijl 2020-05-28 19:54:41 UTC
Created attachment 161384 [details]
Video demo of "remove" buttons for individual conditions.
Comment 17 Rizal Muttaqin 2020-05-28 23:53:52 UTC
(In reply to Martin van Zijl from comment #16)
> Created attachment 161384 [details]
> Video demo of "remove" buttons for individual conditions.

Coool!! Will happy to see this patch
Comment 18 Commit Notification 2020-06-01 08:26:17 UTC
Martin van Zijl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/1ee221ad65ff5e3a725e80777406ac7f94ff3a72

tdf#76898 add ability to reset standard filter

It will be available in 7.1.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 19 Martin van Zijl 2020-06-02 20:39:25 UTC
Patch for individual remove buttons is ready for review, but there is a minor outstanding bug I found. If you add a new row, but do not set the value field, then delete the previous row, the value field is suddenly filled. I will attach a demo.

Should it be fixed before merging?
Comment 20 Martin van Zijl 2020-06-02 20:40:40 UTC
Created attachment 161550 [details]
Outstanding bug with individual "remove" buttons.
Comment 21 Heiko Tietze 2020-06-03 07:28:42 UTC
(In reply to Martin van Zijl from comment #20)
> Created attachment 161550 [details]
> Outstanding bug with individual "remove" buttons.

What exactly is the issue?
Comment 22 Buovjaga 2020-06-03 17:31:29 UTC
I tested with the patch a bit and it seems to be working as intended. The filter functionality itself has some interesting bugs, which might throw testers off. I was confused by bug 53430 just now.
Comment 23 Martin van Zijl 2020-06-03 17:41:02 UTC
(In reply to Buovjaga from comment #22)
> I tested with the patch a bit and it seems to be working as intended. The
> filter functionality itself has some interesting bugs, which might throw
> testers off. I was confused by bug 53430 just now.

I also found an existing bug relating to scrolling, which I raised on the Ubuntu bug tracker: https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/1881811. I think it will happen on other OS's too.
Comment 24 Martin van Zijl 2020-06-03 17:46:20 UTC
(In reply to Heiko Tietze from comment #21)
> (In reply to Martin van Zijl from comment #20)
> > Created attachment 161550 [details]
> > Outstanding bug with individual "remove" buttons.
> 
> What exactly is the issue?

Issue is as follows. Say you have conditions:

    X = 1
OR  X = 2

You start to add a new condition...

AND X = 

But do not add a value on the right for this condition. Then you delete the second row (X = 2). The third row you started creating should be put in the second row now. Dialog should read:

    X = 1
AND X = 

But instead reads:

    X = 1
AND X = 0

Second row value on the right should be empty, but is zero (or another number). It is quite a minor issue, though.