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
Tree selector for ignore patterns #9132
base: main
Are you sure you want to change the base?
Conversation
3e73d13
to
3453515
Compare
Thank you for working on this. Have you seen #7145? It is a previous attempt at providing a similar feature, although sadly never finished. Might give you some inspiration or a basis to make your contribution most useful. |
One major issue with the previous attempt was that performance with larger numbers of files/folders was abysmal. It literally brought the whole GUI down, making it completely unresponsive, in the worst case for minutes. Possibly related: |
I just tried with 10 000 and 100 000 files in random folders, and it's not that bad. There is about 2s lag with 100 000 files when loading the tree. But I would expect such behavior. Of course with higher number of ignore patterns parsing would take longer. What is reasonable performance we're aiming to ? For now, I'm planning following improvements:
|
2s lag with 100,000 files is totally fine, I would say. With the restore versions tree, the lag starts with 1,000+ files already, and the same was true for the tree generated in the other PR. I'm going to test your PR later on using a similar setup as before, as it would be absolutely great if you've actually managed to solve the tree lag problem. Just for the record, in those other trees the lag happens when there are 1,000+ files in the same folder (e.g. the root folder which is always loaded). |
I did more testing of the performance and did some tweaks:
Limitation to receive-only folders removed.Tree data loading messageSwitching between Basic and Advanced patterns in Advanced settings tab and stored in folder configTree now takes whole space of Ignore Pattern tab and height is resizable. |
* Folder Basic Ignores Tree tweaks | ||
*/ | ||
|
||
#folderGlobalTree-container { |
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.
The styles here seem like a copy from #restoreTree-container
. Is this correct? If yes, then I think it would be nice to just create a common class with these to add to the both elements to avoid the repetition.
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.
Yes, I just copied that.
I will look at this later, when I know the style is final. min-height
and max-height
might need some tuning.
0376c5f
to
00e841d
Compare
Is this PR still on the table? Would be great to have, it's been such a highly anticipated feature. |
Writing a push on this PR also. Getting this into Syncthing would change a lot on how we're currently using it and for the average user this tree view instead will be way easier than learning git-ignore patterns. @p0l0us What's the state of this PR? Anything you feel is missing? |
Is it possible to add some user defined global ignore patterns to exclude temporary files like ".~", ".pyc" etc? Also I would like to offer some extension to see the size (remote/local) of folders in the tree. |
Purpose
As a user, I wish to have an easy way to select which files from other devices will be downloaded and managed in my syncthing folder.
The main problem with current ignores is, that a user doesn't know what files exists in the global tree without downloading all files to the device or checking other device(s). So I want to expose the global item tree in the folder ignore editor tab in a tree component, allowing the user to select files which should be downloaded (not ignored). The feature target is not complex ignores management - just simply choose what to download.
Tree selection overrides the ignore patterns by something like:
The tree component is not supposed to parse any other ignore patterns than those generated by itself. It is each user's responsibility to not screw format up when using the tree selector. If the first line "// Generated by tree selector" is missing or incorrect, all patterns will be replaced by "**" and the user can un-ignore items one by one.
A broader view of the feature will be clarified by the following PR draft:
#9130
Testing
Describe what testing has been done, and how the reviewer can test the change
if new tests are not included.
Screenshots
Not receive-only folders:
Receive-only folders:
Tree expanded:
Documentation
No API changes.