-
Notifications
You must be signed in to change notification settings - Fork 14
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
Setting to set the desired file ordering #387
Conversation
c262a33
to
54a95e7
Compare
9a352d8
to
e18aec5
Compare
Thanks a lot, I like where this is going! 😊 I am not quite sure about the aliases. On the plus-side, they are discoverable when typing Let me know when you are ready for a more detailed review. |
The discoverability was indeed the main reason why I have added the aliases. But as you say, without the completion they are anyway useless. I will remove them again... Function-vise I am done. So I guess you can start reviewing that. Concerning the test, I think I need some advice from you. So far I have added the some basic settings tests in I have
|
0f7aca5
to
b2ac50d
Compare
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.
Thanks again, I really like where this is going and am very fond of the new names for the ordering types. I left a few minor comments concerning the implementation.
Concerning the tests, I am fine with not testing every single ordering function that is trivial, however the natural sorting would be nice to test in the test_settings
module as it is a class method.
One end2end test checking if the order changes in the library when the setting is changed would be great 😊
726e969
to
6efe2d5
Compare
This is now almost complete, right? Just some minor work on the testing, add to changelog, and then we are ready to merge? 😊 |
Thanks for your comments, it will look into them. Yes, this PR is pretty much complete. I just have to create an E2E test to test the general behaviour and mock the |
Sounds good, as always take all the time you need 😊 |
The option `global.image_order` specifies the order of files. Files can be ordere according to their name, size or modified time in ascending and descending order. The order can be set using the ordinary `:set image_order <ordering>` command. Some code was take directly from #76
Add new option `directory_order` which specifies the order of the directores. `image_order` only influences the order of the images.
| Current | New | | :--- | :--- | | name | alphabetical | | name-desc | alphabetical-desc | | name-natural | natural | | name-natural-desc | natural-desc | | modify | recently-modified-first | | modify-desc | recently-modified-last | | size | smallest-first | | size-desc | largest-first |
Three classes for these order seemed a bit overkill, especially since most orderings are shared. I did not figure out the correct syntax to reference the `_natural_sort` method from the class variable `ORDER_TYPES`.
ddd16b3
to
21e472a
Compare
I had a brief look at this, seems almost ready to go, would you mind if I merge to a branch and try to finalise this while you work on #467 over the week-end? |
Indeed, functionality-vise everything should be done. However, I have not looked at the code myself for over 1 year. 🙈 You can merge and finalize it, or let me rebase and go over it again. However you like 😊 EDIT |
I'm happy to take a shot, I already rebased and looked into the code, should be rather straightforward as it is looking good 😊
|
Sounds good, happy coding session 😊 And feel free to squash all my commits as the history is rather dirty 🙈 |
Closing, as #563 has been merged. |
Adds settings to specify the desired ordering of the images and the desired order of folders.
Todo:
Size
for directory not workingPartially based on #76. Some code was taken directly from there
resolves #75