klipper icon indicating copy to clipboard operation
klipper copied to clipboard

Implement sorting options for vsdlist menu items

Open nmaggioni opened this issue 1 year ago • 5 comments

Solves #3468 by reimplementing the logic removed in c7cf8c5 in the display code instead of the virtual sdcard itself, as requested in the issue.

Adds the new sort and reverse options to menu entries of the vsdlist type.

nmaggioni avatar May 06 '24 20:05 nmaggioni

I am an complete amateur to this, but was able to to edit my local RPI Klipper code & printer configuration via Win SCP + Virtual Studio today. I copied and pasted these edits in and confirmed it works great on my Voron V0 screen. Thanks for making this! It really improves how I use my printer! Also for anyone else who sees this i'd recommend adding the month&date at the start of the exported gcode filename in your slicer configuration. I also made a backup of the RPI using the Unbutu virtual machine and "clone and compress raspberry pi image" video by techsapphire, didnt need to use it, but great to have.

howdy-vulcan avatar May 18 '24 23:05 howdy-vulcan

Thank you for your contribution to Klipper. Unfortunately, a reviewer has not assigned themselves to this GitHub Pull Request. All Pull Requests are reviewed before merging, and a reviewer will need to volunteer. Further information is available at: https://www.klipper3d.org/CONTRIBUTING.html

There are some steps that you can take now:

  1. Perform a self-review of your Pull Request by following the steps at: https://www.klipper3d.org/CONTRIBUTING.html#what-to-expect-in-a-review If you have completed a self-review, be sure to state the results of that self-review explicitly in the Pull Request comments. A reviewer is more likely to participate if the bulk of a review has already been completed.
  2. Consider opening a topic on the Klipper Discourse server to discuss this work. The Discourse server is a good place to discuss development ideas and to engage users interested in testing. Reviewers are more likely to prioritize Pull Requests with an active community of users.
  3. Consider helping out reviewers by reviewing other Klipper Pull Requests. Taking the time to perform a careful and detailed review of others work is appreciated. Regular contributors are more likely to prioritize the contributions of other regular contributors.

Unfortunately, if a reviewer does not assign themselves to this GitHub Pull Request then it will be automatically closed. If this happens, then it is a good idea to move further discussion to the Klipper Discourse server. Reviewers can reach out on that forum to let you know if they are interested and when they are available.

Best regards, ~ Your friendly GitIssueBot

PS: I'm just an automated script, not a human being.

github-actions[bot] avatar Jun 02 '24 00:06 github-actions[bot]

Please update p2cmd_O50 in klippy/extras/palette2.py: it expects virtual_sdcard.get_file_list to return tuples of 2 items.

MarSoft avatar Sep 08 '24 00:09 MarSoft

Done, let me know if there are any hiccups.

nmaggioni avatar Sep 08 '24 10:09 nmaggioni

Unfortunately I don't use that module, I just found that it uses get_file_list method by using a simple grep. Probably we should instead modify get_file_list to accept an optional with_mtime parameter? With it set to True it would return list of 3-tuples, otherwise (by default) 2-tuples? This would avoid breaking any external code.

MarSoft avatar Sep 08 '24 21:09 MarSoft

I think that would introduce unneeded complexity as people would need to look into get_file_list itself when using it instead of safely relying on existing examples. After all pulling the mtime in only requires a stat-like call for each file (especially cheap on flash based systems) and if the third parameter isn't needed one can simply ignore it after unpacking the tuple.

nmaggioni avatar Sep 09 '24 11:09 nmaggioni