grist-core icon indicating copy to clipboard operation
grist-core copied to clipboard

Useless filter activation

Open yohanboniface opened this issue 3 years ago • 6 comments

Hi,

If I click on "Filter Data" while the filter bar is on, and if I press Esc without selecting any value, a filter is still added, with all values selected:

Screencast from 2022-11-02 20-04-31.webm

Not a big deal, but I guess this is not a feature ;)

Yohan

yohanboniface avatar Nov 02 '22 19:11 yohanboniface

@paulfitz @dsagal

https://user-images.githubusercontent.com/11460746/218441451-d9641744-87b1-4976-aca0-21b97b1c98d5.mov

I succeed at making the filter button disappear, however there is still the change in the filter icon.

Here the observable which dictate the behavior of this icon: https://github.com/gristlabs/grist-core/blob/main/app/client/ui/ViewSectionMenu.ts#L49

Here the property https://github.com/gristlabs/grist-core/blob/main/app/client/models/entities/ViewSectionRec.ts#L435

I suspect the onClose function to save the filters even if there are no modifications. Do you have an idea to solve this issue ?

LouisDelbosc avatar Feb 13 '23 11:02 LouisDelbosc

Actually, let's confirm with @anaisconce first. Some of the automatic filter-pinning behaviors were intentional (to make filters more discoverable). You are probably right about Escape, but I'd like to check. As for implementation the best clue I can suggest is to look at the difference between pressing Escape and clicking Close.

dsagal avatar Feb 13 '23 13:02 dsagal

Actually, let's confirm with @anaisconce first. Some of the automatic filter-pinning behaviors were intentional (to make filters more discoverable). You are probably right about Escape, but I'd like to check. As for implementation the best clue I can suggest is to look at the difference between pressing Escape and clicking Close.

Thanks for your answer. The behavior with an escape is the same. I'll wait for @anaisconce suggestion so !

LouisDelbosc avatar Feb 13 '23 15:02 LouisDelbosc

ping @anaisconce :)

vviers avatar Jan 04 '24 11:01 vviers

Summarizing the thread for @anaisconce to save her some time.

Currently, if a user clicks on Filter Data and then immediately presses Esc without selecting any value, a filter that matches everything is added. This seems undesirable. Ok to change this behavior so that Esc does nothing, as if the user had not clicked on Filter Data at all?

paulfitz avatar Feb 08 '24 18:02 paulfitz

Yes, that is reasonable. Thanks Paul for the summary (and nudge!)

anaisconce avatar Feb 08 '24 19:02 anaisconce