Skip to content

Add path for folders results when searching #254

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

Merged
merged 3 commits into from
Sep 24, 2022
Merged

Add path for folders results when searching #254

merged 3 commits into from
Sep 24, 2022

Conversation

Morikko
Copy link
Contributor

@Morikko Morikko commented Sep 18, 2022

Related to #207

Context

For some "generic words", the search results are not very explicit whereas it would be if the parent folder or the full path could be visible.

Even with the option which makes the path visible when you hover the mouse on the result, I ended spending too much times waiting the hover section to appear.

As I mostly do folder searches, I would prefer a faster solution.

Feature

  • Add the folder path on the right of the folder search results with a lighter police
  • Change the style to restrict to fit the 100% width body and allow to ellipsis when too long
  • The path is always visible for now. But I can add an option in the search menu or in the extension preferences if necessary.

Examples

2022-09-18_15-44 search folder path ex1

2022-09-18_15-44 search folder path ex1 shrink mode

2022-09-18_15-44 search folder path ex3

@aaFn aaFn self-assigned this Sep 18, 2022
@aaFn aaFn added the enhancement New feature or request label Sep 18, 2022
@aaFn
Copy link
Owner

aaFn commented Sep 18, 2022

Hello @Morikko , nice ! Thanks for the work, and for the suggestion.

As I see some possible side-effects on the main table, I prefer to limit this to the results table. Also, this requires a few adaptations to work well with other themes where colors are not just white-ish and black-ish ..

=> Can you give me push access on https://github.com/Morikko/Bookmark-search-plus-2/tree/search-folders-add-path so that I can place there slightly adapted versions I made, and then you can verify ?
And if/when ok with you, then I will accept your pull request with these modifications, and merge it into my repo.

@Morikko
Copy link
Contributor Author

Morikko commented Sep 19, 2022

Also, this requires a few adaptations to work well with other themes where colors are not just white-ish and black-ish ..

Maybe opacity would be better than grey then.

I invited you on the repo.

@aaFn
Copy link
Owner

aaFn commented Sep 19, 2022

Thank you. Yep, this is what I did. Check the files / modifications I made.
(note, it contains a few other stuff I am doing in parallel, don't worry if you see a little bit more than needed, this is to avoid merge conflicts later)

Let me know if ok.

@Morikko
Copy link
Contributor Author

Morikko commented Sep 19, 2022

Great !

2022-09-18_15-44 search folder path less padding

2022-09-18_15-44 search folder path align left

I have the feeling that the padding-left: 10% is a bit too much, and it will waste too much space. What about reducing to 6px like on the screenshots above ?

Also, I have the impression that aligning at the start is better for readability (especially with the default path behavior, eg not reverse). What do you think ?

@aaFn
Copy link
Owner

aaFn commented Sep 19, 2022

I personally prefer the alignment on right as you initially did, that makes a better distinction.

10% might be a bit much yes .. but 6px seems too low ... something in between ?

@Morikko
Copy link
Contributor Author

Morikko commented Sep 20, 2022

Okay let's keep right alignment now. We can try with 10px.

@Morikko
Copy link
Contributor Author

Morikko commented Sep 20, 2022

It looks like this with 10px:

2022-09-18_15-44 search folder path 10px

@aaFn
Copy link
Owner

aaFn commented Sep 23, 2022

Looks good, I uploaded then the latest with that small adjustment, and with content for 2.0.111 also to avoid conflicts.
If you are ok, then I will accept the PR on the main repo, let me know.

@mzso
Copy link

mzso commented Sep 23, 2022

From my point of view I'd rather see the whole bookmark/folder text, the space is rather limited, and I don't even have as much as on the screenshot.
The path is shown in a tooltip anyway. More than enough for me.

If there was windowed mode of BSP2, then it would be great to see the path all the time for search results.

@aaFn
Copy link
Owner

aaFn commented Sep 23, 2022

Yes, do not worry, we are not cutting / reducing the bookmark or folder text.
We are just using the space left, if any.

And yes, there is a windows mode of BSP2, by opening it in a tab (see the magnifier glass menu, or right click on the BS2 icon in the toolbar).

@Morikko
Copy link
Contributor Author

Morikko commented Sep 23, 2022

All good, looking forward to using it!

@aaFn aaFn merged commit b10b9d0 into aaFn:master Sep 24, 2022
@aaFn aaFn deleted the search-folders-add-path branch September 24, 2022 08:17
@aaFn
Copy link
Owner

aaFn commented Sep 24, 2022

Done, 2.0.111 is out with the improvement, thank you, aaFn.

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

Successfully merging this pull request may close these issues.

3 participants