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

Features for consideration #2

Closed
mzso opened this issue Apr 25, 2021 · 24 comments
Closed

Features for consideration #2

mzso opened this issue Apr 25, 2021 · 24 comments

Comments

@mzso
Copy link

mzso commented Apr 25, 2021

Hi!

Just took a look at this addon. Good stuff. Not sure if you're looking to develop it further, or interested in suggestion, but I think these might be worthy features (hopefully neither are really complicated):

  • Hide titlebar: I think the the input field with the "search..." text is amply clear.
  • Search both title and urls: I was kind of expecting to happen this way, but then I realized only title is searched. It's often more practical to search for urls
  • search while typing: I can't see why not. You could see the results as you type, somewhat more efficient in my opinion.
  • Don't show parents. I don't find the parents useful to be honest. It feels like just more noise for my brain to work through.
@NiklasGollenstede
Copy link
Owner

Thanks for your feedback! Not sure yet how much time I can expend on this. I should do other stuff right now 🙃

Let's see:

  • "Hide titlebar": Yeah. I agree, but it's also not quite that simple. I added this "Advanced" option: Hides the header above the search, that says something like "${manifest.name}".<br>NOTE: That header is not part of this extension, but of TST itself, and from a UX perspective, should absolutely be there (by default). It may (in the future?) also be used to switch sub panels or do any number of other things. Please DO NOT raise issues about anything loke that with TST while this option is active!. That should say it all ^^
  • "Search both title and urls": Jepp jepp. It now searches title and url by default. And then I got carried away a bit. There now is an option to search whatever tab property you want. (Not including the tab's content, though.)
  • "search while typing": Not quite that easy: Currently, when you hit enter (or click one of the buttons), the info for all tabs in that window is fetched, the match/miss states are assigned based on the search, and TST is told to apply those states, which then changes how they are displayed in the sidebar.
    Doing that for an arbitrarily high number of tabs per window on every keystroke seems a bit too much.
    It is possible to find ways to do this more efficiently (e.g. only fetch the tabs when ...), but that's not that simple a design decision.
    I may or may not implement something in this direction at some point.
  • "Don't show parents": Simple enough. Added option Highlight Results > With Matching Children > Hide Completely.

I think I addressed your points, so I will close this. Feel free to comment further!

@mzso
Copy link
Author

mzso commented Apr 30, 2021

@NiklasGollenstede commented on 2021. ápr. 26. 17:48 CEST:

Thanks for your feedback! Not sure yet how much time I can expend on this. I should do other stuff right now 🙃

Let's see:

  • "Hide titlebar": Yeah. I agree, but it's also not quite that simple. I added this "Advanced" option: Hides the header above the search, that says something like "${manifest.name}".<br>NOTE: That header is not part of this extension, but of TST itself, and from a UX perspective, should absolutely be there (by default). It may (in the future?) also be used to switch sub panels or do any number of other things. Please DO NOT raise issues about anything loke that with TST while this option is active!. That should say it all ^^
  • "Search both title and urls": Jepp jepp. It now searches title and url by default. And then I got carried away a bit. There now is an option to search whatever tab property you want. (Not including the tab's content, though.)
  • "search while typing": Not quite that easy: Currently, when you hit enter (or click one of the buttons), the info for all tabs in that window is fetched, the match/miss states are assigned based on the search, and TST is told to apply those states, which then changes how they are displayed in the sidebar.
    Doing that for an arbitrarily high number of tabs per window on every keystroke seems a bit too much.
    It is possible to find ways to do this more efficiently (e.g. only fetch the tabs when ...), but that's not that simple a design decision.
    I may or may not implement something in this direction at some point.
  • "Don't show parents": Simple enough. Added option Highlight Results > With Matching Children > Hide Completely.

I think I addressed your points, so I will close this. Feel free to comment further!

Thanks. I guess the the lack of search-while-typing is understandable if it would cause performance issues. Though it would be less annoying with a button to empty the input field and reset to default state.
The way it is now, I have to click back to the search field, manually erase text, then search again with an empty search field.

@NiklasGollenstede
Copy link
Owner

I actually implemented both search while typing and a clear button just now in c16b144.
With some caching, the performance seems ok.
Clearing was possible before by pressing Esc, but now there is a button as well (which can be removed).

@mzso
Copy link
Author

mzso commented May 2, 2021

@NiklasGollenstede commented on 2021. máj. 2. 21:21 CEST:

I actually implemented both search while typing and a clear button just now in c16b144.
With some caching, the performance seems ok.
Clearing was possible before by pressing Esc, but now there is a button as well (which can be removed).

Ah, cool. Thanks!
Didn't think of ESC. Which does work, even when the input field is empty and erroneously tabs are hidden.

@mzso
Copy link
Author

mzso commented May 2, 2021

@NiklasGollenstede commented on 2021. máj. 2. 21:21 CEST:

I actually implemented both search while typing and a clear button just now in c16b144.
With some caching, the performance seems ok.
Clearing was possible before by pressing Esc, but now there is a button as well (which can be removed).

I tried b17. And I got an error while typing:
kép

I didn't find an option for search while typing. Does it mean it superseded the old method?

@NiklasGollenstede
Copy link
Owner

Ah, sorry, didn't realize: I made a backwards-incompatible change to the option "Tab Property Prefixes".
So if that wasn't in it's default state, it (apparently) fails. Double clicking the [reset] next to "Tab Property Prefixes" should fix that.

And yes, the search-as-you-type replaces the previous mechanism. I am not sure whether and how I will re-introduce the old mode as an option.

@mzso
Copy link
Author

mzso commented May 5, 2021

@NiklasGollenstede commented on 2021. máj. 3. 02:10 CEST:

Ah, sorry, didn't realize: I made a backwards-incompatible change to the option "Tab Property Prefixes".
So if that wasn't in it's default state, it (apparently) fails. Double clicking the [reset] next to "Tab Property Prefixes" should fix that.

And yes, the search-as-you-type replaces the previous mechanism. I am not sure whether and how I will re-introduce the old mode as an option.

Still doesn't work if I click reset. And then re-register
Also, I'm quite sure I didn't touch that setting.

@mzso
Copy link
Author

mzso commented May 5, 2021

@NiklasGollenstede commented on 2021. máj. 3. 02:10 CEST:

Ah, sorry, didn't realize: I made a backwards-incompatible change to the option "Tab Property Prefixes".
So if that wasn't in it's default state, it (apparently) fails. Double clicking the [reset] next to "Tab Property Prefixes" should fix that.

And yes, the search-as-you-type replaces the previous mechanism. I am not sure whether and how I will re-introduce the old mode as an option.

I tried resetting every option that popped up removed/reinstalled TST search (also updated), updated TST.
It still remains non-functional. With the same error.

@NiklasGollenstede
Copy link
Owner

I just checked and documented quite al lot of code (c24773f), where I included a minor change that should silently ignore the invalid state of the setting.

But either resetting the option or uninstalling the extension (which AFAIK deletes all its saved data) and reinstalling should have fixed the issue. Is the error message you get still the same as in the screenshot above?

@mzso
Copy link
Author

mzso commented May 8, 2021

@NiklasGollenstede commented on 2021. máj. 7. 03:01 CEST:

I just checked and documented quite al lot of code (c24773f), where I included a minor change that should silently ignore the invalid state of the setting.

But either resetting the option or uninstalling the extension (which AFAIK deletes all its saved data) and reinstalling should have fixed the issue. Is the error message you get still the same as in the screenshot above?

I updated TST (also had a new update) and TST search both again. Now it works. Thanks!

I had the same error message by the way. Not sure the resetting even succeeded, because there no feedback of success or even if the click was registered. And anyway I never touched the prefix options, it wasn't a feature that intrigued me. I once tried filtering for tabs that produce sound based on description in the options.

@silverwings15
Copy link

thanks for the great suggestions that made this addon go from good to amazing. the only addition now that i can think of would be to add an option to set a hotkey/shortcut that automatically focuses the search bar

@NiklasGollenstede
Copy link
Owner

There actually is/was this in the readme:

Currently Impossible Features:

But I also really wanted to be able to search (and based on that switch to) tabs without using the mouse.
The best workaround I could find uses the browserAction. This is the new function/setting I added:

Browser global hotkey to focus the the search bar.
NOTE: Firefox currently does not allow extensions to focus (elements in) their sidebars (see Firefox bug 1502713). So for now, this extension instead opens a small panel at the top of the window with a copy of the search bar. Since Esc keypress is also unavailable while a panel is open, pressing this hotkey clears the search, when pressed while the panel has focus.
default: 'Ctrl + Shift + F'

It's not perfect, but I think as close as it gets before Mozilla addresses the missing functionality in Firefox.

The only thing I would like to add is to update the text in the sidebar search box in sync with the one in the popup, but that will have to wait for piroor/treestyletab#2899 (or some version thereof).

@silverwings15
Copy link

works beautifully, thank you very much. this does seem like the absolute best possible compromise given the current API limitation

@mzso
Copy link
Author

mzso commented May 23, 2021

My one remaining nuisance is that there's no convenient way to exit search mode when you want to find a tab, you find it, select it.
But then you have to use the x butoon or click back the focus to the search field, because when you select the tab it looses it, so escape won't work anymore.
Any reason binding to ESC shouldn't/couldn't be retained while search/filtering is active?

@NiklasGollenstede
Copy link
Owner

NiklasGollenstede commented May 23, 2021 via email

@NiklasGollenstede
Copy link
Owner

Just FYI (and this is the last I intend to comment or implement on this: You can now (moderately quickly) double tab Ctrl+Shift+F (or whatever you customized that to) to clear the search and close the search popup (which will briefly open).
Do basically, if you double press Ctrl+Shift+F fast enough, you won't need to hit Esc afterwards.

@silverwings15
Copy link

yes, it is an absolutely stellar 'workaround'. thank you again for your wonderful extension

@mzso
Copy link
Author

mzso commented Jun 13, 2021

@NiklasGollenstede commented on 2021. jún. 12. 22:18 CEST:

Just FYI (and this is the last I intend to comment or implement on this: You can now (moderately quickly) double tab Ctrl+Shift+F (or whatever you customized that to) to clear the search and close the search popup (which will briefly open).
Do basically, if you double press Ctrl+Shift+F fast enough, you won't need to hit Esc afterwards.

To be honest, nothing I set as hotkey works here. The default had conflicts, disabling them didn't help. Tried setting other hotkeys like ctrl+shfit+F2 via the addon config or firefox's hotkey config, which also didn't work. (88.0b9)

@silverwings15
Copy link

i'm using Ctrl + Alt + F myself, but i tried Ctrl + Shift + F2 and that works too

image

@mzso
Copy link
Author

mzso commented Jun 13, 2021

@mimecry commented on 2021. jún. 13. 10:48 CEST:

i'm using Ctrl + Alt + F myself, but i tried Ctrl + Shift + F2 and that works too

Which browser version?

@silverwings15
Copy link

FF 89.0, Win 10

@NiklasGollenstede
Copy link
Owner

The one situation that I am aware of that can break this (and maybe should add some sort of detection for I and show a notification when it happens) is when you remove the TST Tab Search icon from the UI. The panel is attached to the icon, and without it, there is no panel (Firefox restriction). Currently, it can also only be in the overflow menu if it is the only item there (Firefox bug).

If that is not the issue, then it would be good to know whether the keypress is being reported to the extension at all. To find that out, enable logging and look at the logs:

  1. Go to about:debugging#/runtime/this-firefox, look for TST Tab Search, click Inspect.
  2. Go to the "Console" sub-tab, and ensure that the -ish looking icon at the top right is not blue. If it is, click it and select the path ending in /_background.html.
  3. In the console at the bottom, paste options.debug.value = 2, Enter. Should it not let you paste, then read, understand and then follow the instructions first.
  4. (More) log messages will now show in the open console. Unfortunately, Firefox mangles some unrelated messages in there. Each message shows the script it was emitted from at the right. Hovering that shows the full URL. Messages from this extension start with the same *-extension://<random numbers and letters>/ that is displayed above the log window. Other messages are likely unrelated.

In this case, you should see TST: onCommand globalFocusKey right after pressing the hotkey. If it does not, and the extension otherwise works, then there is very most likely something wrong/conflicting with (your choice of the) hotkey(s) on/in your system/Firefox.

@mzso
Copy link
Author

mzso commented Jun 14, 2021

@NiklasGollenstede
Is that icon even present by default? I don't remember every seeing it. If it is I probably removed it immediately, because I don't really have an interest in an extra icon. I just wanted the search field.

@NiklasGollenstede
Copy link
Owner

The icon was there in the very first version, but didn't do anything, so I removed it until giving it a function a month ago in a4ff304.
You may have removed it when it didn't do anything, otherwise, it would be there by default.

Well, I guess we know why it didn't work for you. For this to work, the extension's icon has to be in the browser navigation bar. There is no way to avoid that (well, not sure what happens if you hide the icon via userChrome.css ...).

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

No branches or pull requests

3 participants