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

Find Dialog: display "(Filtered!)" in the status bar #14307

Closed
Yaron10 opened this issue Nov 3, 2023 · 39 comments
Closed

Find Dialog: display "(Filtered!)" in the status bar #14307

Yaron10 opened this issue Nov 3, 2023 · 39 comments
Assignees
Labels

Comments

@Yaron10
Copy link

Yaron10 commented Nov 3, 2023

Quite often users are bewildered after executing a search and seeing the result(s).
A recent example.

Suggestion:
Display the range & conditions in the Find Dialog status bar.


Notepad++ v8.5.8.

@Yaron10
Copy link
Author

Yaron10 commented Nov 3, 2023

  1. The user can see if Case (etc.) is ON. No need re-specify the range & conditions.
  2. The space in the status bar is limited.

How about adding (Filtered!) if Case/Word are ON or "Wrap around" is OFF?
- This might prevent some common confusions.

@Yaron10 Yaron10 changed the title Find Dialog: display range & conditions Find Dialog: display "(Filtered!)" in the status bar Nov 3, 2023
@donho donho self-assigned this Nov 11, 2023
@donho donho added the accepted label Nov 11, 2023
@donho
Copy link
Member

donho commented Nov 11, 2023

@Yaron10
Good suggestion - with the countless time that I see such bug report.

OTOH, (almost) all the false alerts with such bug report are due to unchecked Wrap around. I think it's enough that we give extra warning Find: "Can't find the text xxx: turn ON Wrap around maybe?" only in case that Wrap around is not checked. What do you think?

@alankilborn
Copy link
Contributor

"whole word" is also often a problem.

@donho
Copy link
Member

donho commented Nov 11, 2023

Implemented in #14347

@alankilborn
Copy link
Contributor

"Wrap around" has been a checkbox in Windows' notepad.exe Find window for over 30 years -- users should know how it works by now. It provides no additional help to the user that is too dumb to learn how to use it. Just saying that no software can help the truly dumb.

@donho
Copy link
Member

donho commented Nov 11, 2023

"whole word" is also often a problem.

@alankilborn Could you provide the concerning issues please?

@alankilborn
Copy link
Contributor

I mean, support is often needed because "find is broken" because it won't find a user's match, and user has previously (from some earlier search) checkmarked Match whole word only. So maybe they are searching for bc and they say "it is right there!" and the text they show in the editor is abcd.

@Yaron10
Copy link
Author

Yaron10 commented Nov 11, 2023

@donho,

Thank you for #14347. 👍


It's true that "Wrap around" is the main cause of confusion.
But I've personally been confused by Case and Word as well. :)

  1. The message must be very short.
    If you get The text "It's true that "Wrap around" is the main cause of confusion." was not found., you might not see both messages.
  2. I'd suggest to display (Filtered!) (or [Filtered!]/ a better word) at the beginning.
  3. I'd display [Filtered!] even if there are matches. - It might still be helpful.

@alankilborn
Copy link
Contributor

IMO the problem posed by opening this issue can't be solved.
Users will just mentally move past anything that is displayed in the status bar and will complain that "find is broken". I don't think we can fix (with software) the PEBKAC made up of people that don't pay attention to what they've set in the searching UI.

@Yaron10
Copy link
Author

Yaron10 commented Nov 11, 2023

@alankilborn,

I don't expect it to solve ALL the confusions/issues. It should probably help in some cases.
But perhaps you're right. :)

@Yaron10
Copy link
Author

Yaron10 commented Nov 11, 2023

If Don decides to go ahead with the extra message.

I'd display [Filtered!] even if there are matches. - It might still be helpful.

That means displaying [Filtered!] on Count, Replace & Mark as well.

@alankilborn
Copy link
Contributor

Something like [Filtered!] is just going be an extra annoyance visually for those that already know how to search, IMO. Those that don't know how to search aren't going to understand it, and are going to create issues anyway.

The best solution might be a Community FAQ that users that post (or create an issue) of the "find is broken" variety are pointed to.

But...as you will.

@Yaron10
Copy link
Author

Yaron10 commented Nov 12, 2023

Something like [Filtered!] is just going be an extra annoyance visually for those that already know how to search, IMO.

Personally I'd like to have it. But I see your point.

If we put Case & Word aside, the following approach might be another option:

Search: 0 matches - in entire doc / from... to

It IS somewhat related.
I'm wondering again why "Wrap around" should affect "Mark All" and not other commands.

@alankilborn
Copy link
Contributor

alankilborn commented Nov 12, 2023

I'm wondering again why "Wrap around" should affect "Mark All" and not other commands.

??
Wrap around affects any single-file operation with the exception of FAiCD.

@donho
Copy link
Member

donho commented Nov 12, 2023

@alankilborn

The best solution might be a Community FAQ that users that post (or create an issue) of the "find is broken" variety are pointed to.

Well, if PEBCAK read FAQ, they won't be PEBCAK. BTW, I prefer to use PEBCAK instead of "dumb" :)

@donho
Copy link
Member

donho commented Nov 12, 2023

Just updated PR #14347:

image

@Yaron10
Copy link
Author

Yaron10 commented Nov 12, 2023

@donho,

The tooltip is nice and clever! Certainly better than [Filtered].
If @alankilborn had not "pushed" me yesterday, I would have thought it was excellent.
But he did. :)

Hello
World

Find what: Hello.
Word, Case & Wrap around: OFF.
Place the caret in World.

Let's try the commands that are affected by "Wrap around" and display info in the status bar.

Find next: Can't find the text "Hello"; red color; beep; flash; tooltip.
Count: 0 matches from... to...
Replace: No occurrence was found; red color; beep; flash.
Replace All: 0 occurrences were replaced from... to...
Mark All: 0 matches from... to...

I understand the beep and flash on "Find next" as it can be used when the Find dialog is closed.
But the other inconsistencies require some thinking.


@alankilborn,

Wrap around affects any single-file operation with the exception of FAiCD.

I still don't understand it. :)

@alankilborn
Copy link
Contributor

I'm wondering again why "Wrap around" should affect "Mark All" and not other commands.

Wrap around affects any single-file operation with the exception of FAiCD.

I still don't understand it. :)

But, with the exception of FAiCD, you DO understand how Wrap around affects every other search command (that operates on a single file), correct?

@alankilborn
Copy link
Contributor

@donho

The tooltip is a fabulous presentation for this issue's problem!
Well done, and hat's off to you!

Minor issue: Users don't tend to know that you have to hover over the little speech balloon in order to see the tip. I don't know what could possibly solve that for the dumb PEBKAC users.

@Yaron10
Copy link
Author

Yaron10 commented Nov 12, 2023

@alankilborn,

But, with the exception of FAiCD, you DO understand how Wrap around affects every other search command (that operates on a single file), correct?

I do understand that. :)
And my comment was off-topic.

@alankilborn
Copy link
Contributor

alankilborn commented Nov 12, 2023

Find next: Can't find the text "Hello"; red color; beep; flash; tooltip.
Count: 0 matches from... to...
Replace: No occurrence was found; red color; beep; flash.
Replace All: 0 occurrences were replaced from... to...
Mark All: 0 matches from... to...
I understand the beep and flash on "Find next" as it can be used when the Find dialog is closed.
But the other inconsistencies require some thinking.

Related, try this from the Replace tab:

  • find what [abc
  • search mode Reg Expression

Press Find Next --> status bar says Find: invalid regular expression and has the speech bubble icon (this is correct behavior)

Press Replace --> status bar says Replace: no occurrence was found Shouldn't this case also indicate "invalid regular expression"?

Similar for Find in Files; this expression will result in nothing on the Find dialog status bar and will put the following into Search results window: Search "[abc" (0 hits in 0 files of 71 searched); it seems like this case should also indicate "invalid regular expression"

Etc. for other types of search commands...

@alankilborn
Copy link
Contributor

The tooltip is nice and clever! Certainly better than [Filtered]. If alankilborn had not "pushed" me yesterday, I would have thought it was excellent. But he did. :)

Sometimes even a rope can be pushed? :-)

@Yaron10
Copy link
Author

Yaron10 commented Nov 12, 2023

@alankilborn,

Press Replace --> status bar says Replace: no occurrence was found

I hardly use RegEx.
Could you please provide the exact STR?

and will put the following into Search results window:

And this belongs to #14306, doesn't it? :)

@alankilborn
Copy link
Contributor

I hardly use RegEx. Could you please provide the exact STR?

Exact STR were given, in #14307 (comment) , starting from "try this from the Replace tab"; nothing is missing as far as I see.


and will put the following into Search results window:

And this belongs to #14306, doesn't it? :)

Not really. 14306 deals with a way to see what parameters a search was run with, not an "invalid regex" speech bubble, or inconsistencies...

My point here was that if you're going to have a speech bubble for error/warning messages, it should be consistent whenever such a bogus find is initiated. Which I thought was the point you were making with your "let's try the commands..." here: #14307 (comment) and the "other inconsistencies".

However, my regex inconsistency is at lease 51% off-topic and maybe more :-) so it probably deserves its own issue (but if memory [which is getting worse every day] serves, there already IS such an issue that is open).

@Yaron10
Copy link
Author

Yaron10 commented Nov 12, 2023

@alankilborn,

Press Replace --> status bar says Replace: no occurrence was found

תמונה


My point here was that if you're going to have a speech bubble for error/warning messages, it should be consistent whenever such a bogus find is initiated.

I agree.
I was referring to the "and will put the following into Search results window:" part.

@alankilborn
Copy link
Contributor

alankilborn commented Nov 12, 2023

I was referring to the "and will put the following into Search results window:" part.

You want exact STR for that part of it? The Find in Files that writes into Search results?
Just do any Find in Files where you set up Find what as described and checkmark the Search mode radio button for Regular expression (also as described previously). Any other set up you use (e.g. Directory, etc) doesn't matter (but of course needs to be a valid directory on your system. Then press Find All.
Really, I wasn't going to use up all of my spare time today typing up such details.
AND on an admittedly off-topic thing that I was just using to counterpoint a seemingly off-topic point you made. :-)


Oh, maybe I see now that you don't get what I got... you do get the Invalid Regular Expression message, for Replace? OK, I'll have to check my result again when I get back to my PC.

@alankilborn
Copy link
Contributor

@Yaron10 I must offer grave apologies. I do get the "Invalid Regular Expression" message when I initiate any type of search. At least today I do. Yesterday, when I was trying it, I didn't always get it, but I have no explanation as to why.

Yesterday when I tried with Find All... it would proceed to the search step, because I copied Search "[abc" (0 hits in 0 files of 71 searched) right from the Search results window, in order to paste here.

But... let's definitely call this too far off-topic.


As long as the new tooltip (from this issue) appears at appropriate times, I'd say things are good.

@Yaron10
Copy link
Author

Yaron10 commented Nov 13, 2023

@alankilborn,

No need to apologize. :)


@donho & @alankilborn,

If we concentrate only on "Wrap around" in "Find Next/Prev"...
As clever as the tooltip is, I think that the explicit from... to... would be better.

Find: 0 matches - in entire doc / from... to

AFAICT, all the PEBCAK concerning this issue is only on "Find Next" (please provide any link if I'm wrong).

  1. This is where we don't have from... to.... :)
  2. Why not use the explicit form in the most confusing command?

@donho
Copy link
Member

donho commented Nov 14, 2023

@Yaron10 @alankilborn
Thank you for your review & test.

I'm really glad that you like my solution - that changes a little bit the situation that we disagree with each others :)
Just updated PR #14347 as requested. You can check it if you want.

Wrap around affects any single-file operation with the exception of FAiCD.

I was guessing what it is FAiCD meaning, and found it in on Internet :)
https://www.acronymfinder.com/Fellow-of-the-Australian-Institute-of-Company-Directors-(FAICD).html

Minor issue: Users don't tend to know that you have to hover over the little speech balloon in order to see the tip. I don't know what could possibly solve that for the dumb PEBKAC users.

:D
Then let's hope such users stop using Notepad++ because they don't even know to hover the mouse on it - I would call that the natural selection :)

If we concentrate only on "Wrap around" in "Find Next/Prev"...
As clever as the tooltip is, I think that the explicit from... to... would be better.

Added into PR #14347 as well.

@alankilborn
Copy link
Contributor

I was guessing what it is FAiCD meaning, and found it in on Internet :)

I get really tired of typing Find All in Current Document constantly, thus "FAiCD" or sometimes the simpler "FACD". :-)


Users don't tend to know that you have to hover over the little speech balloon in order to see the tip.

Then let's hope such users stop using Notepad++ because they don't even know to hover the mouse on it

Oh, no...we don't want users to stop using the product! (I know you were just joking)

A real user that was having trouble with "regex complexity error" had no idea to hover on that speech icon. He showed a screenshot of the Find window he was using, and I told him to hover on the speech icon and get the balloon tip popup speech bubble. He said "Ah...I HAD clicked on that and nothing happened -- I had no idea that you had to hover to see it!".

I don't know what could possibly solve that for the PEBKAC users.

Hmm, would it be possible to shorten the hover time needed for the balloon tip to appear (admittedly, it is already short...but not instant), OR make it so if the speech icon is actually clicked, the hover tip appears?

@Yaron10
Copy link
Author

Yaron10 commented Nov 14, 2023

@donho,

I'm really glad that you like my solution...

It's not the first time. :)
Thanks again for your work. 👍

1. Is there a reason to quote the search term (only) on Find Next/Prev?
תמונה

2.
Scope in the following case?
תמונה

@alankilborn
Copy link
Contributor

Is there a reason to quote the search term (only) on Find Next/Prev?

It's a "nicety" (to be very explicit) but indeed it is a problem when it is very long!

@Yaron10
Copy link
Author

Yaron10 commented Nov 14, 2023

In other commands you display 0 matches from... to....

@alankilborn
Copy link
Contributor

It's a "nicety" (to be very explicit) but indeed it is a problem when it is very long!

I thought the complaint was relating to very long text, but it was something else. :-(

On the subject of very long text, how about dropping the quoting of the search term entirely? That is, go with a generic "search term not found"...

@Yaron10
Copy link
Author

Yaron10 commented Nov 14, 2023

Yes, the "complaint" was that you might not see the scope and tooltip.

That is, go with a generic "search term not found"...

Or 0 matches to have some consistency. :)

@alankilborn
Copy link
Contributor

Yes, 0 matches makes sense, even without considering the consistency factor. :-)

@donho
Copy link
Member

donho commented Nov 14, 2023

@alankilborn

It's a "nicety" (to be very explicit) but indeed it is a problem when it is very long!

True! It'll be fixed.

@Yaron10

Is there a reason to quote the search term (only) on Find Next/Prev?

There must be a reason, but just I don't remember :)
The reason should be - that's the one of the most used features, and in case of occurrence not being found, it's nice to confirm the string with which the search failed.

Scope in the following case?

The scope is displayed generally in the search failed case.

I appreciate you guys' effort concerning the inconsistency in the application.
But let's focus on user's complains - except the embarrassing issue (like too long string on status bar), while there's no complain from user, there's no issue to me.

@donho donho closed this as completed in 05f339b Nov 14, 2023
@Phaje27
Copy link

Phaje27 commented Dec 7, 2023

Hi, I'm new to the community - I know this issue is closed but can I still comment here? Will anybody see it? If I should post it somewhere else please direct me - Thanks.

I've been employed as a programmer since 1985 but my whole attitude to PEBKAC changed when I read "About Face" by Alan Cooper (the guy who invented Visual Basic) in 1997. His mantra is that the programmer's job is to enable the user to achieve their goal in as unobtrusive a manner as possible. And with no disrespect to anybody here, he says deeming anything insurmountable because the user is too dumb is just a factor of how much effort you're willing to put in.

Every one of the chosen options can be described in the status bar, e.g.

Find: Can't find the text "dog"
Find: Can't find the text "dog" backwards
Find: Can't find the whole word "dog"
Find: Can't find the exact-case text "dog"
Find: Can't find the text "dog" forwards
Find: Can't find the text "dog" in selection
Find: Can't find the extended text "dog\n"
Find: Can't find the regular expression "d.g"

Quite clearly any or all of these can be combined based on the options chosen, e.g.

Find: Can't find the exact-case regular expression "d.g" forwards in selection

This only leaves the issue of a very long search term. IMO the search term is the least important information in the message and may be trimmed if necessary with the very familiar ellipsis, e.g.

Find: Can't find the exact-case regular expression "I am searching for a very long str…" forwards in selection

As is common, hovering over a trimmed search term could overlay a tooltip with the untrimmed search term included.

@alankilborn
Copy link
Contributor

I'm new to the community

Welcome.

I know this issue is closed but can I still comment here?

Yes.

Will anybody see it?

Anyone involved in the prior conversation, or anyone subscribed to all activity, indeed will see it.


Thanks for your thoughts.

In general, I feel that if I see Find: Can't find the text "foo", then I know that, with the options I had set before running the search, my variant of foo was not there. I don't need to be explicitly told in English text what my options were, I can still see them on the Find window.

Contrast this with #14306 where, because options are no longer present, it is impossible to know what options were in effect at the time the search was conducted.

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

Successfully merging a pull request may close this issue.

4 participants