-
Notifications
You must be signed in to change notification settings - Fork 135
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
Added filter by filesystem location + bonus tooltip on overflowed filter names #518
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #518 +/- ##
==========================================
+ Coverage 72.94% 73.23% +0.28%
==========================================
Files 62 62
Lines 11375 11409 +34
Branches 951 969 +18
==========================================
+ Hits 8298 8355 +57
+ Misses 3063 3040 -23
Partials 14 14 ☔ View full report in Codecov by Sentry. |
This is brilliant, thanks for working on this. |
The general idea looks OK, but the operations could get prohibitively expensive when there are many entries. |
When will it be merge? Expect this awesome feature |
can you resolve conflicts? |
I can, are you looking to actually merge it? (don't wanna play the fix/wait/fix/wait game) |
yes |
26ba089
to
4e82634
Compare
4e82634
to
f783f68
Compare
Should be good now, also changed the mouseover to a hook, should be nicer. |
give me some time to test this locally |
also, just a question, is it possible to build trees at client instead of server like tags? |
I'll have to take a look at it again, as it's been a while; but iirc the trees are built by comparing common paths, removing prefixes, and traversing down. I think the paths come from those reported on the torrent metadata.. so is it possible those torrents are using relative paths or something starting with the hex? Which root path should those non-root elements be under?
Probably? I'm guessing I mimicked something that needed to be server-side, but again it's been a while. I'll have to take a look at what metadata ends up on the client. |
no, they are all abs path. My torrents' download directories:
so all hex elements and elements starts by |
Very odd. I'll have to take another look and make some test cases when I get a chance. |
looks like I have mixed case directories and they cause this bug:
|
console.log(
[
'/srv/dev-disk-by-uuid-58b9efe4-428e-40d1-8d3f-97d8a5bac12a/u2-small/231d4f952201ba96628a9520740554c6ae6837db',
'/srv/dev-disk-by-uuid-58b9efe4-428e-40d1-8d3f-97d8a5bac12a/U2-small/232e75cf79187a07a7507f82275f1e8d3f7ddf73',
'/srv/dev-disk-by-uuid-58b9efe4-428e-40d1-8d3f-97d8a5bac12a/u2-small/2364ebde4155eaf3267af1011b4dbc9cc75d99e1',
].sort((a, b) => {
return a.localeCompare(b);
}),
); => [
'/srv/dev-disk-by-uuid-58b9efe4-428e-40d1-8d3f-97d8a5bac12a/u2-small/231d4f952201ba96628a9520740554c6ae6837db',
'/srv/dev-disk-by-uuid-58b9efe4-428e-40d1-8d3f-97d8a5bac12a/U2-small/232e75cf79187a07a7507f82275f1e8d3f7ddf73',
'/srv/dev-disk-by-uuid-58b9efe4-428e-40d1-8d3f-97d8a5bac12a/u2-small/2364ebde4155eaf3267af1011b4dbc9cc75d99e1'
] |
lgtm, only one minor problem |
I have a reduced solution that can probably be moved client-side; but case-insensitivity causes problems when filtering torrents. I think the solution is for the tree to be client-side, and the server can tell the client if the OS it's running on is case-insensitive or not, allowing insensitive tree and filtering The current solution means client has no clue on insensitivity, so filtering on non-matching lowercased names omits torrents incorrectly. Another option would be to always treat everything as case sensitive, and you'd end up with duplicate paths where casing doesn't match. But it's late, so I'll give it a shot tomorrow. |
after reviewing the code I think there is no need to move it to client side, current code looks fine |
handling case-insensitivity may introduce too much extra complexity,which will need to handle every component of path,I think current code works fine |
17ec3e4
to
0900280
Compare
I looked a bit at moving the treeing to client-side: I'm guessing there's some reason for building the tag list and other sidebar filters server-side, whether it's shared efficiency for multiple clients, the taxonomy diff data savings, or something else. I reduced the complexity of computing the tree and just stored the counts/data size in-tree, so it should be a little faster/simpler overall. There may be an argument for moving filter value computation to the client, but I think matching the existing sidebar filter logic makes more sense for now. |
a87a45f
to
84c54a3
Compare
Just treat everything as case-sensitive. Also flood could be on a different OS than the torrent application, which would also cause mismatches.
84c54a3
to
4a14a8d
Compare
please do not force push |
I don't see what's failing in the tests. It names the new test file but there's no failing test or other message. It passes locally. Github doesn't have a way to rerun workflows? |
It's in my repo and rebasing creates better changeset history, why not? |
Force-push causes inconvenient in code reviewing |
return true; | ||
} | ||
return false; | ||
return !!realPath?.startsWith(allowedPath); |
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.
please do not touch this file
New filter section that allows viewing space usage/torrent count by directory in tree format.
Filter names overflow with ellipses, and in the case of root directories, this is common: so I added a title-based tooltip to filter elements where the text is overflowed. Only appears on overflowed elements, and on mouse event. Not sure if equivalent touch events would work the same way.
No issue submitted, just something I wanted to make.