Bug 487093 - You can too easily clear the search history
Summary: You can too easily clear the search history
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Search (show other bugs)
Version: 4.3   Edit
Hardware: All All
: P5 normal (vote)
Target Milestone: 4.19 M2   Edit
Assignee: Robert Roth CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday, helpwanted
Depends on:
Blocks:
 
Reported: 2016-02-03 06:06 EST by Jan de Ruiter CLA
Modified: 2021-02-01 11:27 EST (History)
4 users (show)

See Also:
daniel_megert: review-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan de Ruiter CLA 2016-02-03 06:06:34 EST
If you click the downarrow on the "show previous searches" option, a list of all previous searches is shown below the cursor, and then you can easily choose any of the previous searches. 
Or you can show the history in a separate window or you can choose "Clear History". So far so good.
But if the list of searches is long, and the clickpoint is near the bottom of the screen, the described list is shown upwards, but NOT above the cursor, but with the cursor positioned on the last choice: "Clear History". If you happen to release the mouse button then and there, you have selected Clear History, and all your previous searches are unintentionally erased. 
This has happened to me on more than one occasion. Very annoying.
I suggest showing the list ABOVE the cursor in this case so this mistake cannot be made any more.
Comment 1 Dani Megert CLA 2016-02-03 08:41:52 EST
(In reply to Jan de Ruiter from comment #0)
> If you click the downarrow on the "show previous searches" option, a list of
> all previous searches is shown below the cursor, and then you can easily
> choose any of the previous searches. 
> Or you can show the history in a separate window or you can choose "Clear
> History". So far so good.
> But if the list of searches is long, and the clickpoint is near the bottom
> of the screen, the described list is shown upwards, but NOT above the
> cursor, but with the cursor positioned on the last choice: "Clear History".
> If you happen to release the mouse button then and there, you have selected
> Clear History, and all your previous searches are unintentionally erased. 
> This has happened to me on more than one occasion. Very annoying.
> I suggest showing the list ABOVE the cursor in this case so this mistake
> cannot be made any more.

The OS handles this, i.e. where/how to place the menu if it doesn't fit.
Comment 2 Jan de Ruiter CLA 2016-02-03 09:27:15 EST
>The OS handles this, i.e. where/how to place the menu if it doesn't fit.
So it is either completely below the cursor, or above the cursor with the cursor on the last entry, which is not controlled by eclipse? Then a solution would be to exchange the last two entries. Then the worst that can happen is an unintentional showing of the complete list in a separate popup.
Comment 3 Dani Megert CLA 2016-02-03 09:54:34 EST
(In reply to Jan de Ruiter from comment #2)
> Then a solution would be to exchange the last two entries.

No, that's not a good solution for 80% of the users. We could show a warning dialog before clearing (one with 'never ask again').
Comment 4 Jan de Ruiter CLA 2016-02-03 10:06:03 EST
(In reply to Dani Megert from comment #3)
> (In reply to Jan de Ruiter from comment #2)
> > Then a solution would be to exchange the last two entries.
> 
> No, that's not a good solution for 80% of the users. We could show a warning
> dialog before clearing (one with 'never ask again').

Sounds OK to me.
Comment 5 Eclipse Genie CLA 2016-04-16 21:21:10 EDT
New Gerrit change created: https://git.eclipse.org/r/70820
Comment 6 Dani Megert CLA 2017-05-10 04:38:01 EDT
Sorry, this slipped through the crack.
Comment 7 Jan de Ruiter CLA 2017-05-10 16:48:09 EDT
The new Gerrit change https://git.eclipse.org/r/#/c/70820/ reports 'cannot merge'. So what happened to the change? Did it get incorporated into the master? It seems to me that it didn't. And what did the code review verify?
Comment 8 Dani Megert CLA 2017-05-11 06:59:54 EDT
(In reply to Jan de Ruiter from comment #7)
> The new Gerrit change https://git.eclipse.org/r/#/c/70820/ reports 'cannot
> merge'. So what happened to the change? 

See the status at the top left:
Change 70820 - Needs Code-Review Label


> master? It seems to me that it didn't. And what did the code review verify?

This looks like a a hiccup on Hudson - it should only verify. As you can see the build is marked Unstable. Simply retrigger it again.
Comment 9 Jan de Ruiter CLA 2017-05-11 07:42:18 EDT
>Simply retrigger it again.
I have no idea how to achieve that. Sorry.
Comment 10 Dani Megert CLA 2017-05-11 07:45:18 EDT
(In reply to Jan de Ruiter from comment #9)
> >Simply retrigger it again.
> I have no idea how to achieve that. Sorry.

I've rebased the change.
Comment 11 Jan de Ruiter CLA 2017-05-11 07:58:28 EDT
(In reply to Dani Megert from comment #10)
> (In reply to Jan de Ruiter from comment #9)
> > >Simply retrigger it again.
> > I have no idea how to achieve that. Sorry.
> 
> I've rebased the change.

Thanks. All it needs now is a code review.
Comment 12 Dani Megert CLA 2017-07-30 16:06:45 EDT
Robert, sorry for the delay. I've reviewed it now.
Comment 13 Dani Megert CLA 2017-08-21 05:20:49 EDT
(In reply to Dani Megert from comment #12)
> Robert, sorry for the delay. I've reviewed it now.

Robert, it's in your bucket now.
Comment 14 Dirk Gutsche CLA 2020-05-19 08:11:59 EDT
This still happens in 2019-09 (haven't tried 2020-03 yet) and is very annoying. Any chance to have that fix in the next release?
Comment 15 Robert Roth CLA 2021-01-20 04:03:21 EST
I have updated the changeset with the changes requested by the reviewer, but rebase doesn't work, so I don't really know how to fix it. Probably the easiest way would be to recreate the changeset based on current master, and abandon the old one (which I forgot about, so only realized it exists when the Abandoned message came earlier today).
Comment 16 Robert Roth CLA 2021-01-20 05:33:08 EST
Patchset updated based on latest master according to Dani Megert's request not using a preference anymore, using the "Do not show this &message again" text, as requested, also updated the default checkbox value (as Do not show this checkbox is exactly the opposite of Always show this confirmation, as in the initial request). Hopefully I will not miss the notification next time.
Comment 17 Mickael Istria CLA 2021-02-01 07:54:15 EST
Thank you Jan for reporting and Robert for fixing!
Comment 19 Jan de Ruiter CLA 2021-02-01 11:27:07 EST
So it got fixed finally after 5 years. Congratulations to everybody involved.