-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add First/Last button to Search dialog #603
Add First/Last button to Search dialog #603
Conversation
The First/Last button finds the first occurrence of the string in the file if searching forwards, and the last occurrence if searching backwards. Note that searching backwards can be done by turning on "Reverse" checkbox. The currently selected value of "Reverse" is itself reversed if the First/Last button is Shift clicked, just like the Search button. So, if "Reverse" is off, click First/Last for the first match, shift-click it for last match. If "Reverse" is on, click First/Last for last match and shift-click it for first match. Since this behavior is identical to the Search button behavior, it should be intuitive to the user. If not, they don't need to use the Shift key and can just use the Reverse checkbox.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to work just fine.
Personal opinion, only: I honestly don't see a need for it. It's a one-button shortcut for home/end (cmd+up/down arrow) plus find again. I'm far from a minimalist, but I'd rather limit the clutter until we need something. So, it's something of a design philosophy, I guess. You've got users wanting it because they had it before, and it's always harder to take something away than it is to not implement it in the first place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After reading the forums I'll have to disagree with Sharon's review. It seems to be something the users want.
However, as implemented I find it confusing. Reading your explanation I understand how it works, but my 2¢ is it would be better simplified:
- Label the button "First"
- On click, it goes to the first match
- No shift-click binding
I could see that if Reverse is checked, going to Last instead could make sense. Is it possible to make the label on the button reactive to the state of the Reverse checkbox, such that if Reverse is checked, the label is Last, but otherwise it's First?
I'd be just as happy not doing that, and having a no-frills "First" button.
Part of my review was my personal opinion, and the main reason that I'm not in favor of it is that I just don't see a real need for it -- it adds clutter, and it's not really necessary. I've accepted that it will probably be implemented, and I hate to be the one voting against some things. My main concern is the "give a mouse a cookie" syndrome (aka "slippery slope"?). The more things like this that are implemented, the more will be requested, and the interface will be nickeled and dimed to death. That being said, @windymilla has certainly implemented a lot of things that I've asked for, as have you. |
Agree with @tangledhelix that it's unnecessarily complicated (though actually simpler to implement) with the Shift-to-reverse option. I'll put up another commit that removes that feature. |
1. Remove Shift-to-reverse feature. 2. Change text from "First" to "Last" if "Reverse" flag is set.
My latest commit does this, and removes the Shift-to-reverse complication. |
Never mind -- I thought I'd fetched the latest commit, but I hadn't. Looks good to me, although I'll admit that I'm really missing the shift-for-reverse, even just for the testing. That being said, this is not likely to be something I'll use, so, I'm happy with however you think it should be implemented. |
If a user says, "hey, I can shift-click on Search, why can't I do that on First/Last?" we can add it in a heartbeat |
The First/Last button finds the first occurrence of the string in the file if searching forwards, and the last occurrence if searching backwards.
Note that searching backwards can be done by turning on "Reverse" checkbox. The currently selected value of "Reverse" is itself reversed if the First/Last button is Shift clicked, just like the Search button.
So, if "Reverse" is off, click First/Last for the first match, shift-click it for last match. If "Reverse" is on, click First/Last for last match and shift-click it for first match.
Since this behavior is identical to the Search button behavior, it should be intuitive to the user. If not, they don't need to use the Shift key and can just use the Reverse checkbox.